-
Notifications
You must be signed in to change notification settings - Fork 174
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
Images should Include Signatures/SBOMS/Attestations #475
Comments
This is interesting, one thing I'm noticing though, tree doesnt seem to tell you if the artifacts really exist, just what their url would be if they did--so some downloads will result in error if just following the tree command. That's not super ideal to be generating a bunch of 404s on remote registries. Any thoughts on how to optimize that? |
Bump on this one re: the last question @runyontr |
Doesn't look like there's a more efficient way then just trying to download each artifact and if its not there, just skipping adding it to the Zarf bundle |
Not sure how the cosign commands work internally. But you can discover Cosign signatures/attestations/attachments by inspecting your image path (to get it's sha256 digest) and then listing tags. If there is a tag named It's two Docker v2 API requests total, one to inspect the tag/manifest and one to list tags. |
Update: would like this to check for these components and include in-lieu of doing syft when available. |
Looks like the issue with showing all possible components was resolved in cosign - sigstore/cosign#1872 Running |
…prepare find-images` (#2027) ## Description Output from @rjferguson21 and my dash day's explorations of this. This PR includes: - Logic pulled from [cosign tree](https://github.com/sigstore/cosign/blob/main/cmd/cosign/cli/tree.go#L50) to detect and include signatures/attestations when using `zarf prepare find-images` - Skips SBOMs and caching for "non-images" by checking layer mediatypes at pull time Several TODOs for follow-on work based on the issue/other needs: - Add in SBOM pulling when available, skip over syft creation of SBOM when applicable. - Mutating digests as needed - in order for tools to identify the signature the tag for it must be tagged `<digest>.sig`. When zarf does its [`AddImageAnnotation`](https://github.com/defenseunicorns/zarf/blob/main/src/pkg/utils/image.go#L43) this could change the image digest, making it so that the signature is no longer at the correct tag. Images already having that annotation are unaffected (which is why this works OK for Ironbank). ## Related Issue Relates to #475 ## Type of change - [ ] Bug fix (non-breaking change which fixes an issue) - [x] New feature (non-breaking change which adds functionality) - [ ] Other (security config, docs update, etc) ## Checklist before merging - [ ] Test, docs, adr added or updated as needed - [ ] [Contributor Guide Steps](https://github.com/defenseunicorns/zarf/blob/main/CONTRIBUTING.md#developer-workflow) followed --------- Co-authored-by: Rob Ferguson <[email protected]> Co-authored-by: Wayne Starr <[email protected]>
Going to unassign myself and drop a few notes from follow on todos to fully close this issue. With the merged PR cosign artifacts should be fully supported and discoverable with find-images. Two pieces are not complete that would be part of this issue or follow on ones:
|
Another TODO and a question:
|
To better scope this issue - changing the title to verify cosign signatures during package create - SHAs (and SHA + tag) syntaxes are supported by Zarf but want to spin the auto editing of image:tag@digest into a separate issue for better tracking. See: #2247 |
Created another issue for validation as well actually to keep things cleaner - going to close this one: #2257 |
Is your feature request related to a problem? Please describe.
As a system owner, I would like to obtain all artifacts for an image produced by IronBank and other image vendors.
Describe the solution you'd like
As an end user, when an image is included as part of the Zarf.yaml, I would like the associated objects to be included in the Zarf bundle:
Currently they provide vulnerability information in the attestation as can be seen here:
Describe alternatives you've considered
The Zarf.yaml could define each one of these objects individually, which seems time consuming, but very explicit about which version of the image should be downloaded.
Additional context
IronBank is currently providing SBOM, signatures and justification, but as they expand the metadata around the image they could/may provide it would be good to dynamically bring more of the data with in Zarf without explicit reference changes.
https://github.com/sigstore/cosign/blob/main/cmd/cosign/cli/tree.go
The text was updated successfully, but these errors were encountered: