diff options
Diffstat (limited to 'plugins/claude-security/hooks/hooks.json')
| -rw-r--r-- | plugins/claude-security/hooks/hooks.json | 36 |
1 files changed, 31 insertions, 5 deletions
diff --git a/plugins/claude-security/hooks/hooks.json b/plugins/claude-security/hooks/hooks.json index 41931264..98b5b6a4 100644 --- a/plugins/claude-security/hooks/hooks.json +++ b/plugins/claude-security/hooks/hooks.json @@ -1,5 +1,5 @@ { - "description": "Shows the Claude Security banner when the /claude-security menu opens and reports usage counts after the plugin's helper scripts run.", + "description": "Shows the Claude Security banner when the /claude-security menu opens, reports usage counts after the plugin's helper scripts run, closes the yes/no question asked before a scan starts if it is left unanswered for 60 seconds, and suggests a scan of the changes after a branch is pushed or a pull request opened.", "hooks": { "UserPromptExpansion": [ { @@ -18,10 +18,23 @@ "hooks": [ { "type": "command", - "command": "sh \"${CLAUDE_PLUGIN_ROOT}/hooks/hooks.sh\" metrics", - "if": "Bash(python3 *claude-security*scripts/*.py *)", + "command": "sh \"${CLAUDE_PLUGIN_ROOT}/hooks/hooks.sh\" metrics || true", + "if": "Bash(py* *claude-security*scripts/*.py *)", + "async": true, "asyncRewake": true, "timeout": 10 + }, + { + "type": "command", + "command": "sh \"${CLAUDE_PLUGIN_ROOT}/hooks/hooks.sh\" tip push || true", + "if": "Bash(git push *)", + "timeout": 5 + }, + { + "type": "command", + "command": "sh \"${CLAUDE_PLUGIN_ROOT}/hooks/hooks.sh\" tip pr || true", + "if": "Bash(gh pr create *)", + "timeout": 5 } ] } @@ -32,13 +45,26 @@ "hooks": [ { "type": "command", - "command": "sh \"${CLAUDE_PLUGIN_ROOT}/hooks/hooks.sh\" metrics", - "if": "Bash(python3 *claude-security*scripts/*.py *)", + "command": "sh \"${CLAUDE_PLUGIN_ROOT}/hooks/hooks.sh\" metrics || true", + "if": "Bash(py* *claude-security*scripts/*.py *)", + "async": true, "asyncRewake": true, "timeout": 10 } ] } + ], + "PermissionRequest": [ + { + "matcher": "AskUserQuestion", + "hooks": [ + { + "type": "command", + "command": "sh \"${CLAUDE_PLUGIN_ROOT}/hooks/hooks.sh\" unanswered || true", + "timeout": 90 + } + ] + } ] } } |
