Skip to content

Commit 2cdf8d1

Browse files
committed
ROX-34488: verify sigstore bundle signatures via sigstore-go
Add verifySigstoreBundle which verifies DSSE-envelope signatures using sigstore-go directly, bypassing the cosign SimpleSigning path. The verifier now branches on signature format: SimpleSigning signatures continue through cosign.VerifyImageSignature, while sigstore bundles use sigstore-go's verify.SignedEntity with the same trust roots (public key or certificate identity/issuer). Partially generated by AI.
1 parent 17ac497 commit 2cdf8d1

3 files changed

Lines changed: 288 additions & 47 deletions

File tree

pkg/signatures/cosign_sig_fetcher_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ func TestCosignSignatureFetcher_FetchSignature_Success(t *testing.T) {
203203
Cosign: &storage.CosignSignature{
204204
RawSignature: rawSig1,
205205
SignaturePayload: sigPayload1,
206+
SignatureFormat: storage.CosignSignature_SIMPLE_SIGNING,
206207
},
207208
},
208209
},
@@ -211,6 +212,7 @@ func TestCosignSignatureFetcher_FetchSignature_Success(t *testing.T) {
211212
Cosign: &storage.CosignSignature{
212213
RawSignature: rawSig2,
213214
SignaturePayload: sigPayload2,
215+
SignatureFormat: storage.CosignSignature_SIMPLE_SIGNING,
214216
},
215217
},
216218
},
@@ -221,6 +223,7 @@ func TestCosignSignatureFetcher_FetchSignature_Success(t *testing.T) {
221223
SignaturePayload: sigPayload3,
222224
CertPem: certPEM,
223225
CertChainPem: chainPEM,
226+
SignatureFormat: storage.CosignSignature_SIMPLE_SIGNING,
224227
},
225228
},
226229
},
@@ -232,6 +235,7 @@ func TestCosignSignatureFetcher_FetchSignature_Success(t *testing.T) {
232235
CertPem: certPEMWithTlog,
233236
CertChainPem: chainPEMWithTlog,
234237
RekorBundle: bundle,
238+
SignatureFormat: storage.CosignSignature_SIMPLE_SIGNING,
235239
},
236240
},
237241
},
@@ -622,6 +626,7 @@ func TestCosignSignatureFetcher_FetchSignature_WithCredentials(t *testing.T) {
622626
Cosign: &storage.CosignSignature{
623627
RawSignature: rawSig1,
624628
SignaturePayload: sigPayload1,
629+
SignatureFormat: storage.CosignSignature_SIMPLE_SIGNING,
625630
},
626631
},
627632
},

0 commit comments

Comments
 (0)