Repository navigation
Conversation
Bump ratify-verifier-go/cosign to add cosign v3 Sigstore bundle signature verification and delegate Verifiable to cosign.IsVerifiable, so bundle signatures (application/vnd.dev.sigstore.bundle.v0.3+json) are verified while attestation bundles are skipped. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Xinhe Li <xinhl@microsoft.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3087 +/- ##
=======================================
Coverage 86.50% 86.50%
=======================================
Files 54 54
Lines 2935 2935
=======================================
Hits 2539 2539
Misses 302 302
Partials 94 94 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
Cryptographic bundle verification and signed-predicate enforcement rely on unmerged ratify-verifier-go#83, requiring review of the final merged dependency and validation of real cosign v3 interoperability before approval.
No open issues 🎉
What changed in this PR
Adds cosign v3 Sigstore bundle signature support to Ratify v2 while preserving legacy signature handling and skipping bundles annotated as attestations.
Changes:
- Updates the cosign verifier dependency to a revision with bundle verification support.
- Delegates artifact eligibility checks to
cosign.IsVerifiable. - Adds unit cases for bundle signatures, missing predicate annotations, and attestation exclusion.
| File | Description |
|---|---|
internal/verifier/cosign/register.go |
Delegates signature eligibility checks to the cosign library. |
internal/verifier/cosign/register_test.go |
Covers bundle eligibility and uses library artifact-type constants. |
go.sum |
Updates checksums for the cosign dependency revision. |
go.mod |
Pins the cosign dependency with bundle support. |
Review effort: Balanced
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds cosign v3 Sigstore bundle signature support to Ratify v2.
Cosign v3 stores signatures as OCI 1.1 referrers with artifact type
application/vnd.dev.sigstore.bundle.v0.3+json. Attestations (cosign attest, GitHub artifact attestations, etc.) use the same artifact type and are only distinguished by the in-toto predicate type.Changes:
github.com/notaryproject/ratify-verifier-go/cosignto feat(cosign): support cosign v3 Sigstore bundle signatures ratify-verifier-go#83, which adds bundle verification.Verifiablenow delegates tocosign.IsVerifiable:application/vnd.dev.cosign.artifact.sig.v1+jsonsignatures: unchangeddev.sigstore.bundle.predicateType: https://sigstore.dev/cosign/sign/v1(or without the annotation): verifiedpredicateTypeafter verification, so a trusted attestation cannot be accepted as a signature.This mirrors the v1 change in #3060.
Dependency
Draft until notaryproject/ratify-verifier-go#83 merges; the dependency will then be bumped to the merged commit.
Testing
Verifiablecovering legacy signatures, bundle signatures, bundles without the annotation, and attestation bundles.go test ./internal/verifier/... ./internal/executor/...