Skip to content

sccache-dist: accept secret keys starting with a hyphen - #2957

Closed
56steve wants to merge 1 commit into
mozilla:mainfrom
56steve:fix/jwt-secret-key-leading-hyphen
Closed

56steve wants to merge 1 commit into
mozilla:mainfrom
56steve:fix/jwt-secret-key-leading-hyphen

Conversation

@56steve

@56steve 56steve commented Oct 27, 2026

Copy link
Copy Markdown

generate-jwt-hs256-key can print a key that starts with "-", and passing that to generate-jwt-hs256-server-token --secret-key made clap treat the value as an unknown flag. I set allow_hyphen_values on the secret-key argument so the value is taken as given, and added a parse test with a leading-hyphen key.

Fixes #2666

@codecov-commenter

codecov-commenter commented Oct 27, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.55%. Comparing base (dac6c80) to head (5f81261).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2957      +/-   ##
==========================================
+ Coverage   78.54%   78.55%   +0.01%     
==========================================
  Files          74       74              
  Lines       44039    44055      +16     
==========================================
+ Hits        34591    34608      +17     
+ Misses       9448     9447       -1     

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

let args = auth_generate_jwt_hs256_server_token(&[
"--server",
"127.0.0.1:4321",
"--secret-key",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

maybe also put --secret-key before --server in the test? this is the order from the issue

@56steve 56steve closed this Oct 28, 2026
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.

generate-jwt-hs256-key can produce a value that breaks generate-jwt-hs256-server-token CLI parsing

3 participants