Initial commit

This commit is contained in:
Zhongwei Li
2025-11-30 08:40:36 +08:00
commit 34fa7a66b7
6 changed files with 630 additions and 0 deletions

46
hooks/hooks.json Normal file
View File

@@ -0,0 +1,46 @@
{
"description": "Secret scanner that blocks sensitive credentials before they are sent to Claude Code or Cursor",
"hooks": {
"UserPromptSubmit": [
{
"hooks": [
{
"type": "command",
"command": "python3 ${CLAUDE_PLUGIN_ROOT}/hooks/secrets_scanner_hook.py --mode=pre --client=claude_code"
}
]
}
],
"PreToolUse": [
{
"matcher": "Read|read",
"hooks": [
{
"type": "command",
"command": "python3 ${CLAUDE_PLUGIN_ROOT}/hooks/secrets_scanner_hook.py --mode=pre --client=claude_code"
}
]
}
],
"PostToolUse": [
{
"matcher": "Read|read",
"hooks": [
{
"type": "command",
"command": "python3 ${CLAUDE_PLUGIN_ROOT}/hooks/secrets_scanner_hook.py --mode=post --client=claude_code"
}
]
},
{
"matcher": "Bash|bash",
"hooks": [
{
"type": "command",
"command": "python3 ${CLAUDE_PLUGIN_ROOT}/hooks/secrets_scanner_hook.py --mode=post --client=claude_code"
}
]
}
]
}
}