-
Notifications
You must be signed in to change notification settings - Fork 566
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor verifyNewBundle into library function (#4013)
* Add new func cosign.VerifyNewBundle which invokes sigstore-go verifier Signed-off-by: Cody Soyland <codysoyland@github.com> * Refactor verify-blob to use cosign.VerifyNewBundle Signed-off-by: Cody Soyland <codysoyland@github.com> * Refactor verify-blob-attestation to use cosign.VerifyNewBundle Signed-off-by: Cody Soyland <codysoyland@github.com> * Add more tests Signed-off-by: Cody Soyland <codysoyland@github.com> * Remove old verifyNewBundle Signed-off-by: Cody Soyland <codysoyland@github.com> * Add support for verifying by payload digest and custom trusted root Signed-off-by: Cody Soyland <codysoyland@github.com> * Add support for custom trusted root path in verify-blob-attestation Signed-off-by: Cody Soyland <codysoyland@github.com> * Fix logic: require none of these fields to be set Signed-off-by: Cody Soyland <codysoyland@github.com> * Remove RekorURL from list of checked flags This var has a default value so shouldn't be checked Signed-off-by: Cody Soyland <codysoyland@github.com> * Fix a couple of tests These tests are incorrect: they set the signature field which is not allowed when doing bundle verification. Previously they were passing due to logic errors. Signed-off-by: Cody Soyland <codysoyland@github.com> * Update pkg/cosign/verify.go Co-authored-by: Colleen Murphy <cmurphy@users.noreply.github.com> Signed-off-by: Cody Soyland <codysoyland@github.com> * Remove unneeded log Signed-off-by: Cody Soyland <codysoyland@github.com> * Do not allow --trusted-root flag without --new-bundle-format Signed-off-by: Cody Soyland <codysoyland@github.com> * Ignore context param Signed-off-by: Cody Soyland <codysoyland@github.com> --------- Signed-off-by: Cody Soyland <codysoyland@github.com> Co-authored-by: Colleen Murphy <cmurphy@users.noreply.github.com>
- Loading branch information
1 parent
7fc8e2a
commit 737c83c
Showing
8 changed files
with
690 additions
and
368 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
Oops, something went wrong.