Repository navigation
Expand file tree
/
Copy pathsettings-example.json
More file actions
68 lines (68 loc) · 1.51 KB
/
Copy pathsettings-example.json
File metadata and controls
68 lines (68 loc) · 1.51 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
62
63
64
65
66
67
68
{
"permissions": {
"allow": [
"Read",
"Edit",
"Write",
"Glob",
"Grep",
"Bash(ls *)",
"Bash(git status*)",
"Bash(git log*)",
"Bash(git diff*)",
"Bash(git add *)",
"Bash(git commit *)",
"Bash(npm run *)",
"Bash(npm test *)",
"Bash(npm install *)",
"Bash(node *)"
],
"deny": [
"Bash(git push --force*)",
"Bash(git reset --hard*)",
"Bash(git clean -f*)",
"Bash(rm -rf /*)",
"Bash(rm -rf ~*)"
]
},
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "$HOME/.claude/hooks/security-guard.sh"
}
]
},
{
"matcher": "Read",
"hooks": [
{
"type": "command",
"command": "$HOME/.claude/hooks/read-guard.sh"
}
]
},
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "$HOME/.claude/hooks/bash-read-guard.sh"
}
]
},
{
"matcher": "Edit",
"hooks": [
{
"type": "command",
"command": "INPUT=$(cat -); FILE=$(echo \"$INPUT\" | jq -r '.tool_input.file_path // empty' 2>/dev/null); if echo \"$FILE\" | grep -qiE '\\.(claude/(settings|hooks))'; then echo 'BLOCKED: Cannot modify security hooks or settings via Edit tool.' >&2; exit 2; fi"
}
]
}
]
}
}