Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
83c10db
feat: create pipeline for symbol reachability and add a test
ziadhany Apr 22, 2026
3799817
Add more test for reachability and remove redundant code
ziadhany Jun 5, 2026
a3d1172
Fix the format bugs and refactor the code
ziadhany Jun 10, 2026
2f0dd84
Fix a bug in the import-catching logic and add a test.
ziadhany Jun 11, 2026
00fd333
Add an unidiff dependency to pyproject.toml file
ziadhany Jun 16, 2026
5da2504
Add unidiff to package dependencies to parse diff text
ziadhany Jun 16, 2026
1e7f76e
Simplify the pipeline logic for imports and direct calls
ziadhany Jun 23, 2026
4428760
Add support for vulnerablecode reachability option
ziadhany Jun 24, 2026
e1a2d86
Fix the tests and improve patch extraction performance
ziadhany Jun 24, 2026
bf94dc8
Fix formatting and linting errors.
ziadhany Jun 25, 2026
c9b9652
Refactor and simplify reachability pipeline
ziadhany Jun 26, 2026
c4ac68a
Add support for getting constant symbols
ziadhany Jul 1, 2026
d48c18e
Remove dead code and fix the test
ziadhany Jul 1, 2026
6686487
Add unidiff to uv.lock
ziadhany Jul 1, 2026
a9076d3
Add support constant to resource analyzer
ziadhany Jul 1, 2026
2867643
Fix formating error in CI
ziadhany Jul 1, 2026
4b48ad7
Add a test for constants, extract_imports,collect_imports
ziadhany Jul 2, 2026
1bd85f6
Remove dependency and copy only the required file
ziadhany Jul 15, 2026
09cfa5f
Update pipeline/functions name
ziadhany Jul 22, 2026
3bfa88a
Fix CI files format
ziadhany Jul 23, 2026
ec79943
Fix a typo in patch.py.ABOUT file
ziadhany Jul 23, 2026
3744e2f
Remove the unidiff library from the dependencies
ziadhany Jul 23, 2026
128bfdf
Skip the test for macOS
ziadhany Jul 23, 2026
7258c0a
Allow reachability by default, for vulnerabilities pipeline
ziadhany Jul 29, 2026
27de9f1
Update the code to difflib instead of unidiff library
ziadhany Jul 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ run = "scancodeio:combined_run"
analyze_docker_image = "scanpipe.pipelines.analyze_docker:Docker"
analyze_root_filesystem_or_vm_image = "scanpipe.pipelines.analyze_root_filesystem:RootFS"
analyze_windows_docker_image = "scanpipe.pipelines.analyze_docker_windows:DockerWindows"
analyze_symbols_reachability = "scanpipe.pipelines.analyze_symbols_reachability:SymbolReachability"
benchmark_purls = "scanpipe.pipelines.benchmark_purls:BenchmarkPurls"
collect_strings_gettext = "scanpipe.pipelines.collect_strings_gettext:CollectStringsGettext"
collect_symbols_ctags = "scanpipe.pipelines.collect_symbols_ctags:CollectSymbolsCtags"
Expand Down
33 changes: 33 additions & 0 deletions scanpipe/pipelines/analyze_symbols_reachability.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#
# Copyright (c) nexB Inc. and others. All rights reserved.
# VulnerableCode is a trademark of nexB Inc.
# SPDX-License-Identifier: Apache-2.0
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
# See https://github.com/aboutcode-org/vulnerablecode for support or download.
# See https://aboutcode.org for more information about nexB OSS projects.
#

from scanpipe.pipelines import Pipeline
from scanpipe.pipes import reachability


class SymbolReachability(Pipeline):
"""Patch reachability analysis for given vulnerability patches."""

download_inputs = False
is_addon = True
results_url = "/project/{slug}/resources/?extra_data=symbol_reachability"

@classmethod
def steps(cls):
return (cls.analyze_symbol_reachability,)

def analyze_symbol_reachability(self):
"""
Perform symbol-level reachability analysis for each patch. This step compares
the AST of patched/vulnerable files against the codebase resources.
Results are stored directly in the 'extra_data' of each CodebaseResource.
"""
reachability.analyze_and_store_symbol_reachability_results(
project=self.project, logger=self.log
)
Loading
Loading