Originally published at chudi.dev
I ran a secret scanner on every project for months before I realized Claude Code was writing .env files with real credentials baked in. Not because it was malicious. Just because the context had a key, and it needed a value.
The fix took five minutes once I knew hooks existed.
Claude Code hooks let you run...
🛡️ VERIFIED CYBER INTELLIGENCE ID: #3396882