Skip to content

fix(auth): make nonce randomness explicit - #37

Merged
sppidy merged 2 commits into
mainfrom
codex/codeql-nonce-fixes
Aug 21, 2026
Merged

sppidy merged 2 commits into
mainfrom
codex/codeql-nonce-fixes

Conversation

@sppidy

@sppidy sppidy commented Aug 21, 2026

Copy link
Copy Markdown
Owner

Summary

  • return internal-auth nonces directly from OsRng instead of a zero-initialized intermediate
  • replace hard-coded nonce fixtures with real generated nonces
  • add a freshness regression test

Closes the code patterns behind CodeQL alerts #1 through #5. The reported production path was already safe because OsRng.fill_bytes overwrote the complete buffer before signing; this change makes that guarantee explicit to the analyzer.

Validation

  • cargo test -p shared internal_auth -- --nocapture (5 passed)
  • cargo test -p server internal_auth -- --nocapture (3 passed)

@sppidy
sppidy marked this pull request as ready for review August 21, 2026 02:51
Copilot AI lite review requested due to automatic review settings August 21, 2026 02:51

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@sppidy
sppidy merged commit cf7518c into main Aug 21, 2026
8 checks passed
@sppidy
sppidy deleted the codex/codeql-nonce-fixes branch August 21, 2026 02:58
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.

2 participants