Skip to content

Commit 831f037

Browse files
wrkodeclaude
andcommitted
fix(release): attest bundled control-plane images as a custom predicate (ADR-16 P5)
The v0.3.0 release failed at 'Attest bundled control-plane image SBOM': actions/attest-sbom rejected the hand-rolled CycloneDX with 'Unsupported SBOM format' -- its SBOM-format detector is stricter than the CycloneDX spec (the doc validates fine under cyclonedx-cli). Rather than chase that detector's quirks, attest the baked-in images.lock DIRECTLY as a custom in-toto predicate via generic actions/attest: images.lock IS the authoritative ref->digest->verified/verifyReason record, and a generic predicate bypasses SBOM-format detection entirely -- more robust and future-proof, and it still records exactly which control-plane images (by digest) the release baked and at what trust level (B5 intent preserved). - release.yml: replace the CycloneDX-generate + attest-sbom steps with an extract-images.lock step + actions/attest@v2 (predicate-type https://kairos.io/attestations/bundled-control-plane-images/v1, predicate-path images.lock). Action SHA-pinned (# v2), consistent with #4203. - Remove build/gen-bundled-sbom.py (no longer used). The image + binary SBOM attestations (syft-generated CycloneDX) are unchanged -- those pass the detector and are proven since v0.2.2; only the hand-rolled bundled SBOM tripped it. Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: William Rizzo <william.rizzo@gmail.com>
1 parent 7321e50 commit 831f037

2 files changed

Lines changed: 14 additions & 80 deletions

File tree

.github/workflows/release.yml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -190,23 +190,27 @@ jobs:
190190
push-to-registry: true
191191

192192
# ADR-16 P5: attest the pre-bundled control-plane images by DIGEST, including
193-
# whether each was upstream-signature-verified at build (from the baked-in
194-
# images.lock). This records exactly what air-gap content the released image
195-
# baked and at what trust level (cosign-verified vs digest-pinned-only).
196-
- name: Generate bundled control-plane image SBOM (CycloneDX)
193+
# whether each was upstream-signature-verified at build. We attest the
194+
# baked-in images.lock DIRECTLY as a custom in-toto predicate (not an SBOM):
195+
# images.lock IS the authoritative ref->digest->verified/verifyReason record,
196+
# and a generic predicate avoids actions/attest-sbom's SBOM-format detector
197+
# (which rejects a compliant hand-rolled CycloneDX) -- more robust and
198+
# future-proof. `gh attestation verify --predicate-type <type>` selects it.
199+
- name: Extract bundled control-plane image lockfile
197200
run: |
198201
set -euo pipefail
199-
img="${{ steps.build.outputs.image }}@${{ steps.build.outputs.digest }}"
200-
docker run --rm --entrypoint cat "$img" \
202+
docker run --rm --entrypoint cat \
203+
"${{ steps.build.outputs.image }}@${{ steps.build.outputs.digest }}" \
201204
/opt/provider-kubernetes/images/images.lock > images.lock
202-
python3 build/gen-bundled-sbom.py images.lock bundled-images.cdx.json
205+
test -s images.lock
203206
204-
- name: Attest bundled control-plane image SBOM
205-
uses: actions/attest-sbom@c604332985a26aa8cf1bdc465b92731239ec6b9e # v4.1.0
207+
- name: Attest bundled control-plane images
208+
uses: actions/attest@ce27ba3b4a9a139d9a20a4a07d69fabb52f1e5bc # v2
206209
with:
207210
subject-name: ${{ steps.build.outputs.image }}
208211
subject-digest: ${{ steps.build.outputs.digest }}
209-
sbom-path: bundled-images.cdx.json
212+
predicate-type: https://kairos.io/attestations/bundled-control-plane-images/v1
213+
predicate-path: images.lock
210214
push-to-registry: true
211215

212216
# R-4: prove the attestation is real before a tester relies on it. A broken

build/gen-bundled-sbom.py

Lines changed: 0 additions & 70 deletions
This file was deleted.

0 commit comments

Comments
 (0)