Skip to content

Clarify exec filesystem policy drift - #79153

Merged
joshavant merged 3 commits into
mainfrom
docs/exec-write-policy-60694
May 8, 2026
Merged

joshavant merged 3 commits into
mainfrom
docs/exec-write-policy-60694

Conversation

@joshavant

Copy link
Copy Markdown
Collaborator

Summary

  • clarify that disabling OpenClaw filesystem tools does not make exec read-only
  • add a security audit and doctor warning for configs that deny mutating filesystem tools while leaving exec available without sandbox filesystem constraints
  • document the warning in the security CLI and audit check reference

Fixes #60694

Verification

  • pnpm test src/security/audit-exec-surface.test.ts src/commands/doctor-security.test.ts -- --run
  • pnpm check:changed
  • pnpm docs:check-mdx
  • pnpm format:docs:check
  • pnpm docs:check-i18n-glossary
  • pnpm lint:docs
  • git diff --check
  • git diff --check origin/main...HEAD after clean rebase onto current origin/main

@joshavant
joshavant requested a review from a team as a code owner May 8, 2026 00:55
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime security Security documentation commands Command implementations docker Docker and sandbox tooling size: M maintainer Maintainer-authored PR labels May 8, 2026
@clawsweeper

clawsweeper Bot commented May 8, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge.

Summary
This PR documents that exec remains a mutating shell despite denied filesystem tools and adds a security audit/doctor warning for configs that disable write/edit/apply_patch while leaving exec available without sandbox filesystem constraints.

Reproducibility: yes. The linked issue has a high-confidence source reproduction path on current main: deny write/edit/apply_patch while allowing exec/process, then exec remains available as a shell surface wherever the selected host or sandbox filesystem permits writes.

Real behavior proof
Needs real behavior proof before merge: Missing: add redacted terminal output, logs, screenshot, recording, or linked artifact showing the new audit/doctor warning after the fix; updating the PR body should trigger review, or a maintainer can comment @clawsweeper re-review. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, ask a maintainer to comment @clawsweeper re-review.

Next step before merge
Protected security/maintainer labels and the missing real-behavior proof require maintainer review and contributor proof rather than a ClawSweeper repair PR.

Security
Cleared: The diff adds docs, tests, and security audit/doctor warning logic without introducing CI, dependency, secret-handling, package, or external code-execution changes.

Review details

Best possible solution:

Land a maintainer-reviewed version that clearly documents the name-only tool policy boundary and emits a targeted audit/doctor warning for unsafe read-only-looking configs.

Do we have a high-confidence way to reproduce the issue?

Yes. The linked issue has a high-confidence source reproduction path on current main: deny write/edit/apply_patch while allowing exec/process, then exec remains available as a shell surface wherever the selected host or sandbox filesystem permits writes.

Is this the best way to solve the issue?

Yes for a conservative diagnostic/docs fix. It avoids brittle shell-content inspection and uses existing audit/doctor surfaces, while leaving stronger enforcement as a separate maintainer security decision.

What I checked:

  • PR metadata: GitHub API shows this PR is open, contributor-authored, head 7b61dd4, labeled security and maintainer, and linked to Security: exec tool bypasses write deny in security executor agents #60694. (7b61dd49c959)
  • Current policy boundary: Current main policy matching allows or denies named tools; it special-cases apply_patch against write allow, but does not constrain filesystem side effects inside exec commands. (src/agents/tool-policy-match.ts:14, 31a710c5a632)
  • Current exec behavior: Current main resolves the effective exec host and proceeds to gateway/node/sandbox command execution; the path is shell execution, not a write/edit policy interpreter. (src/agents/bash-tools.exec.ts:1348, 31a710c5a632)
  • PR implementation: The new helper computes scopes where exec is allowed, all mutating filesystem tools are disabled, and sandbox filesystem policy is not constraining the exec surface. (src/security/exec-filesystem-policy.ts:64, 7b61dd49c959)
  • Related issue context: The linked issue already had a ClawSweeper source-repro review confirming current main keeps exec available under write/edit denial and asking for maintainer security direction. (31a710c5a632)
  • Proof gate: GitHub check-runs for the PR head include a failing Real behavior proof check; the PR body lists commands but no inspected live output, log, screenshot, or recording of the new warning behavior. (7b61dd49c959)

Likely related people:

  • steipete: Recent GitHub path history shows repeated work on exec runtime, security audit, doctor-security, and related docs around this policy surface. (role: recent maintainer and adjacent owner; confidence: high; commits: 538605ff44d2, 99176e1950e2, bd0e10a2f68f; files: src/agents/bash-tools.exec.ts, src/security/audit.ts, src/commands/doctor-security.ts)
  • vincentkoc: Recent history includes the multi-agent sandbox tools rewrite that contains the read-only-looking example and audit policy import-surface work. (role: docs and audit-surface maintainer; confidence: medium; commits: 57a77ecdf916, f858b5de2208, 4cb46f223c4b; files: docs/tools/multi-agent-sandbox-tools.md, src/security/audit.ts, src/agents/tool-policy-match.ts)
  • amknight: Authored the recent fix stopping implicit exec/process grants from configured tool sections, directly adjacent to this PR's policy-drift concern. (role: adjacent tool-policy security maintainer; confidence: medium; commits: 4aa08e9d7946; files: src/agents/pi-tools.policy.ts, src/agents/pi-tools.policy.test.ts, src/agents/tool-fs-policy.ts)
  • hclsys: Recent path history for the central matcher includes the write/apply_patch policy bridge used to reason about this report. (role: recent tool-policy matcher maintainer; confidence: medium; commits: 8da9d8c55fb7; files: src/agents/tool-policy-match.ts)

Remaining risk / open question:

  • After-fix real behavior proof is missing; the contributor should add redacted terminal output/logs/screenshot/recording showing the new audit or doctor warning on a real config.
  • This is security/maintainer-labeled policy work, so maintainer security review should decide whether warning and documentation are sufficient versus stronger enforcement.

Codex review notes: model gpt-5.5, reasoning high; reviewed against 31a710c5a632.

@joshavant
joshavant merged commit 83aad86 into main May 8, 2026
113 of 118 checks passed
@joshavant
joshavant deleted the docs/exec-write-policy-60694 branch May 8, 2026 01:05
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 24, 2026
* docs: clarify exec filesystem policy

* fix: warn on exec filesystem policy drift

* docs: clarify exec filesystem mutation surface
jameslcowan pushed a commit to jameslcowan/openclaw that referenced this pull request Jun 2, 2026
* docs: clarify exec filesystem policy

* fix: warn on exec filesystem policy drift

* docs: clarify exec filesystem mutation surface
sablehead pushed a commit to sablehead/openclaw that referenced this pull request Jun 10, 2026
* docs: clarify exec filesystem policy

* fix: warn on exec filesystem policy drift

* docs: clarify exec filesystem mutation surface
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands Command implementations docker Docker and sandbox tooling docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR security Security documentation size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Security: exec tool bypasses write deny in security executor agents

1 participant