sigstore / cosign

Code signing and transparency for containers and binaries
Apache License 2.0
4.23k stars 506 forks source link

Add PayloadProvider interface to decouple AttestationToPayloadJSON from oci.Signature interface #3693

Closed codysoyland closed 1 month ago

codysoyland commented 1 month ago

I'm working on Policy Controller and need to use AttestationToPayloadJSON without having an entire oci.Signature. Since this func only needs the Payload, I added a small PayloadProvider interface containing only the Payload func, which preserves backwards compatibility while decoupling the oci.Signature interface.

Signed-off-by: Cody Soyland codysoyland@github.com

Summary

Release Note

Documentation

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 40.60%. Comparing base (2ef6022) to head (ed091e8). Report is 102 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #3693 +/- ## ========================================== + Coverage 40.10% 40.60% +0.49% ========================================== Files 155 157 +2 Lines 10044 10157 +113 ========================================== + Hits 4028 4124 +96 - Misses 5530 5535 +5 - Partials 486 498 +12 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.