← Back to Pull requests

ci: leave out unreachable Go vulnerabilities and record unaffected image findings #2355

Closed
unknown closed this pull request without merging on Nov 12, 2026 12:40 UTC
View on GitHub
unknown unknown commented on Nov 10, 2026 08:24 UTC
Author

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 in golang.org/x/crypto, a vulnerability in x/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

  • Go reachability in the daily scan. The security-scan action gains a govulncheck input, 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.sh writes a Grype ignore rule for the vulnerability ID and each alias, limited to that package version and that module's go.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, under go_tools.
  • .openvex.json, an OpenVEX document for the vulnerabilities in an image that do not affect NVSentinel. A statement names the vulnerability, the images as pkg:oci/<image>, optionally the packages, and the reason. It starts with no statements. The security-scan action gains a vex input that passes the document to Grype, and the weekly image scan sets it.

  • .grype.yaml, which Grype reads from the repository root: exclude skips demos/, tilt/ and tests/.

  • 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.

  • The daily scan runs on linux-amd64-cpu32. The timeout of its vulnerability scan goes from 30 to 60 minutes.
  • Type of Change


  • 🐛 Bug fix

  • ✨ New feature

  • 💥 Breaking change

  • 📚 Documentation

  • 🔧 Refactoring

  • 🔨 Build/CI
  • Component(s) Affected


  • Health Monitor

  • Core Service

  • Fault Management

  • Janitor

  • Deployment/Config

  • API/Interface

  • Preflight

  • Plugins

  • Documentation/CI

  • New Component

  • Multiple Components

  • Other
  • Testing


  • Tests pass locally

  • Manual testing completed

  • No breaking changes (or documented)
  • Daily scan, from a temporary push trigger on pull-request/2355: govulncheck wrote 9 rules, one for GO-2026-5932 in each module that requires x/crypto v0.58.0 without calling the vulnerable code. Grype reported 8 results, against 17 on main. ClamAV scanned 2,129 files and found nothing. The other 8 results are:

  • - go-jose/v4 v4.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-files and the 3 Python findings, which govulncheck does not cover.
    - GO-2026-5932 in commons/go.mod. commons has x/crypto only in its module graph, and no package of commons imports it, so govulncheck reports nothing for it and the script makes no rule.
  • The rule logic, checked against govulncheck output with a vulnerability that a module calls (no rule), one that it only imports (rules for the ID and its alias) and one that it only requires (a rule).

  • Weekly image scan, from the same trigger, with a test statement for CVE-2026-109518 limited to pkg:oci/gpu-reset and the PURL of apt 2.8.3. All 28 images were scanned. In gpu-reset, Grype reported the CVE only in libapt-pkg6.0t64. In gpu-health-monitor-dcgm-4.x, preflight-nccl-allreduce and preflight-nccl-loopback, it still reported the CVE in apt 2.8.3.
  • Checklist


  • Self-review completed

  • Documentation updated (if needed)

  • Ready for review
  • <!-- 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 -->

    Diff: 650 lines (+487 / -163) across 8 files Reviewer: KaivalyaMDabhadkar Review duration: 3136m
    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
    0.52
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    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
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 52% (MEDIUM) · Higher = larger blast radius
    52%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 20.5% · Safe to merge
    20.5%