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

Refactor verifyNewBundle into library function #4013

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

codysoyland
Copy link
Member

@codysoyland codysoyland commented Jan 14, 2025

Summary

This is a refactor of the bundle verification logic that replaces verifyNewBundle with a re-written library function cosign.VerifyNewBundle, which accepts a simplified set of arguments, using CheckOpts to supply the majority of the configuration. It has been moved out of the cli package into the cosign package and made public.

This is partially extracted from #3889.

Release Note

Documentation

Copy link

codecov bot commented Jan 14, 2025

Codecov Report

Attention: Patch coverage is 47.14286% with 111 lines in your changes missing coverage. Please review.

Project coverage is 36.43%. Comparing base (2ef6022) to head (ac686eb).
Report is 278 commits behind head on main.

Files with missing lines Patch % Lines
cmd/cosign/cli/verify/verify_blob.go 33.70% 48 Missing and 11 partials ⚠️
cmd/cosign/cli/verify/verify_blob_attestation.go 41.50% 26 Missing and 5 partials ⚠️
pkg/cosign/verify.go 74.13% 10 Missing and 5 partials ⚠️
pkg/cosign/verify_bundle.go 40.00% 4 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4013      +/-   ##
==========================================
- Coverage   40.10%   36.43%   -3.67%     
==========================================
  Files         155      210      +55     
  Lines       10044    13351    +3307     
==========================================
+ Hits         4028     4865     +837     
- Misses       5530     7874    +2344     
- Partials      486      612     +126     

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

@codysoyland codysoyland marked this pull request as ready for review January 21, 2025 21:06
@codysoyland codysoyland changed the title [DRAFT] Refactor verifyNewBundle into library function Refactor verifyNewBundle into library function Jan 21, 2025
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.

1 participant