sigstore / cosign

Code signing and transparency for containers and binaries
Apache License 2.0
4.24k stars 507 forks source link

Enhancement to PR 3643 #3644

Closed Mukuls77 closed 3 months ago

Mukuls77 commented 3 months ago

This PR enhanced the changes done in PR #3643 to fix issue #3642

Summary

The enhancement done is

  1. In file https://github.com/sigstore/cosign/blob/7001e8203fea32c59a1bc30d9650cb8d73dd0587/pkg/oci/internal/signature/layer.go#L60 Moved the call of Defer clause above io.ReadAll() so that in case of failure in io.ReadAll() we still close the file stream.
  2. Added the same code in file https://github.com/sigstore/cosign/blob/7001e8203fea32c59a1bc30d9650cb8d73dd0587/pkg/oci/signature/layer.go#L60

Release Note

NONE

Documentation

NONE

codecov[bot] commented 3 months ago

Codecov Report

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

Project coverage is 42.02%. Comparing base (2ef6022) to head (9320aac). Report is 68 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #3644 +/- ## ========================================== + Coverage 40.10% 42.02% +1.92% ========================================== Files 155 155 Lines 10044 8021 -2023 ========================================== - Hits 4028 3371 -657 + Misses 5530 4157 -1373 - Partials 486 493 +7 ```

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