Inspiration
Every week I paste a stack trace, an .env file or a config into ChatGPT to debug something, and half the time a live key or password is in there. Deleting the chat later doesn't revoke the key. The usual advice, "just be careful", stops working at 2 a.m. before a deadline.
What it does
- Finds API keys, passwords, tokens, emails, phone numbers, card numbers, IPs and OS usernames in pasted text (46 rules, 32 data types).
- Swaps each one for a stable placeholder like
<GITHUB_TOKEN_1>, so the AI can still reason about the text. - Paste the AI's reply back and your real values reappear, only on your screen.
- A Chrome extension does both inside ChatGPT, Claude and Gemini: it masks on paste and restores the replies in place.
- Redacts screenshots with on-device OCR, and audits a ChatGPT or Claude data export for keys you already leaked, with a revoke link for each.
How we built it
React and TypeScript with a pure detection core shared by the web app and the extension. The detectors combine provider key formats, context rules (password=, Authorization:, connection strings), checksums (Luhn, IBAN mod-97) and an entropy fallback that skips git SHAs, UUIDs and hashes. Names use DistilBERT NER through Transformers.js in a Web Worker. Screenshots use Tesseract.js. Nothing runs on a server. Deployed on Deployxa, built from GitHub on every push.
Challenges we ran into
OCR splits sk_live_ into sk_ live, so words are re-joined by pixel gap and key prefixes re-attached. Restoring replies inside chat sites without breaking their React DOM meant editing text nodes in place and tinting them with the CSS Custom Highlight API.
Accomplishments that we're proud of
Precision 0.954 and recall 0.954 on the first run over a 50-case synthetic held-out set the detector had never seen, written by a separate generator script with decoys like SHAs, CSP nonces, version numbers and placeholders. 25 automated tests, including the extension running in a real Chromium.
What we learned
Most "secret detection" is about what not to flag. Placeholders and version numbers caused more errors than real keys did.
What's next
Firefox support, per-site rules, and a local model tuned for names in code and logs, the weakest category today (13 of 20 names found).
Built With
- chrome
- claude
- fflate
- ner
- onnx-runtime-web
- react
- tesseract.js
- transformers.js
- tts
- typescript
- vite
- vitest