summaryrefslogtreecommitdiff
path: root/plugins/security-guidance/hooks/hooks.json
diff options
context:
space:
mode:
authorMohamed Hegazy <mhegazy@anthropic.com>2026-05-26 13:41:30 -0700
committerMohamed Hegazy <mhegazy@anthropic.com>2026-05-26 14:06:52 -0700
commit0bde1686488d8749c94263df9bf70600a7e730d9 (patch)
tree668c4c3eaa67f22b6cf24f2727975b65b81192f5 /plugins/security-guidance/hooks/hooks.json
parent1b527e2ee74e6dbd198e22cd41701c3b6f47dfec (diff)
Update security-guidance pluginsecurity-guidance-update
Diffstat (limited to 'plugins/security-guidance/hooks/hooks.json')
-rw-r--r--plugins/security-guidance/hooks/hooks.json63
1 files changed, 59 insertions, 4 deletions
diff --git a/plugins/security-guidance/hooks/hooks.json b/plugins/security-guidance/hooks/hooks.json
index 9d728c9f..0d29c5ac 100644
--- a/plugins/security-guidance/hooks/hooks.json
+++ b/plugins/security-guidance/hooks/hooks.json
@@ -1,15 +1,70 @@
{
- "description": "Security reminder hook that warns about potential security issues when editing files",
+ "description": "Security guidance plugin — pattern-based warnings on edits, git-diff-based LLM review on stop",
"hooks": {
- "PreToolUse": [
+ "SessionStart": [
{
"hooks": [
{
"type": "command",
- "command": "python3 \"${CLAUDE_PLUGIN_ROOT}/hooks/security_reminder_hook.py\""
+ "command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks/sg-python.sh\" \"${CLAUDE_PLUGIN_ROOT}/hooks/ensure_agent_sdk.py\"",
+ "timeout": 180
+ }
+ ]
+ }
+ ],
+ "UserPromptSubmit": [
+ {
+ "hooks": [
+ {
+ "type": "command",
+ "command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks/sg-python.sh\" \"${CLAUDE_PLUGIN_ROOT}/hooks/security_reminder_hook.py\""
+ }
+ ]
+ }
+ ],
+ "PostToolUse": [
+ {
+ "hooks": [
+ {
+ "type": "command",
+ "command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks/sg-python.sh\" \"${CLAUDE_PLUGIN_ROOT}/hooks/security_reminder_hook.py\""
+ }
+ ],
+ "matcher": "Edit|Write|MultiEdit|NotebookEdit"
+ },
+ {
+ "hooks": [
+ {
+ "type": "command",
+ "command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks/sg-python.sh\" \"${CLAUDE_PLUGIN_ROOT}/hooks/security_reminder_hook.py\"",
+ "if": "Bash(git commit:*)",
+ "asyncRewake": true,
+ "rewakeMessage": "Background security review of commit — address or acknowledge the findings below, then continue with the user's original request or continue waiting for their reply:",
+ "rewakeSummary": "Commit security review found issues"
+ },
+ {
+ "type": "command",
+ "command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks/sg-python.sh\" \"${CLAUDE_PLUGIN_ROOT}/hooks/security_reminder_hook.py\"",
+ "if": "Bash(git push:*)",
+ "asyncRewake": true,
+ "rewakeMessage": "Background security review of pushed commits not yet reviewed — address or acknowledge the findings below, then continue with the user's original request or continue waiting for their reply:",
+ "rewakeSummary": "Push security review found issues"
}
],
- "matcher": "Edit|Write|MultiEdit"
+ "matcher": "Bash"
+ }
+ ],
+ "Stop": [
+ {
+ "hooks": [
+ {
+ "type": "command",
+ "command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks/sg-python.sh\" \"${CLAUDE_PLUGIN_ROOT}/hooks/security_reminder_hook.py\"",
+ "asyncRewake": true,
+ "rewakeMessage": "Background security review feedback — address or acknowledge the findings below, then continue with the user's original request or continue waiting for their reply. This is supplementary, not a replacement for your previous response:",
+ "rewakeSummary": "Background security review found issues"
+ }
+ ]
}
]
}