-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.toml.example
More file actions
159 lines (141 loc) · 3.06 KB
/
config.toml.example
File metadata and controls
159 lines (141 loc) · 3.06 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
# Guardian Shell — Example Configuration
#
# To get started, copy this file and replace /home/user with your actual home:
# cp config.toml.example config.toml
# sed -i 's|/home/user|/home/YOUR_USERNAME|g' config.toml
# sudo target/release/guardian --config config.toml
#
# For preset configs, see configs/ directory:
# configs/minimal.toml — Monitor-only, bare minimum
# configs/recommended.toml — Production defaults
# configs/strict.toml — Maximum security
# configs/development.toml — Verbose debugging
[global]
log_level = "info"
mode = "enforce"
pid_rescan_interval = 5
socket_path = "/run/guardian.sock"
[dashboard]
enabled = true
listen_address = "127.0.0.1:8080"
[alerting]
min_severity = "warning"
dedup_window_seconds = 300
rate_limit_per_minute = 100
[alerting.json_log]
enabled = true
path = "/var/log/guardian/events.json"
max_size_mb = 100
max_files = 5
[alerting.prometheus]
enabled = true
listen_address = "127.0.0.1:9090"
endpoint = "/metrics"
[[agents]]
name = "claude-code"
process_name = "claude"
watch_children = true
[agents.file_access]
default = "deny"
allow = [
"/home/user/projects/allowed/**",
"/home/user/projects/myproject/**",
"/home/user/**",
"/home/**",
"/tmp/**",
"/proc/**",
"/sys/**",
"/dev/**",
"/usr/lib/**",
"/usr/lib64/**",
"/usr/libexec/**",
"/usr/share/**",
"/usr/local/**",
"/usr/bin/**",
"/usr/sbin/**",
"/lib/**",
"/lib64/**",
"/bin/**",
"/etc/**",
"/run/**",
"/var/**",
]
deny = [
"/home/user/projects/restricted/**",
"/etc/shadow",
"/etc/gshadow",
"/home/user/.ssh/**",
"/home/user/.gnupg/**",
"/home/user/.aws/**",
]
[agents.exec_policy]
default = "allow"
allow = [
"/usr/bin/**",
"/usr/libexec/**",
"/usr/local/bin/**",
"/bin/**",
]
deny = [
"/usr/bin/grep",
]
[agents.network_policy]
default = "allow"
deny_ports = [8000]
[[agents]]
name = "claude-cgroup"
identity = "cgroup"
watch_children = true
[agents.file_access]
default = "deny"
allow = [
# Project workspace
"/home/user/projects/**",
# Home directory (Claude needs dotfiles, configs, cache)
"/home/user/**",
# Claude binary + node (installed via mise)
"/home/user/.local/**",
# Temp and runtime
"/tmp/**",
"/proc/**",
"/sys/**",
"/dev/**",
"/run/**",
"/var/tmp/**",
# Shared libraries and system binaries
"/usr/lib/**",
"/usr/lib64/**",
"/usr/libexec/**",
"/usr/share/**",
"/usr/local/**",
"/usr/bin/**",
"/usr/sbin/**",
"/lib/**",
"/lib64/**",
"/bin/**",
# System config (deny rules protect /etc/shadow, /etc/gshadow)
"/etc/**",
"/var/**",
]
deny = [
"/home/user/projects/.env",
"/etc/shadow",
"/etc/gshadow",
"/home/user/.ssh/**",
"/home/user/.aws/**",
"/home/user/.gnupg/**",
]
[agents.exec_policy]
default = "allow"
allow = [
"/usr/bin/**",
"/usr/libexec/**",
"/usr/local/bin/**",
"/bin/**",
]
deny = [
"/usr/bin/grep",
]
[agents.network_policy]
default = "allow"
deny_ports = [8000]