Skip to content

Add staging flag to initialize with staging TUF metadata#4561

Merged
cmurphy merged 1 commit intosigstore:mainfrom
aaronlew02:staging-flag
Dec 5, 2025
Merged

Add staging flag to initialize with staging TUF metadata#4561
cmurphy merged 1 commit intosigstore:mainfrom
aaronlew02:staging-flag

Conversation

@aaronlew02
Copy link
Copy Markdown
Contributor

@aaronlew02 aaronlew02 commented Dec 4, 2025

Closes #4533

Summary

This change adds a --staging flag to cosign initialize which initializes the TUF cache directory with staging TUF metadata.

This change also clears the TUF cache directory on any run of cosign initialize so that prod and staging TUF metadata do not coexist.

This functionality has been tested locally.

Documentation

sigstore/docs#404

@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 4, 2025

Codecov Report

❌ Patch coverage is 16.66667% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 36.34%. Comparing base (2ef6022) to head (f28ce15).
⚠️ Report is 603 commits behind head on main.

Files with missing lines Patch % Lines
cmd/cosign/cli/initialize/init.go 0.00% 4 Missing and 2 partials ⚠️
cmd/cosign/cli/initialize.go 50.00% 2 Missing ⚠️
cmd/cosign/cli/options/initialize.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4561      +/-   ##
==========================================
- Coverage   40.10%   36.34%   -3.76%     
==========================================
  Files         155      220      +65     
  Lines       10044    12301    +2257     
==========================================
+ Hits         4028     4471     +443     
- Misses       5530     7136    +1606     
- Partials      486      694     +208     

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

Comment thread cmd/cosign/cli/initialize/init.go Outdated
Signed-off-by: Aaron Lew <64337293+aaronlew02@users.noreply.github.com>
@cmurphy cmurphy merged commit b2102aa into sigstore:main Dec 5, 2025
29 checks passed
@aaronlew02 aaronlew02 deleted the staging-flag branch December 5, 2025 21:10
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.

Add staging flag to test signing against public-good staging environment

2 participants