Skip to content

Commit 7b61dd4

Browse files
committed
docs: clarify exec filesystem mutation surface
1 parent 296e6e5 commit 7b61dd4

5 files changed

Lines changed: 9 additions & 3 deletions

File tree

‎docs/gateway/sandbox-vs-tool-policy-vs-elevated.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ Rules of thumb:
6464
- `deny` always wins.
6565
- If `allow` is non-empty, everything else is treated as blocked.
6666
- Tool policy is the hard stop: `/exec` cannot override a denied `exec` tool.
67+
- Tool policy filters tool availability by name; it does not inspect side effects inside `exec`. If `exec` is allowed, denying `write`, `edit`, or `apply_patch` does not make shell commands read-only.
6768
- `/exec` only changes session defaults for authorized senders; it does not grant tool access.
6869
Provider tool keys accept either `provider` (e.g. `google-antigravity`) or `provider/model` (e.g. `openai/gpt-5.4`).
6970

@@ -88,6 +89,7 @@ Available groups:
8889
- `group:runtime`: `exec`, `process`, `code_execution` (`bash` is accepted as
8990
an alias for `exec`)
9091
- `group:fs`: `read`, `write`, `edit`, `apply_patch`
92+
For read-only agents, deny `group:runtime` as well as mutating filesystem tools unless sandbox filesystem policy or a separate host boundary enforces the read-only constraint.
9193
- `group:sessions`: `sessions_list`, `sessions_history`, `sessions_send`, `sessions_spawn`, `sessions_yield`, `subagents`, `session_status`
9294
- `group:memory`: `memory_search`, `memory_get`
9395
- `group:web`: `web_search`, `x_search`, `web_fetch`

‎docs/gateway/security/index.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ Advisory triage guidance:
220220

221221
- **Inbound access** (DM policies, group policies, allowlists): can strangers trigger the bot?
222222
- **Tool blast radius** (elevated tools + open rooms): could prompt injection turn into shell/file/network actions?
223+
- **Exec filesystem drift**: are mutating filesystem tools denied while `exec`/`process` remain available without sandbox filesystem constraints?
223224
- **Exec approval drift** (`security=full`, `autoAllowSkills`, interpreter allowlists without `strictInlineEval`): are host-exec guardrails still doing what you think they are?
224225
- `security="full"` is a broad posture warning, not proof of a bug. It is the chosen default for trusted personal-assistant setups; tighten it only when your threat model needs approval or allowlist guardrails.
225226
- **Network exposure** (Gateway bind/auth, Tailscale Serve/Funnel, weak/short auth tokens).

‎docs/gateway/tools-invoke-http-api.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ If a tool is not allowed by policy, the endpoint returns **404**.
9797
Important boundary notes:
9898

9999
- Exec approvals are operator guardrails, not a separate authorization boundary for this HTTP endpoint. If a tool is reachable here via Gateway auth + tool policy, `/tools/invoke` does not add an extra per-call approval prompt.
100+
- If `exec` is reachable here, treat it as a mutating shell surface. Denying `write`, `edit`, `apply_patch`, or HTTP filesystem-write tools does not make shell execution read-only.
100101
- Do not share Gateway bearer credentials with untrusted callers. If you need separation across trust boundaries, run separate gateways (and ideally separate OS users/hosts).
101102

102103
Gateway HTTP also applies a hard deny list by default (even if session policy allows the tool):

‎docs/tools/exec-approvals.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ Exec approvals are enforced locally on the execution host:
5656

5757
- Gateway-authenticated callers are trusted operators for that Gateway.
5858
- Paired nodes extend that trusted operator capability onto the node host.
59-
- Exec approvals reduce accidental execution risk, but are **not** a per-user auth boundary.
59+
- Exec approvals reduce accidental execution risk, but are **not** a per-user auth boundary or filesystem read-only policy.
60+
- Once approved, a command can mutate files according to the selected host or sandbox filesystem permissions.
6061
- Approved node-host runs bind canonical execution context: canonical cwd, exact argv, env binding when present, and pinned executable path when applicable.
6162
- For shell scripts and direct interpreter/runtime file invocations, OpenClaw also tries to bind one concrete local file operand. If that bound file changes after approval but before execution, the run is denied instead of executing drifted content.
6263
- File binding is intentionally best-effort, **not** a complete semantic model of every interpreter/runtime loader path. If approval mode cannot identify exactly one concrete local file to bind, it refuses to mint an approval-backed run instead of pretending full coverage.

‎docs/tools/exec.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ read_when:
66
title: "Exec tool"
77
---
88

9-
Run shell commands in the workspace. Supports foreground + background execution via `process`.
10-
If `process` is disallowed, `exec` runs synchronously and ignores `yieldMs`/`background`.
9+
Run shell commands in the workspace. `exec` is a mutating shell surface: commands can create, edit, or delete files wherever the selected host or sandbox filesystem permits. Disabling OpenClaw filesystem tools such as `write`, `edit`, or `apply_patch` does not make `exec` read-only.
10+
11+
Supports foreground + background execution via `process`. If `process` is disallowed, `exec` runs synchronously and ignores `yieldMs`/`background`.
1112
Background sessions are scoped per agent; `process` only sees sessions from the same agent.
1213

1314
## Parameters

0 commit comments

Comments
 (0)