Repository navigation
Read the staged provenance from its sigstore bundle - #4549
Merged
kubernetes-prow[bot] merged 1 commit intoOct 13, 2026
Merged
kubernetes-prow[bot] merged 1 commit into
kubernetes-prow[bot] merged 1 commit into
Conversation
saschagrunert
force-pushed
the
fix-staged-provenance-bundle
branch
from
October 7, 2026 06:50
b57b6cc to
9f8a0bb
Compare
Member
Author
|
@kubernetes/release-engineering PTAL |
This was referenced Oct 7, 2026
Closed
Closed
Since the stage run signs its provenance in place, the staged provenance.json is a sigstore bundle, but krel release still parsed it as a bare in-toto statement. The parse failed with an unknown mediaType field, CheckProvenance only logs that as a warning, so the final attestation was never generated, and the copy to the release bucket skipped the missing file. Releases since then publish no provenance.json. The provenance checker now reads the statement from the DSSE envelope of the bundle, and keeps reading bare statements of builds staged before. The final attestation no longer clones the predicate with bom, which only reads SLSA v0.1 and v0.2 predicates and declares v0.2 for its statements, while the stage run writes SLSA v1 since the port to it. It takes its subjects from the release SBOM as before and the predicate type and predicate of the stage statement. The bundle signature is not verified yet. Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
saschagrunert
force-pushed
the
fix-staged-provenance-bundle
branch
from
October 13, 2026 06:18
9f8a0bb to
f896a80
Compare
Contributor
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: saschagrunert, xmudrii The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
1 of 13 tasks
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 type of PR is this?
/kind bug
/kind regression
What this PR does / why we need it:
Since #4507 the stage run signs its provenance in place, so the staged
provenance.jsonis a sigstore bundle, and since #4502 its predicate is SLSA v1.krel releasehandled neither:processAttestationparsed the bundle as a bare in-toto statement and failed withunknown field "mediaType".CheckProvenanceonly logs that as a warning and returns beforeGenerateFinalAttestation.So the releases since then publish no
provenance.json: https://dl.k8s.io/release/v1.37.1/provenance.json, v1.36.5, v1.35.9 and v1.34.12 return 404, while v1.37.0 and older have one. Behind the parse error,GenerateFinalAttestationwould have failed too: bom'sClonePredicateonly reads SLSA v0.1 and v0.2 predicates (unsupported predicate type: https://slsa.dev/provenance/v1), and bom's statements declare v0.2.The provenance checker now reads the statement from the DSSE envelope of the bundle, sharing the bundle check with
pkg/attestation, and keeps reading bare statements of builds staged before. The final attestation no longer uses bom for the predicate: it takes its subjects from the release SBOM as before, and the predicate type and predicate from the stage statement. The bundle signature is not verified yet, a TODO names thekrel-stagingidentity to check.Which issue(s) this PR fixes:
None
Special notes for your reviewer:
With the default tool ref,
hack/get-kreldownloads the latest kubernetes/release release instead of building krel, so this reaches the release builds with the next kubernetes/release release. The four affected releases are not backfilled. #4550 signs the final provenance on top of this.Tests cover both formats in the provenance check, malformed bundles, and the final attestation from a release SBOM written like
GenerateVersionArtifactsBOMdoes (with bom v0.8.0) and a v1 stage statement, bare and signed. The final attestation test fails on the previous state with theunsupported predicate typeerror. This doesn't touch the artifacts SBOM generation of #4548.Does this PR introduce a user-facing change?