← Back to Pull requests

fix(vulnerability-scan): warn when an image scan finds critical flaws #815

Closed
unknown closed this pull request without merging on Dec 01, 2026 12:07 UTC
View on GitHub
unknown unknown commented on Dec 01, 2026 05:10 UTC
Author

Summary: One of the shared security scans checks published system images for known flaws and is supposed to raise a warning when it finds critical ones. It looked in the wrong place in the scan report, so it said "0 found" even when critical flaws were listed, and it also said "0 found" when there was no report at all. With this change critical flaws are counted correctly, and a missing or unreadable report shows up as a visible failure instead of a clean result.

---

What does this change?

The critical-flaw check now reads each flaw's rating from the rule it belongs to (where the report format puts it), compares it as a number so 10.0 counts, and counts every id type, not only ones starting with CVE. Before, a missing report was silently turned into a clean zero. Now it raises an error, which is safe because the job is already non-blocking. The zizmor baseline entry for the removed template expansion is deleted, and a test runs the step's script on sample reports.

Closes #814

Beyond the issue's script I made one small change: a result with no rule id is looked up under an empty id, so it counts as 0 instead of making jq fail on a null key.

Consumer validation

Consumer PR: none, not opened
Consumer CI run: none, no consumer run exercised this change
Out-of-org consumer impact: inputs, outputs and permissions are unchanged, and the job is already continue-on-error, so a failing check is visible and does not block callers such as ublue-os/aurora or ublue-os/bazzite. Not verified against those repositories.

  • Opened a consumer PR using @v1 production references (read-only candidate preview only when bootstrapping)

  • Linked a passing consumer CI run that exercised this change

  • Evaluated out-of-org consumers (ublue-os/aurora, ublue-os/bazzite) and documented the impact above
  • Bot-authored PR, so the consumer checks are exempt.

    Not run: tests were not run locally, CI is the verdict. No real Grype report was read; the test uses hand-built reports. PR #740 and PR #775 touch the same workflow elsewhere, so whichever of #740 and this lands second must redo the zizmor line numbers (the entries for lines 80, 88 and 94 are above the removed line and do not move here).

    Checklist

  • I am using an agent and I take responsibility for this PR (if AI-assisted)

  • Conventional commit message (feat:, fix:, chore:, etc.)

  • No hardcoded secrets or credentials
  • -- hive: agent=scanner backend=claude model=claude-opus-5-5 claude=2.1.332

    Diff: 314 lines (+235 / -79) across 3 files Reviewer: Danathar Review duration: 417m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.40) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 314 lines diff across 3 files
    0.40
    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%
    56%
    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.344
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #815"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% 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: 40.3% (MEDIUM) · Higher = larger blast radius
    40.3%
    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: 56.8% · Lower = rushed or shallow review
    56.8%
    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: 17.4% · Safe to merge
    17.4%