Skip to content

Read the staged provenance from its sigstore bundle - #4549

Merged
kubernetes-prow[bot] merged 1 commit into
kubernetes:masterfrom
saschagrunert:fix-staged-provenance-bundle
Oct 13, 2026
Merged

kubernetes-prow[bot] merged 1 commit into
kubernetes:masterfrom
saschagrunert:fix-staged-provenance-bundle

Conversation

@saschagrunert

@saschagrunert saschagrunert commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

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.json is a sigstore bundle, and since #4502 its predicate is SLSA v1. krel release handled neither:

  1. processAttestation parsed the bundle as a bare in-toto statement and failed with unknown field "mediaType".
  2. CheckProvenance only logs that as a warning and returns before GenerateFinalAttestation.
  3. The copy of the final attestation to the release bucket skips the missing file.

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, GenerateFinalAttestation would have failed too: bom's ClonePredicate only 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 the krel-staging identity to check.

Which issue(s) this PR fixes:

None

Special notes for your reviewer:

With the default tool ref, hack/get-krel downloads 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 GenerateVersionArtifactsBOM does (with bom v0.8.0) and a v1 stage statement, bare and signed. The final attestation test fails on the previous state with the unsupported predicate type error. This doesn't touch the artifacts SBOM generation of #4548.

Does this PR introduce a user-facing change?

Fixed `krel release` not publishing `provenance.json` since the stage provenance is a signed SLSA v1 sigstore bundle.

@kubernetes-prow kubernetes-prow Bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/bug Categorizes issue or PR as related to a bug. kind/regression Categorizes issue or PR as related to a regression from a prior release. needs-priority cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Oct 7, 2026
@kubernetes-prow
kubernetes-prow Bot requested review from jimangel and jrsapi October 7, 2026 06:24
@kubernetes-prow kubernetes-prow Bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. area/release-eng Issues or PRs related to the Release Engineering subproject sig/release Categorizes an issue or PR as relevant to SIG Release. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 7, 2026
@saschagrunert
saschagrunert force-pushed the fix-staged-provenance-bundle branch from b57b6cc to 9f8a0bb Compare October 7, 2026 06:50
@saschagrunert saschagrunert changed the title WIP: Read the staged provenance from its sigstore bundle Read the staged provenance from its sigstore bundle Oct 7, 2026
@kubernetes-prow kubernetes-prow Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 7, 2026
@saschagrunert

Copy link
Copy Markdown
Member Author

@kubernetes/release-engineering PTAL

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
saschagrunert force-pushed the fix-staged-provenance-bundle branch from 9f8a0bb to f896a80 Compare October 13, 2026 06:18
@kubernetes-prow kubernetes-prow Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 13, 2026

@xmudrii xmudrii left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/lgtm
/approve

@kubernetes-prow kubernetes-prow Bot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 13, 2026
@kubernetes-prow

Copy link
Copy Markdown
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

Details Needs approval from an approver in each of these files:
  • OWNERS [saschagrunert,xmudrii]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubernetes-prow
kubernetes-prow Bot merged commit 11e1824 into kubernetes:master Oct 13, 2026
11 checks passed
@kubernetes-prow kubernetes-prow Bot added this to the v1.38 milestone Oct 13, 2026
@saschagrunert
saschagrunert deleted the fix-staged-provenance-bundle branch October 13, 2026 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/release-eng Issues or PRs related to the Release Engineering subproject cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. kind/regression Categorizes issue or PR as related to a regression from a prior release. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/release Categorizes an issue or PR as relevant to SIG Release. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants