Skip to content

Conversation

emilyzheng
Copy link

@emilyzheng emilyzheng commented Sep 17, 2025

Summary

With this change, cosign sign can be run only once when an image has multiple pull references.

Closes #4330

Release Note

cosign sign --sign-container-identity supports more than one identities.

Documentation

@emilyzheng emilyzheng requested a review from a team as a code owner September 17, 2025 07:21
Copy link

codecov bot commented Sep 17, 2025

Codecov Report

❌ Patch coverage is 0% with 54 lines in your changes missing coverage. Please review.
✅ Project coverage is 34.21%. Comparing base (2ef6022) to head (0cb682a).
⚠️ Report is 540 commits behind head on main.

Files with missing lines Patch % Lines
cmd/cosign/cli/sign/sign.go 0.00% 52 Missing ⚠️
cmd/cosign/cli/options/sign.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4415      +/-   ##
==========================================
- Coverage   40.10%   34.21%   -5.89%     
==========================================
  Files         155      218      +63     
  Lines       10044    15674    +5630     
==========================================
+ Hits         4028     5363    +1335     
- Misses       5530     9612    +4082     
- 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.

"issue a code signing certificate from Fulcio, even if a key is provided")

cmd.Flags().StringVar(&o.SignContainerIdentity, "sign-container-identity", "",
cmd.Flags().StringArrayVar(&o.SignContainerIdentities, "sign-container-identity", nil,
Copy link
Member

Choose a reason for hiding this comment

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

I'd use StringSliceVar here so you can specify the values as:

--sign-container-identity=docker.io/name1:tag1,docker.io/name2:tag2

Copy link
Author

Choose a reason for hiding this comment

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

Thanks, updated.

@emilyzheng emilyzheng changed the title Support multiple --sign-container-identity Support multiple container identities Sep 25, 2025
Copy link
Contributor

@cmurphy cmurphy left a comment

Choose a reason for hiding this comment

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

@emilyzheng
Copy link
Author

Added an e2e test.

@emilyzheng emilyzheng requested a review from cmurphy September 29, 2025 09:44
With this change, cosign sign can be run only once when an image
has multiple pull references.

Closes sigstore#4330

Signed-off-by: Emily Zheng <[email protected]>
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.

Support multiple --sign-container-identity for cosign sign
3 participants