Skip to content

ci: rebuild the runtime stage so OS security fixes reach the image - #20

Merged
mojtaba-py-code merged 1 commit into
mainfrom
ci/fresh-runtime-layer
Sep 30, 2026
Merged

mojtaba-py-code merged 1 commit into
mainfrom
ci/fresh-runtime-layer

Conversation

@mojtaba-py-code

Copy link
Copy Markdown
Owner

The image scan (Grype, fail on fixable High/Critical) failed on main: OpenSSL in the runtime image is libssl3 3.0.20-1~deb12u2, with one Critical and three High advisories fixed in 3.0.22-1~deb12u1.

The runtime stage already runs apt-get upgrade for exactly this reason, but the build restores layers from the GitHub Actions cache. That layer was replayed from before the fix existed, so the upgrade never ran again. The pinned python:3.14-slim-bookworm digest has not been rebuilt upstream yet, so bumping it is not an option.

This change excludes the runtime stage from the cache (no-cache-filters: runtime). The builder stage, where the wheels are compiled, stays cached.

Verified with a manual run on this branch: all CI jobs pass, including the image scan, and so does the security workflow.

🤖 Generated with Claude Code

The image scan failed on a fixable Critical and three High findings in
OpenSSL (libssl3 3.0.20-1~deb12u2, fixed in 3.0.22-1~deb12u1). The
runtime stage already runs `apt-get upgrade` for exactly this reason.
But the build restores layers from the GitHub Actions cache, so that layer
was replayed from before the fix existed, and the upgrade never ran again.

The pinned base image has not been rebuilt upstream yet, so bumping its
digest is not an option. Exclude the runtime stage from the cache
(`no-cache-filters: runtime`). The builder stage, where the expensive
wheel builds happen, stays cached.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mojtaba-py-code
mojtaba-py-code merged commit 98f5307 into main Sep 30, 2026
30 checks passed
@mojtaba-py-code
mojtaba-py-code deleted the ci/fresh-runtime-layer branch September 30, 2026 14:55
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