diff options
| author | Claude <noreply@anthropic.com> | 2026-11-06 00:54:48 +0000 |
|---|---|---|
| committer | Claude <noreply@anthropic.com> | 2026-11-06 00:54:48 +0000 |
| commit | 7aba3deae3ff17d032c37e07d2929d1426b34278 (patch) | |
| tree | 9c482f9acda1599bd2f9bed95a6a46b75e634e80 /plugins/claude-security/hooks/hooks.json | |
| parent | 5472f5f56e0070feeeb464318b316714fe3e9105 (diff) | |
| parent | b8331dd69ab3e132bbf8cd6e89b5d8c1747e21b1 (diff) | |
Merge remote-tracking branch 'origin/main' into add-plugin/xcodeadd-plugin/xcode
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 + } + ] + } ] } } |
