Skip to content

release: build the controller image with verifiable provenance (APT-1270) - #29

Draft
reoring wants to merge 1 commit into
mainfrom
apt1270/attested-release
Draft

reoring wants to merge 1 commit into
mainfrom
apt1270/attested-release

Conversation

@reoring

@reoring reoring commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

For the owner

  1. What changes: APT-1270, slice S1′ (design in Nexus features/security/reviewed-import-image-provenance/design.md, sections 3 R2 and 5). The controller release image gets verifiable build evidence: who built it, from which commit, in which workflow run. Today's ghcr.io/appthrust/dns-api v0.4.8 has none.
  2. Visible on arrival (merge to main): nothing is signed and no release is cut. main keeps producing the :edge image and the 0.0.0-edge chart as before, now from a job that holds no signing permission. Manual workflow_dispatch of this workflow is removed.
  3. Visible on the next v*.*.* tag: the release image is built once for linux/amd64 and linux/arm64, pushed, and only then signed and tagged. It carries a signed SLSA provenance statement for the index and for each platform image, and a keyless signature on the index, all from that one run.
  4. To decide: (a) merge; (b) which commit the next release is cut from. main is one commit past v0.4.8 (bcd96ab, APT-822). The platform slot is replaced only by a later, separately approved platform change (slice S3).
  5. Independent review: security (Claude Opus) and function (Claude Fable), both "may be pushed", no findings to fix. Writer: deep-worker (GPT-6.2 Astra). Draft until the owner of this repository has looked.
  6. Rollback: revert. An already published release keeps its evidence.

Changes

  • .github/workflows/controller-release.yml
    • release-image: runs only for a pushed tag (push, not deleted, refs/tags/v…). It is the only job with id-token and attestations permission; the workflow default is no permissions.
    • One build per release with a digest-pinned BuildKit and Dockerfile frontend, no imported cache, no in-index attestations; output to a local OCI layout, checked to be an index with exactly the two platform images.
    • Copy to GHCR by digest with digests preserved; the pushed index is compared byte for byte with the local one.
    • actions/attest-build-provenance (pinned by commit) for the index and each child, by digest; cosign (digest-pinned image) signs the index. Release tags are applied last, so a failed run leaves no release tag.
    • edge-image: the previous main behaviour (:edge), without signing permission.
    • push-helm-chart: unchanged behaviour; actions pinned by commit.
  • Dockerfile: builder and runtime base images pinned by digest (golang:1.26.2, gcr.io/distroless/static:nonroot).

Not in this change

  • Both this repository and the CAPA fork give every workflow a write token by default; other workflows here can therefore move tags in the same package (they cannot change image content or produce a valid signature). Switching the default to read is a repository setting and is recommended.
  • Do not re-run a tag's workflow after its digest has been adopted: a re-run produces a new digest and moves the release tags.

Verification

  • actionlint clean; one local linux/amd64 build with the pinned inputs succeeded.
  • The same construction ran for the CAPA fork on 2026-11-18 (run 44292268130): provenance for the index and both children and the builder signature verified from the registry, and wrong commit, wrong ref and wrong workflow were refused.
  • First real evidence for this repository exists only after the next release tag; it is verified before the platform adopts the digest.

…270)

- controller-release.yml: the release image is built, attested and signed only
  in runs started by a v*.*.* tag push; main pushes keep producing :edge from a
  job without signing permissions; workflow_dispatch is removed
- one multi-platform build per release to a local OCI layout, copied to GHCR
  with digests preserved and compared byte for byte; the index has exactly the
  linux/amd64 and linux/arm64 children and no in-index attestation manifests
- signed SLSA provenance for the index and for each child, and a keyless
  signature on the index; release tags are applied after signing
- builder, base, BuildKit, Dockerfile frontend and the signing tool are pinned
  by digest; actions by commit; no imported build cache in the release build

This branch has not been deployed

No deployments
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