Explain legacy bundles in verify-blob errors #5276
All Vouch review confidence checks passed
Residual risk 0.19 = Change Risk (0.36) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 206 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
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
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.319
Real PR Conversation Timeline
1 comments
"Review active on #5276"
general
weight: 0.35
cmurphy
Summary
Resolves #5274
verify-blobandverify-blob-attestationread only Sigstore bundles on main. A legacy cosign bundle (base64Signature,cert,rekorBundle) fails withproto: (line 1:2): unknown field "base64Signature", which does not tell users that the format was dropped.This adds
loadBundleFromPathin cmd/cosign/cli/verify, used by both commands. Ifbundle.LoadJSONFromPathfails and the file is a legacy cosign bundle (a JSON object with onlybase64Signature,certandrekorBundle, decoding ascosign.LocalSignedPayload), it returns:<path> is a legacy cosign bundle; cosign v4 verifies only Sigstore bundles (legacy bundles were last supported in cosign v3): <original error>
Bundles that load are not affected; any other load error is returned as before. The check runs only on the error path.
To test:
go test ./cmd/cosign/cli/verify/ -run 'TestLoadBundleFromPath|TestVerifyBlob$|TestVerifyBlobAttestationLegacyBundle', or runcosign verify-blob --bundle <legacy bundle> ...with a bundle from cosign v2sign-blob --bundle. I also checked by hand that a v0.3 bundle still verifies.AI disclosure: written with Claude Code (Claude Opus 5.5) and reviewed with OpenAI Codex (GPT-6.2 Sol); I reviewed every changed line and the tests.
Release Note
cosign verify-blobandcosign verify-blob-attestationnow explain when a--bundlefile is a legacy cosign bundle that cosign v4 no longer verifies, instead of failing with only a protobuf "unknown field" error.Documentation
None. No flags or help text changed.
🤖 Generated with Claude Code