← Back to Pull requests

ci: attest the OpenVEX document to each image and scan the images of each release #2379

Closed
unknown closed this pull request without merging on Nov 13, 2026 06:54 UTC
View on GitHub
unknown unknown commented on Nov 12, 2026 13:04 UTC
Author

Summary

Closes #2333.

A vulnerability scanner reports every known vulnerability in an image, including those that do not affect NVSentinel. #2355 added .openvex.json to the repository for those. It is a hand-written list of the vulnerabilities that do not affect our images, each with the reason, in the OpenVEX format that Grype and Trivy can read. No script generates it: a contributor adds a statement in a pull request and a maintainer reviews it. But the file is only in the repository, so a user who scans one of our images cannot get it from the image. Also, we scan only the latest images from main, not the images of a release.

Attach .openvex.json to each image

When publish.yml publishes an image, the sbom-and-attest action already attaches a signed SBOM and signed build provenance to it. That action now also runs:

cosign attest --yes --predicate .openvex.json --type openvex "${IMAGE}@${DIGEST}"

This puts .openvex.json, unchanged, in a signed attestation. Cosign signs it with the GitHub OIDC identity of the publish workflow and pushes it to the registry as a separate object that refers to the image digest. The image itself does not change, and the file is not inside it. This applies to every published image, from main and from a release, built with ko or with a Dockerfile.

A user gets the document with cosign verify-attestation, which finds the attestation from the image digest and checks that our publish workflow signed it. They then pass the document to the scanner with --vex, and the scanner leaves out the vulnerabilities in it.

Because a syntax error in .openvex.json would now fail every publish, a new make openvex-lint checks the file on each pull request, in the simple-lint job of lint-test.yml.

.openvex.json has no statements yet, so images carry an empty document until the first statement is added. A follow-up PR adds statements for the findings of the image scan.

Scan the images of each release

When a release tag is pushed, publish.yml now runs the weekly image scan (image-scan.yml) on the images of that tag, after they are built:

  • When image-scan.yml runs on a tag, it scans the images of that tag. On a branch, it scans the latest images from main as before. A manual run on a tag scans that release again.

  • The scan uses .openvex.json from the tag.

  • Its findings appear as code scanning alerts for the release tag in the Security tab. They are not attached to the image.

  • No other job waits for the scan, so a finding does not stop the release.
  • Documentation

    SECURITY.md describes the release scan, and adds the commands to download the OpenVEX document from an image and use it with Grype or Trivy. It also says that only critical and high vulnerabilities need an update or a statement. The scans still report the lower severities.

    Testing

    I ran the new attestation step in a test workflow in my fork. The workflow copied the log-collector image of a publish from main to ghcr.io/xrfxlp/nvsentinel/log-collector, and added a statement to .openvex.json that a vulnerability in the apt package of the image does not affect it. Then it ran sbom-and-attest on the copy and checked these:

  • The download command in SECURITY.md verified the attestation, and the downloaded document was the same as .openvex.json.

  • Without the document, Grype and Trivy reported the vulnerability in apt and in libapt-pkg7.0. With it, both reported it only in libapt-pkg7.0, which the statement does not cover.

  • Trivy got the same result with --vex oci, where it finds the attestation in the registry by itself.
  • The copy still has the digest of the original image, sha256:56b7a976…, so the attestations did not change the image. cosign tree lists them next to the image:

    📦 Supply Chain Security Related artifacts for an image: ghcr.io/xrfxlp/nvsentinel/log-collector@sha256:56b7a976426e9e80e8e314a0902f93dbca74b6a7f31b99c8269c23456b1de4f6
    └── 🔗 https://openvex.dev/ns artifacts via OCI referrer: ghcr.io/xrfxlp/nvsentinel/log-collector@sha256:d09116ccfe7c9e67e0c730b9d2c2a2a5d233182efe09d82beb667158fb84f819
    └── 🔗 https://slsa.dev/provenance/v1 artifacts via OCI referrer: ghcr.io/xrfxlp/nvsentinel/log-collector@sha256:9b3462fe5c8c9292a4102dfc56d4f310e970b30837136c67dcb22f9f15c0c587
    └── 🔗 https://cyclonedx.org/bom artifacts via OCI referrer: ghcr.io/xrfxlp/nvsentinel/log-collector@sha256:1fbd5f07eac782bff1c65119f42b7aaaf66004e2c763ec61c67e27c657cdf4c6
    

    The release scan runs only on a tag push in this repository, so it first runs at the next release.

  • Tests pass locally

  • Manual testing completed

  • No breaking changes (or documented)
  • 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
  • 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

    New Features
    Release container images are scanned for vulnerabilities when published, with findings associated with the release tag. Scans do not block releases.
    Image supply-chain artifacts now include OpenVEX attestations, which can be used alongside current main statements when scanning images.
    Image scans support release tags and can be called by other workflows.
    Documentation
    Updated scanning guidance to distinguish daily scans, weekly scans of the latest main images, and release scans.
    * Clarified that vulnerability guidance focuses on critical and high findings, and added instructions for retrieving and using OpenVEX attestations.
    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 650 lines (+487 / -163) across 8 files Reviewer: KaivalyaMDabhadkar Review duration: 1070m
    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 #2379"
    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%