Skip to content

Scan the newest release image every day - #2598

Open
kmcginnes wants to merge 2 commits into
mainfrom
scan-release-image
Open

kmcginnes wants to merge 2 commits into
mainfrom
scan-release-image

Conversation

@kmcginnes

@kmcginnes kmcginnes commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The daily image audit scans only latest-SNAPSHOT, so the published release image is never scanned after it ships. A new release-image-audit job scans it every day and on manual runs. The snapshot job is unchanged.

release-image-audit
  resolve the highest numeric tag   # same jq sort as the SageMaker notebook lifecycle script
  compare digests: latest, <version>, sagemaker-<version>
  scan latest, CRITICAL only → SARIF, category docker-image-scan-latest
  if <version> ≠ latest
    scan <version>, CRITICAL only → SARIF, category docker-image-scan-newest-version
  fail on fixable CRITICAL OS package findings in latest
  fail if the tags point to different images, naming them
  • A fixable CRITICAL finding is what calls for a patch release, so the release scans report and fail on CRITICAL only. The snapshot scan keeps every severity. limit-severities-for-sarif is set, because the action otherwise writes every severity to SARIF.
  • Each image gets its own SARIF category, so a snapshot rebuild no longer closes the release image's results.
  • TRIVY_IMAGE_SRC=remote makes Trivy pull from the registry rather than any local copy.
  • The job skips workflow_run. That trigger fires after every publish, and snapshot publishes don't move the release tags. The daily schedule picks up a new release within a day, and a manual run picks it up sooner.

Evidence

Verified live: ran the job's resolve script against ECR Public (read-only). It picked 3.3.2, and latest, 3.3.2, and sagemaker-3.3.2 share one digest. With one digest swapped for another tag's, the mismatch outputs turned true, and a missing tag stopped the step. Ran Trivy with --image-src remote against latest at the CRITICAL gate's settings, and it passes today. actionlint, with shellcheck, passes.

Merge Danger

Door: two-way

Impact: CI-only. It adds a daily job that fails when the newest release has a fixable CRITICAL finding.

Related


🤖 Written by an AI agent on my behalf.

@kmcginnes
kmcginnes marked this pull request as ready for review November 13, 2026 23:38
A fixable CRITICAL finding is what calls for a patch release, so the release image scan reports and fails on CRITICAL only. The snapshot scan keeps every severity.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Scan the newest release image every day

1 participant