perf(ci-runner): bake grype + cve-gate so the gate stops being a container #91
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "perf/ci-runner-bake-gate"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Part 1 of 2. This bakes the binaries; #90 then deletes the container that used to run them. Merge this one first.
Why
Five consecutive releases failed in the CVE gate, for five different reasons:
docker cpinto a--read-onlyrootfs — refused by the daemon, shipped unsignedgate-imagepin naming a tag that was never builtclonerule that denied exactly what its comment said it allowedroot:root, unwritable by uid 65532Not one is about finding CVEs. Every one comes from running the scan inside a maximally hardened container reached through a remote dind daemon with no shared filesystem — a container that is, by design, extremely hard to get anything into or out of.
That hardening was never required by the gate. It was there because
cve-gatedoubles as the ADR-0006 worked example of a hardened image, and the two goals were fused into one artifact sitting on the critical path of every release.What this does
Copies both binaries out of that image. They're static Go, so they run unchanged on this base:
Pinned tag and digest, following
tauri-ci-runner's existing inter-image convention (ARG REGISTRY_WEBGRIP).cve-gateremains the ADR-0006 example — it's simply no longer in the hot path.What #90 can then delete
A docker pull per release, the seccomp profile invocation and its verifier, two cache volumes, the ownership helper container, the bootstrap escape hatch, the base64 env marshalling, the stdout marker protocol, and the retry loop. ~150 lines of action become ~20.
Honest caveat
cve-gate releases are currently unsigned — the gate couldn't sign itself while it was broken — so this pins an unsigned artifact. It's one we built, in our own registry, pinned by digest. That resolves the first time cve-gate releases through a working gate, and it's the reason to fix this ordering rather than live with it.
Regression guard, strengthened
The existing
command -v cosign && command -v syftcheck now also runsgrype versionand assertscve-gatereaches its own argument validation:That proves the binaries actually execute on this base — a
command -valone would pass on a binary that segfaults, which is exactly the class of thing that has been biting us.Verified
Branch
build-checkis the real test here: it does a fulldocker buildx buildof this Dockerfile, so a wrong digest or an incompatible binary fails on the branch rather than on main.