ci: leave out unreachable Go vulnerabilities and record unaffected image findings #2355
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.52) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #2355"
general
weight: 0.35
KaivalyaMDabhadkar
Summary
Closes #2330. Part of #2325.
Problem
Grype reports a dependency when its version is in the affected range of a vulnerability. It does not check whether NVSentinel calls the vulnerable code, so it also reports vulnerabilities that cannot affect NVSentinel. On
main, 10 of the 17 Grype alerts are GO-2026-5932 ingolang.org/x/crypto, a vulnerability inx/crypto/openpgp, which no NVSentinel module imports. The scan also covers code that is not part of the product, such as demos and test tools.What this PR adds
security-scanaction gains agovulncheckinput, and the daily scan sets it. The action then runs govulncheck on each Go module outside the excluded paths. govulncheck follows the call graph and reports whether a module calls the vulnerable code, or only requires or imports the vulnerable module. For each vulnerability that a module does not call,govulncheck-ignore-rules.shwrites a Grype ignore rule for the vulnerability ID and each alias, limited to that package version and that module'sgo.mod, with govulncheck's result as the reason. The rules are made at each scan and are not stored, so a module that starts to call the vulnerable code is reported at the next scan.- A vulnerability that the Go vulnerability database does not have yet gets no rule, so Grype still reports it.
- When govulncheck fails in a module, the script logs a warning and makes no rule for that module, so Grype reports all of its Go findings.
- The govulncheck version is in
.versions.yaml, undergo_tools..openvex.json, an OpenVEX document for the vulnerabilities in an image that do not affect NVSentinel. A statement names the vulnerability, the images aspkg:oci/<image>, optionally the packages, and the reason. It starts with no statements. Thesecurity-scanaction gains avexinput that passes the document to Grype, and the weekly image scan sets it..grype.yaml, which Grype reads from the repository root:excludeskipsdemos/,tilt/andtests/.SECURITY.md: a "Vulnerability Scanning" section that says what the two scans check, what govulncheck adds and where it stops, and how to handle a finding, including how to write a statement.linux-amd64-cpu32. The timeout of its vulnerability scan goes from 30 to 60 minutes.Type of Change
Component(s) Affected
Testing
pull-request/2355: govulncheck wrote 9 rules, one for GO-2026-5932 in each module that requiresx/cryptov0.58.0 without calling the vulnerable code. Grype reported 8 results, against 17 onmain. ClamAV scanned 2,129 files and found nothing. The other 8 results are:-
go-jose/v4v4.1.4 in csp-health-monitor, 3 advisories. The Go vulnerability database does not have them yet, so they are still reported.-
tj-actions/changed-filesand the 3 Python findings, which govulncheck does not cover.- GO-2026-5932 in
commons/go.mod.commonshasx/cryptoonly in its module graph, and no package ofcommonsimports it, so govulncheck reports nothing for it and the script makes no rule.pkg:oci/gpu-resetand the PURL ofapt2.8.3. All 28 images were scanned. Ingpu-reset, Grype reported the CVE only inlibapt-pkg6.0t64. Ingpu-health-monitor-dcgm-4.x,preflight-nccl-allreduceandpreflight-nccl-loopback, it still reported the CVE inapt2.8.3.Checklist
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
Documentation
Added guidance for reviewing daily dependency and weekly container-image scan findings, retrieving vulnerability details, and documenting vulnerabilities that do not affect an image.
Chores
Configured scans to exclude demo, Tilt, and test directories.
Added Go vulnerability checks and more targeted exclusions for vulnerabilities without an identified code path.
Passed vulnerability status information to image scans.
* Increased the vulnerability scan timeout and changed its runner.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->