Files
Dani d3ce23847f feat: improve secret-scanner hook with stdin JSON parsing
- Update description to list 30+ supported providers
- Simplify hook command by removing git commit grep filter
- Parse Claude Code JSON input from stdin to detect git commit
- Handle git commit -a and chained git add && git commit scenarios

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 20:21:52 -05:00

17 lines
772 B
JSON

{
"description": "Automatically detects hardcoded secrets before git commits. Scans for API keys from 30+ providers (Anthropic: sk-ant-..., OpenAI: sk-..., AWS: AKIA..., Stripe: sk_live_..., Google: AIza..., GitHub: ghp_..., Vercel, Supabase, Hugging Face: hf_..., Replicate: r8_..., Groq: gsk_..., Databricks: dapi..., GitLab, DigitalOcean, npm, PyPI, and more), tokens, passwords, private keys, and database credentials. Blocks commits containing secrets and suggests using environment variables instead.",
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "python3 \"$CLAUDE_PROJECT_DIR\"/.claude/hooks/secret-scanner.py"
}
]
}
]
}
}