Skip to content
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

Set bundleVerified to true after Rekor verification (Resolves #3740) #3745

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

maxlambrecht
Copy link

Summary

This PR addresses an issue where the bundleVerified flag was not set to true after a successful online Rekor verification. The change ensures that bundleVerified accurately reflects the verification status when Rekor lookup is used.

Resolves #3740

Release Note

Documentation

…e#3740)

Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
Copy link

codecov bot commented Jun 23, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 36.59%. Comparing base (2ef6022) to head (65969ae).
Report is 135 commits behind head on main.

Files Patch % Lines
pkg/cosign/verify.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3745      +/-   ##
==========================================
- Coverage   40.10%   36.59%   -3.51%     
==========================================
  Files         155      200      +45     
  Lines       10044    12220    +2176     
==========================================
+ Hits         4028     4472     +444     
- Misses       5530     7202    +1672     
- Partials      486      546      +60     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@haydentherapper
Copy link
Contributor

Thanks! Can you add a test for this? I think you just need to check what's returned by a code block like

if _, err := VerifyImageSignature(context.TODO(), ociSig, v1.Hash{}, &CheckOpts{
SigVerifier: sv,
RekorClient: mClient,
Identities: []Identity{{Subject: "subject@mail.com", Issuer: "oidc-issuer"}},
.

If adding this test isn't straightforward, that's fine, this is a simple enough change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bundleVerified Flag Not Set After Successful Rekor Online Verification in Cosign
2 participants