harden(cerro-torre): replace flaky cgr.dev runtime base with glibc-matched ubuntu:24.04#45
Merged
Merged
Conversation
The runtime stage used cgr.dev/chainguard/wolfi-base:latest, whose free tier is unpinnable (:latest only) and frequently 403s from restricted networks, making the non-blocking smoke build flaky. Switch the runtime base to ubuntu:24.04 — the same base (and glibc 2.39) as the ada-builder stage. This is the only safe choice: ct/cerro-sign are dynamically linked against the builder's glibc, so a musl base (alpine/wolfi-static) cannot run them and an older-glibc base (debian-slim = 2.36) breaks on the GLIBC_2.3x symbols GNAT 15 emits. ubuntu:24.04 is already pulled for the builder, so no extra base image is fetched. libcurl runtime + CA roots come from apt (libcurl4, ca-certificates); the non-root user is created with Debian useradd syntax. Verified locally: full multi-stage build succeeds and the final image runs `ct --version` as the non-root cerro user with the glibc binary resolving correctly. https://claude.ai/code/session_01744NnsooPgw5S6JK11fAaw
|
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.



Summary
Hardens cerro-torre's container runtime stage by removing the
dependency on
cgr.dev/chainguard/wolfi-base:latest, which made thenon-blocking
container-stack-smokecanary flaky::latestonly — no versiontags, digests rotate out), and
here), so the runtime stage could not be pulled at all.
Change
Runtime base →
ubuntu:24.04(the same base, and glibc 2.39, as theada-builderstage). This is the only safe target:ct(GNAT) andcerro-sign(Rust) are dynamically linked against thebuilder's glibc. A musl base (alpine / wolfi-static) cannot run
them; an older-glibc base (
debian:stable-slim= glibc 2.36) breakson the
GLIBC_2.3xsymbols GNAT 15 emits. Matching the builder's libcis required for the artefacts to run.
ubuntu:24.04is already pulled for the builder stage, so no additionalbase image is fetched.
libcurl4,ca-certificates); the non-rootcerrouser is created with Debiangroupadd/useraddsyntax.Trade-off: the runtime image is larger than wolfi-base (~139 MB), accepted
in exchange for a reliably-pullable, libc-correct, pinnable-by-policy base
and a green smoke canary.
Verification (local, real containers)
Built the full multi-stage image (ada-builder + hardened runtime). The
sh.rustup.rs403 in this sandbox blocks the Rustcerro-signbuild, socerro-signwas stubbed for the local check only (the runtime-basechange is what's under test; the
cerro-signCOPY is unchanged andCI-exercised). Results:
ada-builder:alr -n build→Success: Build finished successfullycgr.devno longer referenceddocker run cerro-torre:rt --version→Cerro Torre 0.1.0-alphauid=999(cerro) gid=999(cerro)(non-root preserved)ctresolves and runs in theubuntu:24.04runtimeTest plan
container-stack-smokebuildscerro-torre/Containerfilewithdocker + podman (no
cgr.devfetch;sh.rustup.rsreachable onGitHub runners so
cerro-signbuilds for real)ct --versionas non-roothttps://claude.ai/code/session_01744NnsooPgw5S6JK11fAaw
Generated by Claude Code