File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,3 +13,4 @@ target/
1313# MSVC Windows builds of rustc generate these, which store debugging information
1414* .pdb
1515actionlint
16+ worktrees /
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ network_mode = "offline"
55
66[filesystem ]
77allow_read = [
8+ # System paths
89 " /usr" ,
910 " /bin" ,
1011 " /sbin" ,
@@ -21,8 +22,16 @@ allow_read = [
2122 " /var/run" ,
2223 " /tmp" ,
2324 " /dev" ,
25+ # sx config
2426 " ~/.config/sx" ,
25- " ~/Library" ,
27+ # ~/Library - allowlist only safe subdirectories (shift-left)
28+ " ~/Library/Caches/" ,
29+ " ~/Library/Preferences/" ,
30+ " ~/Library/Application Support/" ,
31+ " ~/Library/Logs/" ,
32+ " ~/Library/Frameworks/" ,
33+ " ~/Library/Keychains/" , # Encrypted, requires Security framework ACL to access secrets
34+ " ~/Library/Developer/" ,
2635 # Shell config files (read-only)
2736 " ~/.zshrc" ,
2837 " ~/.zshenv" ,
@@ -32,6 +41,7 @@ allow_read = [
3241 " ~/.profile" ,
3342 " ~/.inputrc" ,
3443]
44+ # This enforce deny on critical path containing sensibles data even if user allow HOME directory in global config
3545deny_read = [
3646 " ~/.ssh" ,
3747 " ~/.aws" ,
@@ -42,10 +52,8 @@ deny_read = [
4252]
4353allow_write = [
4454 " /tmp" ,
45- " /private/var/folders" ,
46- " /private/var/run" ,
47- " /var/folders" ,
48- " /var/run"
55+ " /private$TMPDIR" , # Session-specific temp dir (canonical path)
56+ " $TMPDIR" , # Session-specific temp dir (symlink path)
4957]
5058
5159[shell ]
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ network_mode = "online"
66allow_read = [
77 " ~/.claude" ,
88 " ~/.claude.json" ,
9+ " ~/.claude.lock" ,
910 " ~/.local/share/claude" ,
1011 " ~/.local/bin/claude" ,
1112 " ~/.CFUserTextEncoding" ,
@@ -15,7 +16,10 @@ allow_read = [
1516allow_write = [
1617 " ~/.claude" ,
1718 " ~/.claude.json" ,
19+ " ~/.claude.lock" ,
20+ " ~/.local/share/claude" ,
1821 " ~/Library/Caches/claude-cli-nodejs/" ,
22+ " ~/Library/Keychains/login.keychain-db" , # OAuth token refresh
1923 " /private/tmp/claude*" , # claude-UID directories (e.g. claude-501)
2024 " /private/tmp/zsh*" , # When claude use zsh in bash it create dynamic tmp file
2125]
You can’t perform that action at this time.
0 commit comments