Skip to content

Sign exclusively via sigstore-go#4618

Draft
aaronlew02 wants to merge 3 commits intosigstore:mainfrom
aaronlew02:sign-blob-sigstore-go
Draft

Sign exclusively via sigstore-go#4618
aaronlew02 wants to merge 3 commits intosigstore:mainfrom
aaronlew02:sign-blob-sigstore-go

Conversation

@aaronlew02
Copy link
Contributor

@aaronlew02 aaronlew02 commented Jan 5, 2026

Closes #4570

Summary

This change refactors the signing path in all signing and attestation commands such that all signing events occur via sigstore-go, not just those in which a signing config is used.

In cases where a signing config is not used, all prior functionality remains. This requires the construction of a signing config using TUF- or flag-provided URLs and a Rekor version flag. When a legacy bundle is requested, a legacy bundle is constructed from the new-format bundle provided by sigstore-go.

@codecov
Copy link

codecov bot commented Jan 5, 2026

Codecov Report

❌ Patch coverage is 11.88406% with 304 lines in your changes missing coverage. Please review.
✅ Project coverage is 35.96%. Comparing base (2ef6022) to head (9e0cb28).
⚠️ Report is 662 commits behind head on main.

Files with missing lines Patch % Lines
cmd/cosign/cli/signcommon/common.go 0.00% 135 Missing ⚠️
cmd/cosign/cli/attest/attest.go 0.00% 89 Missing ⚠️
cmd/cosign/cli/sign/sign_blob.go 42.25% 34 Missing and 7 partials ⚠️
cmd/cosign/cli/attest/attest_blob.go 29.72% 20 Missing and 6 partials ⚠️
pkg/cosign/bundle/sign.go 0.00% 5 Missing ⚠️
cmd/cosign/cli/sign/sign.go 0.00% 4 Missing ⚠️
cmd/cosign/cli/options/rekor.go 0.00% 2 Missing ⚠️
cmd/cosign/cli/attest_blob.go 0.00% 1 Missing ⚠️
cmd/cosign/cli/signblob.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4618      +/-   ##
==========================================
- Coverage   40.10%   35.96%   -4.14%     
==========================================
  Files         155      220      +65     
  Lines       10044    12764    +2720     
==========================================
+ Hits         4028     4591     +563     
- Misses       5530     7473    +1943     
- Partials      486      700     +214     

☔ 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.

@aaronlew02 aaronlew02 force-pushed the sign-blob-sigstore-go branch 14 times, most recently from a7d1bac to 695ced1 Compare January 9, 2026 19:49
@aaronlew02 aaronlew02 force-pushed the sign-blob-sigstore-go branch 7 times, most recently from b1ac7be to ded7bcb Compare January 15, 2026 21:14
@aaronlew02 aaronlew02 force-pushed the sign-blob-sigstore-go branch 7 times, most recently from dadcd9e to ce8540f Compare January 22, 2026 16:14
@aaronlew02 aaronlew02 force-pushed the sign-blob-sigstore-go branch from 0a46567 to 5b16501 Compare January 27, 2026 22:26
@aaronlew02 aaronlew02 requested a review from cmurphy January 28, 2026 00:06
@aaronlew02 aaronlew02 force-pushed the sign-blob-sigstore-go branch 5 times, most recently from 5ca899a to 8d3c73b Compare January 30, 2026 20:47
@aaronlew02 aaronlew02 requested a review from cmurphy January 30, 2026 21:16
@cmurphy cmurphy requested review from Hayden-IO and steiza February 3, 2026 00:24
Copy link
Member

@steiza steiza left a comment

Choose a reason for hiding this comment

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

Awesome work! The only thing I'm not quite sure how about is how we should handle RekorVersion as a user input argument.

KeyRef string
FulcioURL string
RekorURL string
RekorVersion uint32
Copy link
Member

Choose a reason for hiding this comment

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

I'm a little nervous about adding this option - what should we do if people specify this and SigningConfig?

We could either make those options mutually exclusive (which is a pain) or always default to Rekor v1 when you aren't using SigningConfig and keep moving folks over to use SigningConfig sooner than later. I'm curious what @Hayden-IO thinks here as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a good question, and I'm also interested in what @Hayden-IO thinks here.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yep, I agree with Zach. What was the need for this? The reason we went with creating a configuration for signing was to avoid manually specifying API version, as that’s not a great UX.

@aaronlew02 aaronlew02 marked this pull request as draft February 9, 2026 17:25
@aaronlew02 aaronlew02 force-pushed the sign-blob-sigstore-go branch 4 times, most recently from e3a9659 to 232a719 Compare February 9, 2026 22:37
Signed-off-by: Aaron Lew <64337293+aaronlew02@users.noreply.github.com>
@aaronlew02 aaronlew02 force-pushed the sign-blob-sigstore-go branch 5 times, most recently from 6a574b5 to 82e2d5e Compare February 13, 2026 20:55
Signed-off-by: Aaron Lew <64337293+aaronlew02@users.noreply.github.com>
@aaronlew02 aaronlew02 force-pushed the sign-blob-sigstore-go branch from 82e2d5e to bd2aaaf Compare February 17, 2026 17:44
@aaronlew02 aaronlew02 changed the title Sign exclusively via sigstore-go for sign-blob Sign exclusively via sigstore-go Feb 17, 2026
@aaronlew02 aaronlew02 force-pushed the sign-blob-sigstore-go branch from bd2aaaf to 97edca8 Compare February 17, 2026 20:29
Signed-off-by: Aaron Lew <64337293+aaronlew02@users.noreply.github.com>
@aaronlew02 aaronlew02 force-pushed the sign-blob-sigstore-go branch from 97edca8 to 9e0cb28 Compare February 17, 2026 20:41
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.

Restructuring signing code for shared implementation

4 participants