-
Notifications
You must be signed in to change notification settings - Fork 567
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 <[email protected]> * Refactor verify-blob to use cosign.VerifyNewBundle Signed-off-by: Cody Soyland <[email protected]> * Refactor verify-blob-attestation to use cosign.VerifyNewBundle Signed-off-by: Cody Soyland <[email protected]> * Add more tests Signed-off-by: Cody Soyland <[email protected]> * Remove old verifyNewBundle Signed-off-by: Cody Soyland <[email protected]> * Add support for verifying by payload digest and custom trusted root Signed-off-by: Cody Soyland <[email protected]> * Add support for custom trusted root path in verify-blob-attestation Signed-off-by: Cody Soyland <[email protected]> * Fix logic: require none of these fields to be set Signed-off-by: Cody Soyland <[email protected]> * Remove RekorURL from list of checked flags This var has a default value so shouldn't be checked Signed-off-by: Cody Soyland <[email protected]> * 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 <[email protected]> * Update pkg/cosign/verify.go Co-authored-by: Colleen Murphy <[email protected]> Signed-off-by: Cody Soyland <[email protected]> * Remove unneeded log Signed-off-by: Cody Soyland <[email protected]> * Do not allow --trusted-root flag without --new-bundle-format Signed-off-by: Cody Soyland <[email protected]> * Ignore context param Signed-off-by: Cody Soyland <[email protected]> --------- Signed-off-by: Cody Soyland <[email protected]> Co-authored-by: Colleen Murphy <[email protected]>
- 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.