Repository navigation
1 Architecture
Bosaj edited this page Nov 1, 2026
·
2 revisions
src/rules.ts what to find, with validators (Luhn, mod 97, entropy)
src/mask.ts mask(), Vault (in memory), StreamUnmasker
src/proxy.ts local proxy: JSON and server-sent events
src/cli.ts the secret-mask command
web/ the page, which uses the same src/mask.ts
- A value never reaches a log, an error message or the
scanoutput. - The proxy refuses a body it can't inspect rather than forwarding it, and listens on loopback only.
- Every pattern is bounded: anyone can paste anything. The first version took 36 s on 200 KB of hostile input, and a test now enforces a limit.
- The page's security policy (
connect-src 'none') stops it from sending anything, and a browser test checks that.
Prompt Secret & PII Masker for LLMs Documentation — Maintained by @Bosaj