-
Notifications
You must be signed in to change notification settings - Fork 635
Implement OCI 1.1 discovery in verify-attestation #4453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Implement OCI 1.1 discovery in verify-attestation #4453
Conversation
339b457
to
ea3bd77
Compare
ea3bd77
to
e198e17
Compare
The implementation discovers attestations using the OCI 1.1 Referrers API instead of legacy tag-based discovery (.att tags), then extracts and verifies DSSE envelopes directly. This enables verification of attestations stored using modern OCI 1.1 specification with any authority type. - Remove verbose warning messages from library code (not appropriate for library usage) - Library code should be silent unless there are actual errors Signed-off-by: falcorocks <[email protected]>
e198e17
to
3d79a47
Compare
To confirm my understanding, this differs from what's been implemented because this is discovery of DSSE attestations stored in OCI referring artifacts, not Sigstore bundles? If so, I have a couple of thoughts:
Why not download the attestation via |
@haydentherapper thank you for the quick review! I agree with the future that you have in mind for cosign, and I'm happy about the changes that you see towards that end. Specifically here, I want to implement this in cosign because this code is what the sigstore policy controller uses to fetch attestations. I've opened a PR there (that I do not necessarily plan to actually propose, it's just an undocumented proof of concept for now) to demonstrate how this change enables the policy controller to work with attestations stored using OCI 1.1: sigstore/policy-controller#1892. I want to make the sigstore policy controller work with in-toto provenance v1.0 attestations produced by Google Cloud Build, as google own admission control solution is not as good. GCB stores attestations using OCI 1.1, but it does not use Sigstore Fulcio for signing (I wish!) and it does not produce a bundle. At verification we must pass a reference to the kms address where the GCB attestor stores its public key. GCB does not provide any way to change how any of this work unfortunately... I have no insight at google intention with regards to the future of provenance attestations in GCB (do you? 😁). I would love for them to run their own Fulcio like Github does and for them to support the new bundle spec... but none of this is here now. But meanwhile:
As a compromise, would you be open to consider accepting this PR on v2 ( |
Summary
Resolves one item of #4335. This PR implements OCI 1.1 support for
cosign verify-attestation
. The implementation discovers attestations using the OCI 1.1 Referrers API instead of legacy tag-based discovery (.att tags), then extracts and verifies DSSE envelopes directly. This enables verification of attestations stored using modern OCI 1.1 specification (for instance Google Cloud Build SLSA build level 3 attestations!)Release Note
cosign verify-attestation
Documentation
I don't think it's necessary, but I'm happy to write something!