Repository navigation
fix(sigstore): retry GitHub attestations with TUF root - #10695
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Central YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThis PR centralizes Sigstore bundle verification around shared trust-root caching, adds GitHub embedded/TUF retry handling, changes workflow-mismatch errors to a distinct non-retryable variant, updates verification call sites, and adds tests for cache and retry behavior. ChangesSigstore Trust-Root Verification Refactor
Estimated code review effort: 4 (Complex) | ~45 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThis PR fixes GitHub attestation verification by adding a TUF-root retry path when the embedded GitHub root fails, while correctly blocking retries for signer-workflow mismatches. A new
Confidence Score: 5/5Safe to merge — the retry logic is well-guarded and the previously flagged string-prefix coupling has been replaced with a proper error variant. The change unifies three previously divergent trust-root selection paths, correctly gates TUF retries behind a typed WorkflowMismatch check rather than a fragile string prefix, and caches both roots lazily. The new unit tests cover every branch of the retry logic. No incorrect retry logic or trust-boundary widening was found. No files require special attention. Important Files Changed
Reviews (2): Last reviewed commit: "fix(sigstore): retry GitHub attestations..." | Re-trigger Greptile |
5e8985e to
0b74eb9
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 0b74eb9. Configure here.
0b74eb9 to
cea9397
Compare
Hyperfine Performance
|
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.6.14 x -- echo |
19.5 ± 2.5 | 17.4 | 35.6 | 1.00 |
mise x -- echo |
20.0 ± 1.6 | 18.0 | 46.4 | 1.03 ± 0.15 |
mise env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.6.14 env |
18.9 ± 0.9 | 17.2 | 22.8 | 1.00 |
mise env |
19.8 ± 0.8 | 18.0 | 23.7 | 1.04 ± 0.06 |
mise hook-env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.6.14 hook-env |
19.7 ± 0.9 | 17.9 | 23.3 | 1.00 |
mise hook-env |
20.4 ± 0.9 | 18.7 | 23.5 | 1.04 ± 0.06 |
mise ls
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.6.14 ls |
16.3 ± 0.8 | 14.8 | 21.3 | 1.00 |
mise ls |
17.0 ± 0.8 | 15.4 | 20.5 | 1.05 ± 0.07 |
xtasks/test/perf
| Command | mise-2026.6.14 | mise | Variance |
|---|---|---|---|
| install (cached) | 134ms | 135ms | +0% |
| ls (cached) | 60ms | 61ms | -1% |
| bin-paths (cached) | 64ms | 66ms | -3% |
| task-ls (cached) | 124ms | 126ms | -1% |

Summary
Testing
cargo test -p mise-sigstoregit diff --checkThis PR was generated by an AI coding assistant.
Note
Medium Risk
Changes attestation trust-root selection and retry logic on a security-sensitive path; behavior is narrowed (workflow mismatches no longer masked by TUF retry) but incorrect retry rules could still accept or reject valid bundles.
Overview
GitHub-internal Sigstore bundles no longer pick a single trust root up front. Verification goes through
verify_bundle_with_trust_roots, which still uses the production Sigstore root for non-GitHub certs, but for GitHub, Inc. leaf certs tries the embedded GitHub root first and only fetches GitHub’s TUF root when that attempt fails.Signer workflow checks now return a dedicated
AttestationError::WorkflowMismatchinstead of a generic verification error. That mismatch is treated as non-retryable—a failed embedded check for workflow reasons does not trigger a TUF retry (and a TUF retry that also mismatches returns the workflow error, not a combined verification message).TrustRootscachesgithub_embeddedandgithub_tufseparately (lazy TUF load). Cosign, SLSA bundle, and GitHub attestation paths are wired through the same helper. Unit tests cover embedded-only loading, TUF retry after embedded crypto failure, and no retry on workflow mismatch.Reviewed by Cursor Bugbot for commit cea9397. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit