← Back to Pull requests

Test the stage provenance check with a real signature #4604

Closed
unknown closed this pull request without merging on Nov 03, 2026 12:22 UTC
View on GitHub
unknown unknown commented on Nov 02, 2026 09:09 UTC
Author

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

Follow-up from the review of #4555: the tests of the stage provenance check replace the signature verification with a stub, so the path official releases take, the collector verifying the signature against the Sigstore trusted root and the SLSA verifier reading that verification, wasn't covered.

TestVerifyStageProvenanceSigned verifies the signed stage provenance of v1.37.1 (testdata/stage-provenance-v1.37.1.json, from stage/v1.37.0-19+b051586fb9ba74: SLSA v0.2, 451 subjects, signed as krel-staging) without a stub. It also checks that another source repository fails, and that zeroing one subject digest in the signed payload, with all other bytes unchanged, fails the transparency log and signature check; with the digest left as it is, the same bundle verifies.

Which issue(s) this PR fixes:

Part of #2616

Special notes for your reviewer:

The signer doesn't take a trusted root file for verification. It embeds a snapshot of the Sigstore trusted root and uses it offline for 90 days after the snapshot (2026-10-04 in the current signer, so until 2027-01-02 unless the signer gets bumped), which is how the test runs without network today (checked with unshare -rn, about 20 ms). After that window the signer fetches the trusted root through TUF and caches it in $HOME/.sigstore/root, or falls back to the embedded copy when it can't reach TUF, so the test keeps passing, but it isn't hermetic then. Fully hermetic would need an option to pass a trusted root through the collector's envelope.Verify(), which is upstream work in policylabs/signer and collector.

This also means release jobs don't reach tuf-repo-cdn.sigstore.dev for the stage provenance check while the embedded root is fresh, which answers part of the TUF concern from the #4555 review.

Does this PR introduce a user-facing change?

``release-note
NONE
``

Diff: 244 lines (+183 / -61) across 3 files Reviewer: xmudrii Review duration: 1632m
All Vouch review confidence checks passed
Residual risk 0.15 = Change Risk (0.39) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.39 · 244 lines diff across 3 files
0.39
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.329
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #4604"
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: 38.8% (MEDIUM) · Higher = larger blast radius
38.8%
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.3% · Safe to merge
15.3%