Create pipeline for symbol reachability#2151
Open
ziadhany wants to merge 16 commits into
Open
Conversation
944dcbe to
da128db
Compare
Collaborator
Author
|
The pipeline requires the unidiff dependency to parse diffs/patch text |
d5fed3d to
08512ab
Compare
Collaborator
Author
|
This depends on: We have an API support for patching VulnerableCode, see: |
08512ab to
503af03
Compare
Signed-off-by: ziad hany <ziadhany2016@gmail.com>
Signed-off-by: ziad hany <ziadhany2016@gmail.com>
Signed-off-by: ziad hany <ziadhany2016@gmail.com>
Signed-off-by: ziad hany <ziadhany2016@gmail.com>
Fix the test Signed-off-by: ziad hany <ziadhany2016@gmail.com>
Signed-off-by: ziad hany <ziadhany2016@gmail.com>
Add missing logic for imports Signed-off-by: ziad hany <ziadhany2016@gmail.com>
Signed-off-by: ziad hany <ziadhany2016@gmail.com>
Signed-off-by: ziad hany <ziadhany2016@gmail.com>
Signed-off-by: ziad hany <ziadhany2016@gmail.com>
Improve pipeline structure Signed-off-by: ziad hany <ziadhany2016@gmail.com>
Fix formating tests Signed-off-by: ziad hany <ziadhany2016@gmail.com>
3686a85 to
dfbb4db
Compare
ziadhany
commented
Jul 1, 2026
Signed-off-by: ziad hany <ziadhany2016@gmail.com>
Fix formating Signed-off-by: ziad hany <ziadhany2016@gmail.com>
Signed-off-by: ziad hany <ziadhany2016@gmail.com>
Signed-off-by: ziad hany <ziadhany2016@gmail.com>
ziadhany
commented
Jul 2, 2026
Collaborator
Author
There was a problem hiding this comment.
I'm not sure if we need to update all these dependency. I just ran uv add unidiff, which updated it automatically.
Collaborator
Author
|
I'm also not sure why Run unit tests on macOS / run-unit-tests (3.13) is failing. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issues
Changes
Add Pipeline(s) that can retrieve vulnerable / fix symbols, collect local symbols (pur2sym) and match them
Pipeline Graph:
flowchart TD %% Main Entry Point Start([collect_and_store_symbol_reachability_results]) --> GetResources[Filter candidate_resources] GetResources --> GroupPatches[Group fixed_in_patches by vcs_url] GroupPatches --> RepoLoop{For each repository} %% Repository Processing RepoLoop -->|Process Repo| GitContext[GitRepositoryContext] GitContext -->|Clone & Enter| PatchLoop{For each patch} %% Patch Processing PatchLoop -->|Next Patch| GitCheckout[Checkout commit_hash] GitCheckout --> GenReport[generate_reachability_report] %% Patch Analysis Stage GenReport --> PatchAnalyzer[PatchAnalyzer.collect_patch_symbols] PatchAnalyzer --> AnalyzeDiff[Get Diff & Changed Files] AnalyzeDiff --> PatchAnalyzeLoop[Analyze vulnerable & fixed texts] PatchAnalyzeLoop --> DetectLang[detect_language_with_scancode] DetectLang --> ParsePatchAST[LanguageQuery.parse_code_to_ast] ParsePatchAST --> ExtractPatchSymbols[SymbolExtractor: Extract Changed Symbols] ExtractPatchSymbols --> DiffSymbols[diff_changed_symbols] DiffSymbols --> ResourceLoop{For each candidate_resource} %% Resource Matching Stage ResourceLoop -->|Next Resource| LangCheck{Language matches patch?} LangCheck -->|No| ResourceLoop LangCheck -->|Yes| ResAnalyzer[ResourceAnalyzer.build_index] ResAnalyzer --> ParseResAST[Parse Resource to AST] ParseResAST --> IndexResSymbols[Extract definitions, imports, calls] IndexResSymbols --> Matcher[ResourcePatchMatcher.match] Matcher --> MatchVuln[Match Vulnerable Symbols] Matcher --> MatchFixed[Match Fixed Symbols] MatchVuln & MatchFixed --> CheckEvidence{Evidence found?} CheckEvidence -->|No| ResourceLoop %% Reporting Stage CheckEvidence -->|Yes| Classify[classify_reachability] Classify --> StatusReach[REACHABLE / POTENTIALLY / NOT_REACHABLE] StatusReach --> UpdateData[Update resource.extra_data] UpdateData --> ResourceLoop %% Loop Backs and Exit ResourceLoop -->|All resources checked| PatchLoop PatchLoop -->|All patches checked| RepoLoop RepoLoop -->|All repos checked| End([End Process]) %% Styling classDef functionNode fill:#e1f5fe,stroke:#03a9f4,stroke-width:2px; classDef logicNode fill:#fff3e0,stroke:#ff9800,stroke-width:2px; classDef loopNode fill:#f3e5f5,stroke:#9c27b0,stroke-width:2px; class Start,GenReport,PatchAnalyzer,ResAnalyzer,Matcher,Classify functionNode; class RepoLoop,PatchLoop,ResourceLoop loopNode; class LangCheck,CheckEvidence logicNode;Checklist