Skip to content

fix: Go call analysis aggregation (Code hardening, no functional change) - #3163

Open
Subhan1794 wants to merge 1 commit into
google:mainfrom
Subhan1794:Subhan1794-patch-1
Open

Subhan1794 wants to merge 1 commit into
google:mainfrom
Subhan1794:Subhan1794-patch-1

Conversation

@Subhan1794

Copy link
Copy Markdown

Fixes #3162.

matchAnalysisWithPackageVulns aggregated 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.

@G-Rath

G-Rath commented Oct 23, 2026

Copy link
Copy Markdown
Collaborator

Please read our contributing guide before opening pull requests

@G-Rath G-Rath closed this Oct 23, 2026
@another-rex another-rex reopened this Oct 25, 2026
@another-rex

another-rex commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

Verified with a unit test in both orders: [called, uncalled] and [uncalled, called] now both report Called=true.

Did you fail to commit the unit test?

@another-rex another-rex changed the title Fix Go call analysis last-wins aggregation (OR findings instead of overwriting) fix: Go call analysis last-wins aggregation (OR findings instead of overwriting) Oct 26, 2026
@another-rex another-rex changed the title fix: Go call analysis last-wins aggregation (OR findings instead of overwriting) fix: Go call analysis aggregation (Code hardening, no functional change) Oct 26, 2026
@codecov-commenter

codecov-commenter commented Oct 28, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.47%. Comparing base (0c8f9eb) to head (5793154).
⚠️ Report is 12 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@another-rex

Copy link
Copy Markdown
Collaborator

@Subhan1794 friendly ping!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Go call analysis marks called vulnerabilities as uncalled when an uncalled finding comes last (last-wins aggregation)

4 participants