PAT Scanner
shipped · started 2026.07 · now a product ↗︎ · source ↗︎ · live ↗︎
Block credential leaks at chat-time. Claude Code UserPromptSubmit hook that catches 13 PAT classes before they enter the transcript.
At a glance
Highlights
Stack
Bash · jq · POSIX ERE
Claude Code UserPromptSubmit hook that catches 13 PAT classes at chat-time — before secrets enter the transcript, not after. BUSL-1.1 (converts to MIT 2030). v0.1.0 + v0.1.1 shipped 2026-07-27 with 18/18 tests passing; v0.1.2 current.
Install
/plugin marketplace add JordanNewell/pat-scanner
/plugin install pat-scanner
Or clone and add locally via /plugin marketplace add.
What it catches
GitHub (ghp_-family, github_pat_), Anthropic (sk-ant-), OpenAI (legacy T3BlbkFJ + sk-proj-), Stripe (sk_/rk_/pk_), Slack (xox-family), PyPI (pypi-), AWS (AKIA), Figma (figd_), Z.ai/Zhipu (32hex.16alnum), generic JWTs (eyJ…), Natural.com (ak_ntl_prod_).
Plus a bypass keyword — BYPASS_SECRET_SCAN — for legitimate test fixtures. Audit log at ~/.pat-scanner/audit.log.
Why
Eight PAT-in-chat leaks in nine days on this fleet before this shipped. The git-time hook catches them at commit, but the transcript is already polluted by then. PAT Scanner blocks at the source — the prompt never reaches Claude.
Roadmap
v0.2 — hosted team tier with central logging + policy controls. Targeting $19/seat/mo for small teams that want fleet-wide visibility without self-hosting.

