Skip to content

chore(build): digest-pin base images + SHA-pin workflow actions (#4203)#24

Merged
wrkode merged 1 commit into
mainfrom
chore/digest-pin-supply-chain
Jun 30, 2026
Merged

chore(build): digest-pin base images + SHA-pin workflow actions (#4203)#24
wrkode merged 1 commit into
mainfrom
chore/digest-pin-supply-chain

Conversation

@wrkode

@wrkode wrkode commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

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

  • Dockerfile + Makefile — digest-pin all base images as
    image:tag@sha256:<digest> (tag kept for readability): hadron, kairos-init,
    golang (static + alpine builders), and alpine. The pinned digest is the
    multi-arch index digest, so cross-arch builds still resolve the correct
    per-platform 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 (this closes the override path).
  • ci.yml + release.yml — SHA-pin the remaining GitHub Actions (checkout,
    setup-go, setup-buildx-action, login-action, golangci-lint-action) with a
    # vN comment, matching the already-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 the Dockerfile and the Makefile, or is not
    digest-pinned, so a two-site re-pin mistake cannot land silently.

Validation

  • make verify-pins passes (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/lint all green.
  • Confirmed no make image/make e2e-node-image invocation in CI/release passes a
    floating KAIROS_*_IMAGE override; the e2e-node BASE_IMAGE is our own built
    image (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):

  • The crane binary download stays version-tag + sha256-checksum-verified
    (the same integrity model as the kubeadm/kubectl/crictl/runc/CNI downloads).
  • Digest-pinning the control-plane image crane pull in the image-bundler is
    the deferred ADR-16 P5 item (it needs per-image digest resolution from
    kubeadm config images list) and remains the last tracked floating external ref
    in the build.

…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>

@wrkode wrkode left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wrkode
wrkode merged commit 5def835 into main Jun 30, 2026
9 checks passed
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.

provider-kubernetes: digest-pin base images and workflow actions

1 participant