← Back to Pull requests

ci: scan app and web images with Trivy #55

Closed
unknown closed this pull request without merging on Sep 18, 2026 21:00 UTC
View on GitHub
unknown unknown commented on Sep 16, 2026 20:52 UTC
Author

Summary

  • Scan both final runtime images (app and web) with Trivy using one shared policy: HIGH and CRITICAL vulnerabilities fail when a fix is available, and end-of-life base OS versions fail.

  • Keep the existing multi-architecture publication path unchanged. Pull requests build and load linux/amd64 images locally in CI, then run the same scan script and save SARIF reports; pushes upload available SARIF reports to code scanning.

  • Add make scan-images and document the local equivalent.
  • Validation

  • actionlint .github/workflows/docker-image.yml passed.

  • bash -n scripts/scan-images.sh passed.

  • make -n scan-images passed.

  • git diff --check passed.

  • Trivy v0.74.0 scanned a remote Alpine image under both labels, produced valid SARIF for each, and returned failure for its HIGH vulnerability with an available fix, as configured.
  • Local limitation

    Docker Desktop's Linux engine is not available in this WSL environment, so I could not build this repository's app and web images locally. The PR workflow builds and scans those actual images. I left this as a draft until that CI run completes.

    Diff: 141 lines (+105 / -36) across 1 files Reviewer: tomatotomata Review duration: 2888m
    All Vouch review confidence checks passed
    Residual risk 0.13 = Change Risk (0.33) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.33 · 141 lines diff across 1 files
    0.33
    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.296
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #55"
    general weight: 0.35
    Reviewers
    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: 32.6% (LOW) · Higher = larger blast radius
    32.6%
    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: 12.9% · Safe to merge
    12.9%