Security Secret Scanner
Security Secret Scanner intercepts file writes and git commits to scan for sensitive data patterns. It checks for AWS keys, GitHub tokens, private keys, database connection strings, JWT secrets, and dozens of other credential patterns using regex rules inspired by tools like trufflehog and gitleaks. When a potential secret is detected, it blocks the operation and highlights the exact line and pattern matched. This prevents the most common security incident in development: accidentally committing secrets to version control.
Hook Code
Add this hook to your Claude Code settings or .claude/settings.json to activate.
Terminal Preview
About Security Secret Scanner
Claude Code hooks let you run custom shell commands automatically in response to specific events during Claude's operation. Security Secret Scanner is a Pre-Tool hook at the Advanced level that automates tasks at key moments in your development workflow, reducing manual steps and enforcing consistency across your team.