Skip to content

fix: pass NewBundleFormat to KeyOpts in sign command - #4981

Merged
Hayden-IO merged 1 commit into
sigstore:mainfrom
securesign:fix/sign-new-bundle-format-keyopts
Jul 4, 2026
Merged

Hayden-IO merged 1 commit into
sigstore:mainfrom
securesign:fix/sign-new-bundle-format-keyopts

Conversation

@JasonPowr

Copy link
Copy Markdown
Contributor

NewBundleFormat is parsed from the CLI flag but never copied to KeyOpts in sign.go,
causing TSA signing to fail with:

"expected either new bundle or an rfc3161-timestamp path when using a TSA server"

This only affects the manual flags path (--use-signing-config=false with explicit
--timestamp-server-url). The default signing config path is unaffected as it sources
TSA and bundle format settings from the trusted root / signing config, bypassing KeyOpts.

Fix: add the missing NewBundleFormat: o.NewBundleFormat to the KeyOpts struct initialization.

Fixes: #4980

@JasonPowr
JasonPowr requested a review from a team as a code owner July 3, 2026 10:54
Signed-off-by: JasonPowr <japower@redhat.com>
@JasonPowr
JasonPowr force-pushed the fix/sign-new-bundle-format-keyopts branch from ae11e61 to ceeaf83 Compare July 3, 2026 10:55
@codecov

codecov Bot commented Jul 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
βœ… Project coverage is 38.48%. Comparing base (2ef6022) to head (ceeaf83).
⚠️ Report is 790 commits behind head on main.

Files with missing lines Patch % Lines
cmd/cosign/cli/sign.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4981      +/-   ##
==========================================
- Coverage   40.10%   38.48%   -1.62%     
==========================================
  Files         155      209      +54     
  Lines       10044    13007    +2963     
==========================================
+ Hits         4028     5006     +978     
- Misses       5530     7291    +1761     
- Partials      486      710     +224     

β˜” View full report in Codecov by Harness.
πŸ“’ 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.

@Hayden-IO Hayden-IO left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks!

@Hayden-IO
Hayden-IO merged commit f17f812 into sigstore:main Jul 4, 2026
30 checks passed
JasonPowr added a commit to securesign/cosign that referenced this pull request Jul 7, 2026
fix: pass NewBundleFormat to KeyOpts in sign command (sigstore#4981)
JasonPowr added a commit to securesign/cosign that referenced this pull request Jul 7, 2026
fix: pass NewBundleFormat to KeyOpts in sign command (sigstore#4981)
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.

NewBundleFormat not passed to KeyOpts in sign command, breaking TSA usage

2 participants