Skip to content

hardening(docs): pepper rule as plain JS so key minting runs on node 20 - #24

Merged
SaulBuilds merged 1 commit into
mainfrom
fix/pba-r2-docs-mint-node20
Sep 25, 2026
Merged

SaulBuilds merged 1 commit into
mainfrom
fix/pba-r2-docs-mint-node20

Conversation

@SaulBuilds

Copy link
Copy Markdown
Contributor

Summary

Small hardening follow-up to #23: scripts/mint-mcp-key.mjs imported a .ts file, so it ran only on node ≥ 22.18.

  • Plain-JS rule. The shared pepper rule is now lib/auth/mcp-pepper.mjs (plain JS, no imports), with types in mcp-pepper.d.mts. The resolver, the mint script and check:mcp-keys all load it.
  • Tripwire. A test asserts the mint script and the shared rule import no TypeScript file.
  • Checked on node 20.19.2: the documented mint command mints under a valid pepper and refuses a weak one.

Tests and commands: main: 109 passed / 4 skipped. This PR: 110 / 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

…ode 20

lib/auth/mcp-pepper.ts becomes lib/auth/mcp-pepper.mjs (no imports), with
types in mcp-pepper.d.mts. The resolver, scripts/mint-mcp-key.mjs and
check:mcp-keys all load the .mjs, so the documented mint command works on any
supported node, not only node >= 22.18. A test asserts that the mint script
and the shared rule import no TypeScript file.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012cD3fDq5vhh2YWZPU2SV6H
@SaulBuilds
SaulBuilds merged commit 1168a03 into main Sep 25, 2026
9 checks passed
@SaulBuilds
SaulBuilds deleted the fix/pba-r2-docs-mint-node20 branch September 25, 2026 17:03
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