← Back to Pull requests

Read the staged provenance from its sigstore bundle #4549

Closed
unknown closed this pull request without merging on Oct 13, 2026 09:54 UTC
View on GitHub
unknown unknown commented on Oct 07, 2026 06:24 UTC
Author

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?

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

Diff: 302 lines (+226 / -76) across 3 files Reviewer: xmudrii Review duration: 8849m
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 302 lines diff across 3 files
0.40
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
60%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.342
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #4549"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 60.5% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 40.1% (MEDIUM) · Higher = larger blast radius
40.1%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 60.5% · Lower = rushed or shallow review
60.5%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 15.8% · Safe to merge
15.8%