Skip to content

Conversation

@steiza
Copy link
Member

@steiza steiza commented Sep 18, 2025

Summary

For #4372. Note that currently this only fills the the critical fields of the docker-reference, docker-manifest-digest, and type, and not any of the optional fields (which could be populated from sigstore-go verification results).

Release Note

  • Updated cosign verify output when working with new bundles to include information about the verified container image

Documentation

N/A

@steiza
Copy link
Member Author

steiza commented Sep 18, 2025

As it stands, this pull request will return something like:

[{"critical":{"identity":{"docker-reference":"ghcr.io/steiza/nginx:latest"},"image":{"docker-manifest-digest":"sha256:2d5b42edd09430be531f850d10c43bfb50087b8afa81eb8d83df4ee02b2d3a4b"},"type":"https://sigstore.dev/cosign/sign/v1"},"optional":null}]

@codecov
Copy link

codecov bot commented Sep 18, 2025

Codecov Report

❌ Patch coverage is 50.98039% with 25 lines in your changes missing coverage. Please review.
✅ Project coverage is 34.26%. Comparing base (2ef6022) to head (d879c9e).
⚠️ Report is 530 commits behind head on main.

Files with missing lines Patch % Lines
cmd/cosign/cli/verify/verify.go 50.98% 18 Missing and 7 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4416      +/-   ##
==========================================
- Coverage   40.10%   34.26%   -5.84%     
==========================================
  Files         155      218      +63     
  Lines       10044    15651    +5607     
==========================================
+ Hits         4028     5363    +1335     
- Misses       5530     9589    +4059     
- Partials      486      699     +213     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@steiza steiza force-pushed the cosign-verify-results branch from fb4b8fa to 6ac010d Compare September 24, 2025 14:54
@steiza
Copy link
Member Author

steiza commented Sep 24, 2025

I should have known that #4316 was a little too easy! The content returned by VerifyImageAttestations() is very tailored to verify-attestations, and so when I reused that function for verify it didn't understand the JSON encoded information it was receiving.

I'm not a huge fan of this approach, but the alternative is pretty major surgery to pkg/cosign/verify.go, either making copy-pasting quite a bit of code to create a parallel codepath for verify, or refactoring the functions VerifyImageAttestations() calls to return much more information and then filter that down.

I think transforming the information we need in the cmd works for now, and when we simplify code paths to just use sigstore-go for verification it will be much easier to plumb the information we need back to the cmd, instead of transforming the information we receive today.

@steiza steiza marked this pull request as ready for review September 24, 2025 18:21
@steiza steiza requested review from a team as code owners September 24, 2025 18:21
Signed-off-by: Zach Steindler <[email protected]>
Copy link
Contributor

@haydentherapper haydentherapper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@steiza steiza merged commit 8d756cf into sigstore:main Sep 25, 2025
29 checks passed
haydentherapper pushed a commit to haydentherapper/cosign that referenced this pull request Sep 26, 2025
…bundles (sigstore#4416)

* Implement container image context in verify command
* Use conformance on main for now (waiting for new release)

---------

Signed-off-by: Zach Steindler <[email protected]>
haydentherapper pushed a commit that referenced this pull request Sep 26, 2025
…bundles (#4416)

* Implement container image context in verify command
* Use conformance on main for now (waiting for new release)

---------

Signed-off-by: Zach Steindler <[email protected]>
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Oct 3, 2025
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [cosign](https://github.com/sigstore/cosign) | patch | `2.6.0` -> `2.6.1` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>sigstore/cosign (cosign)</summary>

### [`v2.6.1`](https://github.com/sigstore/cosign/blob/HEAD/CHANGELOG.md#v261)

[Compare Source](sigstore/cosign@v2.6.0...v2.6.1)

#### Bug Fixes

- Partially populate the output of cosign verify when working with new bundles ([#&#8203;4416](sigstore/cosign#4416))
- Bump sigstore-go, move conformance back to tagged release ([#&#8203;4426](sigstore/cosign#4426))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever MR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4xMzIuNSIsInVwZGF0ZWRJblZlciI6IjQxLjEzMi41IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
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.

2 participants