summaryrefslogtreecommitdiff
path: root/plugins/claude-security/hooks/hooks.json
diff options
context:
space:
mode:
authorTobin South <tobin.south@gmail.com>2026-09-01 11:36:49 -0700
committerGitHub <noreply@github.com>2026-09-01 11:36:49 -0700
commite18ff5086423bd9c21902ce3100dc4ecc84a668a (patch)
tree7ed935773a561a74448b1fa42d6bcb135be7fb11 /plugins/claude-security/hooks/hooks.json
parent4b909c3492b350cdc42160ffe4b135e6f5c1db12 (diff)
parentf85f7cfcbbe9c949ba63304add8be7daf5c13e78 (diff)
Merge pull request #5728 from anthropics/claude-security-v0.11.0
Diffstat (limited to 'plugins/claude-security/hooks/hooks.json')
-rw-r--r--plugins/claude-security/hooks/hooks.json32
1 files changed, 30 insertions, 2 deletions
diff --git a/plugins/claude-security/hooks/hooks.json b/plugins/claude-security/hooks/hooks.json
index 9608c949..41931264 100644
--- a/plugins/claude-security/hooks/hooks.json
+++ b/plugins/claude-security/hooks/hooks.json
@@ -1,5 +1,5 @@
{
- "description": "A display-only banner: on the /claude-security menu it prints the Claude Security banner as a systemMessage. It fires only on UserPromptExpansion for that slash command. It is a sensor: it emits a message and never returns a permission decision.",
+ "description": "Shows the Claude Security banner when the /claude-security menu opens and reports usage counts after the plugin's helper scripts run.",
"hooks": {
"UserPromptExpansion": [
{
@@ -7,7 +7,35 @@
"hooks": [
{
"type": "command",
- "command": "sh \"${CLAUDE_PLUGIN_ROOT}/hooks/banner_hook.sh\""
+ "command": "sh \"${CLAUDE_PLUGIN_ROOT}/hooks/hooks.sh\" banner"
+ }
+ ]
+ }
+ ],
+ "PostToolUse": [
+ {
+ "matcher": "Bash",
+ "hooks": [
+ {
+ "type": "command",
+ "command": "sh \"${CLAUDE_PLUGIN_ROOT}/hooks/hooks.sh\" metrics",
+ "if": "Bash(python3 *claude-security*scripts/*.py *)",
+ "asyncRewake": true,
+ "timeout": 10
+ }
+ ]
+ }
+ ],
+ "PostToolUseFailure": [
+ {
+ "matcher": "Bash",
+ "hooks": [
+ {
+ "type": "command",
+ "command": "sh \"${CLAUDE_PLUGIN_ROOT}/hooks/hooks.sh\" metrics",
+ "if": "Bash(python3 *claude-security*scripts/*.py *)",
+ "asyncRewake": true,
+ "timeout": 10
}
]
}