summaryrefslogtreecommitdiff
path: root/plugins/claude-security/hooks/hooks.json
blob: 419312648f02eb5913dfc33d5b7cf9ced5b7c938 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{
  "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": [
      {
        "matcher": "^claude-security:claude-security$",
        "hooks": [
          {
            "type": "command",
            "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
          }
        ]
      }
    ]
  }
}