feat(sbom, attest): sign multi-platform SBOMs, verify every platform - #262
Draft
reyreavman wants to merge 2 commits into
Draft
feat(sbom, attest): sign multi-platform SBOMs, verify every platform#262reyreavman wants to merge 2 commits into
reyreavman wants to merge 2 commits into
Conversation
Multi-platform builds with --sign-key used to publish unsigned SBOMs with a "multi-platform SBOM signing is not yet supported" warning: the per-platform SBOM was dishonest about its platform (C12), so signing it would certify a false statement. Per-platform SBOM generation fixed that, so drop the single-platform capability guard and sign every platform's SBOM with the shared signer; a signing failure of any platform fails the build fail-fast. Teach werf attest verify to verify a whole image index: without --platform every platform manifest is verified and classified (verified, missing, unsigned legacy bare-DSSE, invalid signature), a per-platform result table is printed and the command succeeds only if every platform carries a valid signed attestation. --platform narrows verification to one platform; non-index references behave as before, including the raw predicate dump. ListIndexPlatforms accepts optional remote options following the PullFallbackIndex convention, which also makes the verification path unit testable against an in-memory registry. Signed-off-by: Radmir Khurum <radmir.khurum@flant.com>
Record the 018-sbom-multiplatform-signing feature: specification with clarifications, implementation plan, research, data model, CLI and build contracts, quickstart, task list with execution results, and the stock cosign v3.0.6 offline verification transcript (SC-002). Signed-off-by: Radmir Khurum <radmir.khurum@flant.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.
Summary
Multi-platform builds with
--sign-keynow publish a signed Sigstore Bundle per platform manifest instead of unsigned SBOMs with a "multi-platform SBOM signing is not yet supported" warning.werf attest verifypointed at a multi-platform index without--platformnow verifies the attestations of every platform in one command and succeeds only if all of them are valid, so a release gate can no longer pass while one architecture ships unattested.What
Build signing
--sign-key/--sign-certset, every platform of a multi-platform image gets its own signed Sigstore Bundle v0.3 attestation, same key and artifact form as single-platform; the "multi-platform SBOM signing is not yet supported" warning is gone.verify-attestation --new-bundle-format --insecure-ignore-tlog --keyverifies both platform attestations of a werf-built two-platform image fully offline (cosign is not installed in CI; the same assertion runs in-process there).WERF_EXPERIMENTAL_STAPEL_ARM=1(stapel+Docker backend); the new suite is the first actively running multi-platform SBOM e2e — the 016 suites remain XEntry pending Buildah SBOM support.attest verify on an index
--platformverifies ALL platforms: prints a PLATFORM/DIGEST/STATUS table and exits non-zero unless every platform isverified(previously this errored with "image is a multi-platform index, platform required").missing(no attestation),unsigned(legacy bare-DSSE, message suggests rebuilding with--sign-key),invalid(wrong key, tampered payload or predicate type mismatch); the aggregate error reads "attestation verification failed for N of M platforms".unknown/unknownplatform (e.g. buildx attestation manifests) are excluded from verification.--platformnarrows verification to one platform; non-index references and the raw predicate dump to stdout are unchanged.attest getandsbom getdeliberately keep the strict behavior: an index reference without--platformstill fails listing available platforms.--platformflag help text and the command's long description are updated; theattesttree stays hidden, so no CLI reference pages change.Why
SBOM signing (016-sbom-signing) deliberately blocked multi-platform builds behind a single capability predicate because the multi-platform SBOM lied about its platform — signing it would certify a false statement. Per-platform SBOM generation (016-sbom-multiplatform-per-platform) fixed that, leaving the guard as dead weight that silently downgraded signed pipelines to unsigned artifacts. On the verification side, requiring
--platformmade "verify the image" a per-architecture chore where forgetting one platform produced a false green; verifying all platforms by default matches how the artifacts are now produced — one key, N attestations. An index-level aggregate attestation was rejected: it would reintroduce a platform-ambiguous artifact and nothing may be attached to the index digest.Spec:
specs/018-sbom-multiplatform-signing/.