chore(build): digest-pin base images + SHA-pin workflow actions (#4203)#24
Merged
Conversation
…iros#4203) Supply-chain hardening: make the image build and CI reproducible and tamper-evident by content-addressing every external dependency. - Dockerfile + Makefile: digest-pin all base images (hadron, kairos-init, golang static+alpine builders, alpine) as image:tag@sha256:<index-digest>. The multi-arch INDEX digest is used so cross-arch builds still resolve the right manifest. KAIROS_BASE_IMAGE/KAIROS_INIT_IMAGE are pinned in BOTH the Dockerfile ARG defaults and the Makefile defaults, since CI's make image passes the Makefile value (closing the override path). - ci.yml + release.yml: SHA-pin the remaining GitHub Actions (checkout, setup-go, setup-buildx, login, golangci-lint) with a # vN comment, matching the already SHA-pinned attest/sbom actions. No floating action tags remain. - make verify-pins (wired into the CI gates job): fails loud if a base-image digest drifts between Dockerfile and Makefile, or is not digest-pinned, so a two-site re-pin mistake cannot land silently. Reviewed by security-architect (gate passed, no blockers). The crane download stays version+sha256-verified (consistent with the other binary downloads); the control-plane image crane pull digest-pinning remains tracked as ADR-16 P5, explicitly out of scope here. Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: William Rizzo <william.rizzo@gmail.com>
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
Supply-chain hardening: make the image build and CI reproducible and
tamper-evident by content-addressing every external dependency.
Closes kairos-io/kairos#4203.
How
image:tag@sha256:<digest>(tag kept for readability):hadron,kairos-init,golang(static + alpine builders), andalpine. The pinned digest is themulti-arch index digest, so cross-arch builds still resolve the correct
per-platform manifest.
KAIROS_BASE_IMAGE/KAIROS_INIT_IMAGEare pinned inboth the Dockerfile ARG defaults and the Makefile defaults, since CI's
make imagepasses the Makefile value (this closes the override path).checkout,setup-go,setup-buildx-action,login-action,golangci-lint-action) with a# vNcomment, matching the already-pinned attest/sbom actions. No floatingaction tags remain.
make verify-pins(wired into the CIgatesjob) — fails loud if abase-image digest drifts between the Dockerfile and the Makefile, or is not
digest-pinned, so a two-site re-pin mistake cannot land silently.
Validation
make verify-pinspasses (and was negative-tested: it fails on injected drift).make image(cached) builds green with the digest pins; workflow YAML parses;go build/test/vet/lintall green.make image/make e2e-node-imageinvocation in CI/release passes afloating
KAIROS_*_IMAGEoverride; the e2e-nodeBASE_IMAGEis our own builtimage (nothing external).
Security review
security-architect reviewed and passed the gate (no blockers): index-vs-arch
digest choice is correct, the Makefile/Dockerfile override path is closed, and
action SHA-pinning is now 100%. Known, tracked residuals (explicitly out of scope
for #4203, called out so reviewers don't re-flag them):
cranebinary download stays version-tag + sha256-checksum-verified(the same integrity model as the kubeadm/kubectl/crictl/runc/CNI downloads).
crane pullin the image-bundler isthe deferred ADR-16 P5 item (it needs per-image digest resolution from
kubeadm config images list) and remains the last tracked floating external refin the build.