File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -136,12 +136,12 @@ run = "scancodeio:combined_run"
136136analyze_docker_image = " scanpipe.pipelines.analyze_docker:Docker"
137137analyze_root_filesystem_or_vm_image = " scanpipe.pipelines.analyze_root_filesystem:RootFS"
138138analyze_windows_docker_image = " scanpipe.pipelines.analyze_docker_windows:DockerWindows"
139+ analyze_patch_reachability = " scanpipe.pipelines.analyze_patch_reachability:PatchReachability"
139140benchmark_purls = " scanpipe.pipelines.benchmark_purls:BenchmarkPurls"
140141collect_strings_gettext = " scanpipe.pipelines.collect_strings_gettext:CollectStringsGettext"
141142collect_symbols_ctags = " scanpipe.pipelines.collect_symbols_ctags:CollectSymbolsCtags"
142143collect_symbols_pygments = " scanpipe.pipelines.collect_symbols_pygments:CollectSymbolsPygments"
143144collect_symbols_tree_sitter = " scanpipe.pipelines.collect_symbols_tree_sitter:CollectSymbolsTreeSitter"
144- collect_symbols_patches = " scanpipe.pipelines.collect_patch_symbols:CollectPatchSymbols"
145145enrich_with_purldb = " scanpipe.pipelines.enrich_with_purldb:EnrichWithPurlDB"
146146fetch_scores = " scanpipe.pipelines.fetch_scores:FetchScores"
147147find_vulnerabilities = " scanpipe.pipelines.find_vulnerabilities:FindVulnerabilities"
Original file line number Diff line number Diff line change 1+ #
2+ # Copyright (c) nexB Inc. and others. All rights reserved.
3+ # VulnerableCode is a trademark of nexB Inc.
4+ # SPDX-License-Identifier: Apache-2.0
5+ # See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
6+ # See https://github.com/aboutcode-org/vulnerablecode for support or download.
7+ # See https://aboutcode.org for more information about nexB OSS projects.
8+ #
9+
10+ from scanpipe .pipelines import Pipeline
11+ from scanpipe .pipes import reachability
12+
13+
14+ class PatchReachability (Pipeline ):
15+ """
16+ Patch reachability analysis, for given a vulnerability patches
17+ """
18+ download_inputs = False
19+ is_addon = True
20+ results_url = "/project/{slug}/resources/?extra_data=reachability"
21+
22+ @classmethod
23+ def steps (cls ):
24+ return (cls .analyze_and_store_patch_reachability ,)
25+
26+ def analyze_and_store_patch_reachability (self ):
27+ """
28+ Perform symbol-level reachability analysis for each patch.
29+ This step compares the AST of patched/vulnerable files against the codebase resources.
30+ Results are stored directly in the 'extra_data' of each CodebaseResource.
31+ """
32+ reachability .analyze_and_store_patch_reachability_results (
33+ project = self .project , logger = self .log
34+ )
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments