UID2-7390: add optional image_ref to shared vuln-scan notify workflow#243
Closed
swibi-ttd wants to merge 1 commit into
Closed
UID2-7390: add optional image_ref to shared vuln-scan notify workflow#243swibi-ttd wants to merge 1 commit into
swibi-ttd wants to merge 1 commit into
Conversation
The scheduled vulnerability-scan-failure-notify workflow only supported two modes: fs (scan repo files) and image (mvn package -> docker build a single default Dockerfile -> scan the freshly-built image). Neither can re-scan an already-published image for newly-disclosed CVEs, and the image mode assumes a Maven project with one Dockerfile. Add an optional `image_ref` input. When set, the JDK/Maven/Docker-build steps are skipped and that published image is scanned directly. When empty (the default), behaviour is unchanged, so existing image-mode callers (uid2-admin, uid2-core, uid2-e2e, uid2-operator, uid2-optout, uid2-snowflake, uid2-validator) are unaffected. This lets repos with non-Maven builds or multiple images (e.g. uid2-self-serve-portal's Keycloak image) schedule recurring scans of their released images, and is reusable for scanning pinned third-party images such as the EKS addon images in UID2-7353. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Closing in favor of a portal-local build-then-scan job (UID2-7390). For the Self-Serve Portal we want to build the Keycloak/migration images fresh from their Dockerfiles each scheduled run and scan the freshly-built image — consistent with how the Java repos' image-mode scan works (mvn package → docker build → scan), rather than scanning a mutable published :latest tag. The |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds an optional
image_refinput toshared-vulnerability-scan-failure-notify.yaml. When set, the workflow skips the JDK /mvn package/docker buildsteps and scans that already-published image reference directly. When empty (the default), behaviour is unchanged.Why
The scheduled notify workflow had two modes:
fs— scans repo files (npm/maven manifests). Blind to the contents of a base image (e.g. the Java JARs inside a Keycloak base image).image—mvn package→docker buildof a single defaultDockerfile→ scan the freshly-built image. Assumes a Maven project with one Dockerfile, and only ever scans a just-built image.Neither can re-scan an already-released image over time for CVEs disclosed after it was built. That's the gap behind UID2-7390 (the Self-Serve Portal's published Keycloak image accumulated 14 HIGH auth CVEs — incl. CVE-2026-4282 — that no scheduled scan ever surfaced, because the portal is a Node app with three differently-named Dockerfiles and runs the notify in
fsmode).How it stays backward-compatible
image_refdefaults to''. The four build-from-source steps are now gated oninputs.scan_type == 'image' && inputs.image_ref == '', and the scan step resolvesimage_refto the supplied value or the locally-built tag:The 7 repos that currently call this workflow in image mode (
uid2-admin,uid2-core,uid2-e2e,uid2-operator,uid2-optout,uid2-snowflake,uid2-validator) pass noimage_ref, so they run the exact same build-from-source path as today. No changes required in those repos.Notes
Consumer PR
uid2-self-serve-portal will call this with
scan_type: image+image_reffor its three published images (separate PR). Requiresv3to be re-tagged to this commit after merge.🤖 Generated with Claude Code