Skip to content

Change default CLI upload type to hashedrekord#2885

Open
Hayden-IO wants to merge 1 commit into
sigstore:mainfrom
Hayden-IO:change-rekor-cli-default
Open

Change default CLI upload type to hashedrekord#2885
Hayden-IO wants to merge 1 commit into
sigstore:mainfrom
Hayden-IO:change-rekor-cli-default

Conversation

@Hayden-IO

@Hayden-IO Hayden-IO commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Summary

This change sets the default --type flag to hashedrekord in rekor-cli, along with changing the default --pki-format flag to x509 (which is certificates and public keys).

This is done in a backwards compatible way, in that a client can continue to pass an artifact via --artifact and it will automatically be hashed if the type is hashedrekord.

While the PKI flag change is a breaking change, I doubt anyone was using pgp, which was the default.

Release Note

Documentation

This change sets the default `--type` flag to `hashedrekord` in rekor-cli,
along with changing the default `--pkiFormat` flag to x509 (which is
certificates and public keys).

This is done in a backwards compatible way, in that a client can
continue to pass an artifact via --artifact and it will automatically be
hashed if the type is hashedrekord.

While the PKI flag change is a breaking change, I doubt anyone was using
pgp, which was the default.

Signed-off-by: Hayden <8418760+Hayden-IO@users.noreply.github.com>
@Hayden-IO Hayden-IO requested a review from a team as a code owner July 10, 2026 23:01
@Hayden-IO

Copy link
Copy Markdown
Contributor Author

Verify this works with:

openssl genrsa -out private.pem 4096
openssl rsa -in private.pem -pubout -out public.pem
echo "hello world" > artifact.txt
openssl dgst -sha256 -sign private.pem -out signature.sig artifact.txt
rekor-cli upload --artifact artifact.txt --signature signature.sig --public-key public.pem

@Hayden-IO Hayden-IO requested a review from bobcallaway July 10, 2026 23:02
@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.66667% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 18.79%. Comparing base (488eb97) to head (d0b22d4).
⚠️ Report is 725 commits behind head on main.

Files with missing lines Patch % Lines
cmd/rekor-cli/app/pflag_groups.go 63.15% 4 Missing and 3 partials ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #2885       +/-   ##
===========================================
- Coverage   66.46%   18.79%   -47.67%     
===========================================
  Files          92      191       +99     
  Lines        9258    20344    +11086     
===========================================
- Hits         6153     3824     -2329     
- Misses       2359    16013    +13654     
+ Partials      746      507      -239     
Flag Coverage Δ
e2etests ?
unittests 18.79% <66.66%> (-28.89%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

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.

1 participant