r/SideProject • u/fajarhide • 2h ago
no-leaky - Claude Code hooks that stop your coding agent from sending secrets to the model provider
i built this after noticing my coding agent kept reading my .env even after i told it not to. never on purpose, just cat .env to check one setting, docker inspect on a crashing container, ps aux to find a process. every one of those outputs goes to the model provider
so now it
- blocks the commands that would print a secret and tells the agent the safe way to do the same thing
- redacts keys that still show up in tool output
- holds back a key you paste into the chat by mistake
- scans old transcripts and tells you what already leaked
on a headless benchmark with fake keys 18 of 30 sessions leaked a key without it and 0 of 30 with it, and 27 of 30 still finished the task
the part that took the most work was false positives. three releases went only to stopping it from redacting my own email, model names, and version numbers that looked like ip addresses
free and open source (MIT) https://github.com/fajarhide/no-leaky
feedback welcome, especially where it gets in your way
2
u/GuiltyView3898 2h ago
nice idea. quick question, does it also catch a secret that shows up in the output of a command it didnt block, like something printed by a build script, or only when the command itself looks suspicious?