-
Notifications
You must be signed in to change notification settings - Fork 414
Expand file tree
/
Copy pathpermissions.yaml
More file actions
60 lines (54 loc) · 1.61 KB
/
Copy pathpermissions.yaml
File metadata and controls
60 lines (54 loc) · 1.61 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
metadata:
readme: |
Permissions Example
This example demonstrates how to use the permissions configuration
to control tool approval behavior:
- deny: Tools matching these patterns are always rejected
- allow: Tools matching these patterns are auto-approved
- (default): Tools not matching either pattern require user confirmation
Evaluation order: Deny (first) -> Allow -> Ask (default)
permissions:
# Block dangerous commands (even with --yolo flag)
deny:
- "shell:cmd=rm *"
- "shell:cmd=sudo *"
- "shell:cmd=chmod *"
- "shell:cmd=sh *"
- "shell:cmd=bash *"
- "shell:cmd=zsh *"
- "shell:cmd=git push --force*"
- "shell:cmd=git reset --hard*"
- "shell:cmd=git clean -fd*"
# Auto-approve safe shell commands
allow:
- "shell:cmd=ls *"
- "shell:cmd=cat *"
- "shell:cmd=head *"
- "shell:cmd=tail *"
- "shell:cmd=wc *"
- "shell:cmd=find *"
- "shell:cmd=grep *"
- "shell:cmd=pwd"
- "shell:cmd=echo *"
- "shell:cmd=which *"
- "shell:cmd=type *"
- "shell:cmd=file *"
- "shell:cmd=stat *"
- "shell:cmd=git status*"
- "shell:cmd=git log*"
- "shell:cmd=git diff*"
- "shell:cmd=git show*"
- "shell:cmd=git branch*"
- "shell:cmd=git remote -v*"
- "shell:cmd=go test*"
- "shell:cmd=go build*"
- "shell:cmd=go fmt*"
- "shell:cmd=go vet*"
- "shell:cmd=go mod*"
agents:
root:
model: anthropic/claude-haiku-4-5
description: A helpful assistant with controlled tool permissions
instruction: You are a helpful assistant with limited shell access.
toolsets:
- type: shell