hardening(docs): mint script uses the resolver's pepper rule - #23
Merged
Merged
Conversation
The pepper rule moves to lib/auth/mcp-pepper.ts (no server-only or alias imports). lib/auth/mcp-keys.ts re-exports it, and scripts/mint-mcp-key.mjs uses it, so the script refuses any pepper the resolver would refuse and never mints a key that can't resolve. check:mcp-keys loads the shared module. A parity test mints under a table of peppers and asserts that a key is minted exactly when the resolver accepts the pepper, and that it then resolves. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012cD3fDq5vhh2YWZPU2SV6H
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Small hardening follow-up to #22.
lib/auth/mcp-pepper.ts, which has no server-only or alias imports.lib/auth/mcp-keys.tsre-exports it.scripts/mint-mcp-key.mjsnow applies the same rule, so it refuses any pepper the resolver would refuse and never mints a key that can't resolve.check:mcp-keysloads the shared module.Tests and commands: main: 101 passed / 4 skipped. This PR: 109 / 4. The run used node 22.21.1 and npm 10.9.4:
npm ci,audit --audit-level=high,typecheck,test,build,verify:bundle,content-lint --strict,sbom. All green.🤖 Generated with Claude Code
https://claude.ai/code/session_012cD3fDq5vhh2YWZPU2SV6H