Skip to content

ci: run image scans daily instead of on every push - #3496

Open
timflannagan wants to merge 1 commit into
kagent-dev:mainfrom
timflannagan:cleanup/image-scan-daily
Open

timflannagan wants to merge 1 commit into
kagent-dev:mainfrom
timflannagan:cleanup/image-scan-daily

Conversation

@timflannagan

Copy link
Copy Markdown
Contributor

Description

The image scan workflow rebuilds and scans all six runtime images on every
push to main and release/**. Scan findings depend on the vulnerability
database and upstream base images, not on the commit being scanned, so a
push-triggered run mostly repeats the previous result. When a new fixable
CVE is published, every subsequent merge reports a failure that the merge
did not cause and cannot fix. Between Oct 26 and Oct 30, nearly every push
run on main failed on the same ui image finding until a dependency fix
landed. That makes the post-merge signal noisy and non-actionable, and the
paths-ignore filter on markdown files only trims a small part of the cost.

This change drops the push trigger and runs the scan daily on main
instead, keeping workflow_dispatch for on-demand runs, such as confirming a
CVE fix after it merges. It also fixes the schedule comment: 0 0 * * 0
runs on Sunday, not Monday.

Additional Notes

A scheduled failure is easier to ignore than a red check on a merge commit,
so this trades visibility for signal quality. In practice, the post-merge
failures were already being ignored because they could not be attributed to a
change. A daily run gives one clear signal per day that can be routed to an
owner or alert instead of being spread across unrelated merges.

release/** branches lose per-push scanning because scheduled workflows run
only on the default branch. Release coverage is better handled by scanning
published images at release time, which can follow separately.

The image scan workflow rebuilt and scanned all six runtime images on
every push to main and release branches. Scan findings depend on the
vulnerability database and upstream base images, not on the commit being
scanned, so push-triggered runs mostly repeated the previous result. When
a new fixable CVE was published, every later merge reported a failure it
did not cause and could not fix.

We now scan daily on the default branch and keep workflow_dispatch for
on-demand runs. This also corrects the schedule comment, since the old
cron ran on Sunday rather than Monday.

Signed-off-by: timflannagan <timflannagan@gmail.com>
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.

1 participant