| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124 |
- {
- "description": "Security guidance plugin — pattern-based warnings on edits, git-diff-based LLM review on stop",
- "hooks": {
- "SessionStart": [
- {
- "hooks": [
- {
- "type": "command",
- "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 -C * 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"
- },
- {
- "type": "command",
- "command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks/sg-python.sh\" \"${CLAUDE_PLUGIN_ROOT}/hooks/security_reminder_hook.py\"",
- "if": "Bash(git -C * 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"
- },
- {
- "type": "command",
- "command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks/sg-python.sh\" \"${CLAUDE_PLUGIN_ROOT}/hooks/security_reminder_hook.py\"",
- "if": "Bash(gt create:*)",
- "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(gt modify:*)",
- "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(gt submit:*)",
- "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": "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"
- }
- ]
- }
- ],
- "SubagentStop": [
- {
- "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"
- }
- ]
- }
- ]
- }
- }
|