Skip to content

Commit 944dcbe

Browse files
committed
Create pipeline for symbol reachability
Signed-off-by: ziad hany <ziadhany2016@gmail.com>
1 parent b745c3c commit 944dcbe

10 files changed

Lines changed: 490 additions & 306 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ run = "scancodeio:combined_run"
136136
analyze_docker_image = "scanpipe.pipelines.analyze_docker:Docker"
137137
analyze_root_filesystem_or_vm_image = "scanpipe.pipelines.analyze_root_filesystem:RootFS"
138138
analyze_windows_docker_image = "scanpipe.pipelines.analyze_docker_windows:DockerWindows"
139-
analyze_patch_reachability = "scanpipe.pipelines.analyze_patch_reachability:PatchReachability"
139+
analyze_symbols_reachability = "scanpipe.pipelines.collect_symbols_reachability:SymbolReachability"
140140
benchmark_purls = "scanpipe.pipelines.benchmark_purls:BenchmarkPurls"
141141
collect_strings_gettext = "scanpipe.pipelines.collect_strings_gettext:CollectStringsGettext"
142142
collect_symbols_ctags = "scanpipe.pipelines.collect_symbols_ctags:CollectSymbolsCtags"

scanpipe/pipelines/analyze_patch_reachability.py renamed to scanpipe/pipelines/collect_symbols_reachability.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,24 @@
1111
from scanpipe.pipes import reachability
1212

1313

14-
class PatchReachability(Pipeline):
14+
class SymbolReachability(Pipeline):
1515
"""
1616
Patch reachability analysis, for given a vulnerability patches
1717
"""
1818
download_inputs = False
1919
is_addon = True
20-
results_url = "/project/{slug}/resources/?extra_data=reachability"
20+
results_url = "/project/{slug}/resources/?extra_data=symbol_reachability"
2121

2222
@classmethod
2323
def steps(cls):
24-
return (cls.analyze_and_store_patch_reachability,)
24+
return (cls.analyze_and_store_symbol_reachability,)
2525

26-
def analyze_and_store_patch_reachability(self):
26+
def analyze_and_store_symbol_reachability(self):
2727
"""
2828
Perform symbol-level reachability analysis for each patch.
2929
This step compares the AST of patched/vulnerable files against the codebase resources.
3030
Results are stored directly in the 'extra_data' of each CodebaseResource.
3131
"""
32-
reachability.analyze_and_store_patch_reachability_results(
32+
reachability.collect_and_store_symbol_reachability_results(
3333
project=self.project, logger=self.log
3434
)

0 commit comments

Comments
 (0)