-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings.example.json
More file actions
61 lines (59 loc) · 1.82 KB
/
Copy pathsettings.example.json
File metadata and controls
61 lines (59 loc) · 1.82 KB
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
{
"_comment": "Example .claude/settings.json — copy to your project's .claude/settings.json and adjust hook paths.",
"hooks": {
"PreToolUse": [
{
"_comment": "Block dangerous shell quoting patterns (backtick-in-double-quote, bad f-strings, set slicing).",
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "python3 \"$CLAUDE_PROJECT_DIR/hooks/pre_shell_safety.py\""
}
]
},
{
"_comment": "Block destructive SQL (DROP, TRUNCATE, DELETE FROM, INSERT INTO SELECT) in Bash commands and file writes.",
"matcher": "Bash|Write|Edit",
"hooks": [
{
"type": "command",
"command": "python3 \"$CLAUDE_PROJECT_DIR/hooks/pre_destructive_writes.py\""
}
]
},
{
"_comment": "Enforce proxy routing when HTTPS_PROXY / HTTP_PROXY is set (or AGENT_PROXY_ENFORCE=1).",
"matcher": "Bash|Write|Edit",
"hooks": [
{
"type": "command",
"command": "python3 \"$CLAUDE_PROJECT_DIR/hooks/pre_proxy_enforcement.py\""
}
]
}
],
"PostToolUse": [
{
"_comment": "Warn when Bash output is large enough to thrash the context window.",
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "python3 \"$CLAUDE_PROJECT_DIR/hooks/post_output_size.py\""
}
]
},
{
"_comment": "Scan Bash output for prompt injection signals (instruction overrides, persona shifts, exfiltration probes).",
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "python3 \"$CLAUDE_PROJECT_DIR/hooks/post_injection_scan.py\""
}
]
}
]
}
}