-
Notifications
You must be signed in to change notification settings - Fork 173
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support cosign signatures / attestations and discover in `zarf …
…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 <rjferguson21@gmail.com> Co-authored-by: Wayne Starr <Racer159@users.noreply.github.com>
- Loading branch information
1 parent
4935cd5
commit c46a4b9
Showing
7 changed files
with
161 additions
and
41 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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