Repository navigation
fix: Go call analysis aggregation (Code hardening, no functional change) - #3163
Open
Subhan1794 wants to merge 1 commit into
Open
Subhan1794 wants to merge 1 commit into
Subhan1794 wants to merge 1 commit into
Conversation
Collaborator
|
Please read our contributing guide before opening pull requests |
Collaborator
Did you fail to commit the unit test? |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3163 +/- ##
==========================================
- Coverage 82.08% 81.47% -0.62%
==========================================
Files 119 119
Lines 7658 7658
==========================================
- Hits 6286 6239 -47
- Misses 1372 1419 +47 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
5 tasks done
Collaborator
|
@Subhan1794 friendly ping! |
This branch has not been deployed
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.
Fixes #3162.
matchAnalysisWithPackageVulnsaggregated govulncheck findings per (vulnerability, module) with a plain map assignment, so the last finding won instead of OR-ing. When an uncalled finding came last, a vulnerability whose code IS executed was marked Called=false, went to the hidden bucket, and could yield exit 0 with --show-all-vulns off.This one-line change ORs findings, matching the semantics already used by the Rust call analysis in the same package ("Once one advisory marks this vuln as called, always mark as called") and by the scalibr govulncheck enricher (ANY finding with a function frame means called).
Verified with a unit test in both orders: [called, uncalled] and [uncalled, called] now both report Called=true.