-
Notifications
You must be signed in to change notification settings - Fork 1.7k
harden sandbox against agent config tampering (defense-in-depth) #654
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
2555c2f
0009f18
211f81f
34122f7
a272a74
1fc7f37
503a332
fb0ae40
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -36,9 +36,30 @@ filesystem_policy: | |||||||||||||||||
| - /dev/null | ||||||||||||||||||
| - /sandbox/.openclaw-data # Writable agent/plugin state (symlinked from .openclaw) | ||||||||||||||||||
|
|
||||||||||||||||||
| # TODO: evaluate landlock enforce mode — currently best_effort because | ||||||||||||||||||
| # enforce can break things in unpredictable ways. Needs thorough testing | ||||||||||||||||||
| # across different kernel versions before we flip this. (ref #516 item 3) | ||||||||||||||||||
| landlock: | ||||||||||||||||||
| compatibility: best_effort | ||||||||||||||||||
|
|
||||||||||||||||||
| # Prevent agents from tampering with their own config or killing the gateway. | ||||||||||||||||||
| # This is defense-in-depth on top of the filesystem permission lock from #514. | ||||||||||||||||||
| tool_policy: | ||||||||||||||||||
| deny: | ||||||||||||||||||
| - tool: write | ||||||||||||||||||
| paths: | ||||||||||||||||||
| - "**/.openclaw/openclaw.json" | ||||||||||||||||||
| - "/etc/openclaw/openclaw.json" | ||||||||||||||||||
| - "/tmp/openclaw/openclaw.json" | ||||||||||||||||||
| - tool: edit | ||||||||||||||||||
| paths: | ||||||||||||||||||
| - "**/.openclaw/openclaw.json" | ||||||||||||||||||
| - "/etc/openclaw/openclaw.json" | ||||||||||||||||||
|
Comment on lines
+52
to
+57
|
||||||||||||||||||
| - "/etc/openclaw/openclaw.json" | |
| - tool: edit | |
| paths: | |
| - "**/.openclaw/openclaw.json" | |
| - "/etc/openclaw/openclaw.json" | |
| - tool: edit | |
| paths: | |
| - "**/.openclaw/openclaw.json" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is now consistent — the start script only reads from /etc/openclaw/ (immutable template) and writes runtime config to /tmp/openclaw/ which is in the read_write zone. No more writes to /etc at runtime, so the filesystem_policy and tool_policy work as intended.
Uh oh!
There was an error while loading. Please reload this page.