-
Notifications
You must be signed in to change notification settings - Fork 583
Bundle inspection and generation utilities #3794
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
Comments
(re:
Yeah, this one is probably redundant with existing verify commands, so it can be omitted. |
Okay, so merging in the content from #3855, what about if we start with:
Can we just assume this will only output new protobuf bundles? I think that's okay - I'm not sure why someone would be looking to take detached materials and create an old bundle. Or do we need a Then for trusted roots we can do something like:
If this interface looks reasonable, I can start implementing! |
LGTM! A few details:
Yes! For |
To tack on: another useful set of subcommand(s) here would be for interacting with PEP 740 attestation and provenance objects, which are semantically compatible with Sigstore bundles but have their own structure (to make them mesh with Python packaging land). As a rough sketch, some things that would be useful: # maybe this could be another `bundle synthesize` variant?
# convert an entire provenance object into >=1 sigstore bundles
cosign bundle convert-pep740 --provenance foo-1.2.3.tar.gz.provenance
# convert a single attestation object into its corresponding bundle
cosign bundle convert-pep740 --attestation foo-1.2.3.tar.gz.publish.attestation The inverse (bundle to PEP 740) might also be useful, although this is already covered within standard uploading/signing flows. |
|
So where we're at today is that all of the Sigstore client libraries produce and consume the (new) protobuf bundle format, and cosign is the only client that produces or consumes the old signature format. Cosign already has support for consuming the new bundle format (as of https://github.com/sigstore/cosign/releases/tag/v2.4.0 for blobs and as of last week for containers. Cosign also has support for signing with the bundle format with So the next step will be to switch cosign to default to the new bundle format, and let people specify a flag to verify the old signature format. At that point, all produces and consumers will default to using the new bundle format. In this scenario, I don't think there's a reason why we need a new -> old converter. You would have to upgrade the version of cosign you were using in order to get that functionality, at which point you'd already have a version of cosign that can work with both formats. |
There can be middle layers in the signature/bundle-distribution pipeline between the original producer and the end-consumer. Say you have an original-producer generating new-style bundles. And an end-consumer that only understands old-style signatures. Either the original-producer, the end-consumer, or some third party could run a new -> old converter to produce signatures the old consumer could find and understand until the end-consumer was able to update to tooling that understood the new bundles. As one example of this, you could have a mirroring team that pulled in new-style bundles from the public internet and walked them into a disconnected/restricted-network environment. The mirroring team might know that some of the local tools only understood old-style signatures, and the mirror team could run a new -> old converter to set up signatures that the older local tools could find and trust. Some formats are just incompatible, and while new -> old converters would help with ecosystem transitions, they might not always be possible. I'm not clear enough on what goes into an old-style signature vs. what goes into a new-style bundle to know if new -> old conversion is possible. But if it is possible, I think it's worth consideration, to help folks bridge the transition. But it doesn't have to get discussed in this issue, if you think it deserves a separate issue. And even if it is possible, obviously Sigstore/Cosign maintainers are free to say things like "someone else is free to do this kind of thing, but we don't have time ourselves" or "we're happy to review and accept pulls to |
Description
Inspired by @codysoyland's https://github.com/codysoyland/sigstore-bundle-upgrade and building on the upcoming bundle support (#3139), it would be great to have utilities to work with or create bundles outside of signing and verification workflows. This could include:
In order:
verify-blob
without artifact verification, I'd skip this one, or at least rename)cat foo.sigstore.json | jq
)Discussion: https://sigstore.slack.com/archives/C0440BFT43H/p1721088432507969
The text was updated successfully, but these errors were encountered: