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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
{
"description": "Shows the Claude Security plugin's banner when the /claude-security menu opens in a terminal. Elsewhere it shows one plain line on auto mode, unless the session is in auto mode. Notes the id of the prompt at which /claude-security:threat-model is typed, and stops that command where it finds that it cannot. Reports usage counts after the plugin's helper scripts run. If the yes/no question asked before a scan or an attack surface analysis starts is left unanswered for 60 seconds, cancels it. No hook approves a call or changes its input. Suggests a scan of the changes after a branch is pushed or a pull request opened. Checks the Bash commands of the plugin's own agents, and refuses some. It can miss a command. From all of them: kill, pkill, killall, a sed script that the shell fills in, git config with --global or --system, in full or shortened, and an override of git's refusal of a repository. From all of them, except claude-security:claude-security as the main agent of a session: some commands that download or install, such as pip download or npm install. From the patch verifier: a call that hands over its notes (patch_artifacts.py --keep-notes) in any form but one. From a scan's verifiers, the explore agents, and a codebase scan's inventory and its component and sheet researchers: an interpreter or pip, such as python or node. From the agents of the attack surface analysis: other commands, such as python or rm. Draws a live view of a scan while it runs, and changes nothing in it.",
"modules": ["./live/register.js"],
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "sh \"${CLAUDE_PLUGIN_ROOT}/hooks/hooks.sh\" guard || true",
"timeout": 30
}
]
}
],
"UserPromptExpansion": [
{
"matcher": "^claude-security:claude-security$",
"hooks": [
{
"type": "command",
"command": "sh \"${CLAUDE_PLUGIN_ROOT}/hooks/hooks.sh\" banner",
"timeout": 30
}
]
},
{
"matcher": "^claude-security:threat-model$",
"hooks": [
{
"type": "command",
"command": "sh \"${CLAUDE_PLUGIN_ROOT}/hooks/hooks.sh\" turn || true",
"timeout": 10
}
]
}
],
"PostToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "sh \"${CLAUDE_PLUGIN_ROOT}/hooks/hooks.sh\" metrics || true",
"if": "Bash(*py* *plugin*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
}
]
}
],
"PostToolUseFailure": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "sh \"${CLAUDE_PLUGIN_ROOT}/hooks/hooks.sh\" metrics || true",
"if": "Bash(*py* *plugin*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,
"onFailure": "continue"
}
]
}
]
}
}
|