-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopencode.jsonc
More file actions
58 lines (58 loc) · 1.58 KB
/
opencode.jsonc
File metadata and controls
58 lines (58 loc) · 1.58 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
{
"$schema": "https://opencode.ai/config.json",
"permission": {
"edit": "allow",
"webfetch": "allow",
"bash": {
"*": "allow",
// Destructive file operations
"rm -rf /*": "deny",
"rm -rf /": "deny",
"rm *": "ask",
// Privilege escalation
"sudo *": "ask",
// Disk/filesystem destruction (Linux)
"dd *": "deny",
"mkfs *": "deny",
"fdisk *": "deny",
"parted *": "deny",
// Disk/filesystem destruction (macOS/BSD)
"diskutil eraseDisk*": "deny",
"diskutil eraseVolume*": "deny",
"diskutil partitionDisk*": "deny",
"diskutil apfs deleteContainer*": "deny",
"diskutil *": "ask",
"newfs*": "deny",
"mount *": "ask",
"umount *": "ask",
// System power
"shutdown *": "deny",
"reboot *": "deny",
"halt *": "deny",
// macOS system configuration
"nvram *": "deny",
"bless *": "deny",
"csrutil *": "deny",
"systemsetup *": "deny",
"launchctl *": "ask",
"networksetup *": "ask",
"scutil *": "ask",
"dscl *": "ask",
"pmset *": "ask",
"tmutil delete*": "deny",
"tmutil *": "ask",
// Git history destruction
"git push --force*": "ask",
"git reset --hard*": "ask",
// Git branch switching (potential uncommitted work loss)
"git checkout *": "ask",
"git switch *": "ask",
// Process/system disruption
"killall *": "ask",
"pkill *": "ask",
// Network exfiltration footguns
"curl * | *sh*": "deny",
"wget * | *sh*": "deny"
}
}
}