Skip to content

[Bug]: security: "allowlist" exec agents lose network and external-write access with no documented knob (2026.6.5) #92843

Closed as not planned

Description

@jamesmcdproject

Environment

  • OpenClaw 2026.6.5 (latest non-beta; re-verified reproducing 2026-06-11). The
    2026.6.6-beta.1 changelog only tightens exec ("fail closed on timeout") and does not
    mention this coupling.
  • macOS host, single-gateway, multi-agent fleet (system-LaunchDaemon gateway).
  • Exec configured per-agent; some agents tools.exec.security: "allowlist", others
    unrestricted (full). Sandbox is off for every agent (runtime: direct, mode: off).

Summary

After moving to 2026.6.5, agents whose exec policy is security: "allowlist" behave as if
network-isolated and write-restricted: outbound HTTP from allowlisted helper scripts fails, and
writes to paths outside the agent workspace do not land (some calls return
{"status":"declined"}). Agents with unrestricted exec on the same gateway, with
byte-identical sandbox configuration, are unaffected. There is no documented configuration
key to restore network/write for an allowlist-mode agent while keeping the allowlist, and no
startup warning or log line indicating that allowlist mode implies this isolation.

Steps to reproduce

Observed on a production single-gateway fleet (evidence + ruled-out causes below);
this is the hypothesised minimal repro — I have not yet isolated it on a clean
throwaway install, so treat the exact minimal steps as the likely shape, not verified.

  1. Single gateway, two agents, identical sandbox blocks (or sandbox effectively off).
  2. Agent A: tools.exec.security: "allowlist", allowlist permits one helper script that makes
    an outbound HTTPS request (e.g. curl/wget to a public endpoint) and writes a file outside
    the agent workspace.
  3. Agent B: tools.exec.security: "full", same script.
  4. Trigger the script in both agents.

Expected

security governs which commands may run, not network/filesystem reachability of permitted
commands. An allowlisted command that is permitted to run should have the same host
reachability as the same command under full — isolation should be controlled by the
sandbox layer, which is identical here. (Docs frame sandbox, tool policy, and elevated as
separate layers: https://docs.openclaw.ai/gateway/sandbox-vs-tool-policy-vs-elevated)

Actual

Under allowlist, the permitted command runs but has no network and cannot write outside the
workspace. Under full, the identical command on the identical sandbox config has full
reachability. The difference correlates only with tools.exec.security, not with any
sandbox setting.

Ruled out (read-only live probe, 2026-06-10 / 06-11)

A read-only diagnostic on the live fleet eliminates the obvious alternative explanations, which
is what points at the exec-enforcement layer rather than the sandbox:

  1. Not an auto-created Docker sandbox (rules out [Bug]: Sandbox enabled by default on update breaks all exec for existing single-user setups #58885 / H1). There is no docker binary on
    the host and no openclaw-sbx-* container exists, so the 2026.4.1 auto-sandbox breakage
    pattern does not apply here.
  2. sandbox explain is byte-identical between a jailed allowlist agent and a free full
    agent: both report runtime: direct, mode: off, workspaceAccess: none, Elevated: enabled:true.
    The sandbox layer is therefore not the differentiator between the two behaviours.
  3. No sandbox is configured to differ: agents.defaults.sandbox is none and every agent
    inherits it (sandbox: <inherit>).
  4. Not a config rewrite by the upgrade: the exec-approvals file still uses the legacy
    security/askFallback key shape, and a diff against the pre-upgrade backups shows only
    intended allowlist additions — no migration touched these agents' exec or sandbox config.
  5. The only property that correlates with the jail is tools.exec.security: "allowlist".

Net: the network/write isolation is being applied by the allowlist-exec enforcement path
itself in 2026.6.5, not by the sandbox layer, and it is undocumented. (Note: PR #89756 is a
different change — it renames exec-policy config to mode/full-always and does not control
sandbox filesystem/network reachability — so it is not the fix for this.)

Impact

  • Allowlist mode is the recommended least-privilege posture
    (https://docs.openclaw.ai/gateway/security). Coupling it to a silent network/write jail
    pushes operators toward security: "full" or tools.elevated (host escape) to regain basic
    function — the opposite of least privilege.
  • Agents that legitimately need narrow network access (one allowlisted fetch script) plus the
    safety of an allowlist have no documented middle ground. (Our interim workaround is a
    separate non-agent relay that performs the fetch/write outside the jail and hands results back
    as data — i.e. we had to add a moving part specifically to avoid widening exec privilege.)

Docs / DX gap

Questions for maintainers

  1. Is allowlist-mode network/write isolation intended in 2026.6.5? If so, where is it documented?
  2. What is the supported key to grant an allowlist-mode agent narrow egress and/or an
    external-write path without switching to full or tools.elevated?
  3. Can the gateway emit a startup/log warning when an allowlisted command is permitted but then
    network/write-restricted, so the two failure modes are distinguishable?


Suggested labels: bug, exec, sandbox, docs.

Activity

  1. clawsweeper commented on Jun 14, 2026

    @clawsweeper
    Contributor

    Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed June 13, 2026, 11:01 PM ET / 03:01 UTC.

    Summary
    Keep open: current main and latest stable still show a Codex app-server path where non-full exec policy is paired with workspace-write/no-network sandboxing or approval declines, while the docs describe allowlist as command approval rather than filesystem/network isolation.

    Reproducibility: no. high-confidence live repro was established here; source inspection gives a medium-confidence Codex path where non-full exec policy maps to workspace-write/no-network sandboxing or approval declines despite docs framing allowlist as command approval.

    Ways to help us reproduce this

    • Add a screenshot or short recording showing the behavior.
    • Add expected vs actual behavior.
    • Include redacted logs or terminal output.

    Next step
    Security/product owners should choose the intended Codex allowlist sandbox contract before an automated fix changes config or defaults.

    Security
    Needs attention: The issue is security-sensitive because unclear allowlist/sandbox coupling can leave operators choosing between restricted allowlist behavior and broader full/elevated authority.

    Review details

    Best possible solution:

    Keep the issue open until maintainers choose and document the Codex allowlist sandbox contract, then align runtime mapping, docs, tests, and live proof around that decision.

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

    No high-confidence live repro was established here; source inspection gives a medium-confidence Codex path where non-full exec policy maps to workspace-write/no-network sandboxing or approval declines despite docs framing allowlist as command approval.

    Is this the best way to solve the issue?

    No, not as a narrow automated fix yet; the best solution needs maintainer security/product review before changing defaults or adding a new documented knob.

    AGENTS.md: found and applied where relevant.

    Remaining risk / open question:

    • No live repro was run in this read-only review, and the reporter also framed the minimal reproduction as likely rather than cleanly isolated.
    • The fix requires a security/product decision: maintainers need to decide whether allowlist-mode Codex sessions should preserve host reachability, expose a narrow network/external-write grant, fail closed with clearer diagnostics, or document the current sandboxed behavior.

    Codex review notes: model internal, reasoning high; reviewed against 7fb0d45b48e1.

    Label changes

    Label changes:

    • remove clawsweeper:fix-shape-clear: Current issue advisory state no longer selects this label.

    Label justifications:

    • P2: This is a normal-priority security/config behavior issue with limited blast radius but real operator impact for allowlist-mode agents.
    • impact:security: The issue concerns exec allowlist, sandbox, network, and filesystem permission boundaries that can push users toward broader full or elevated access.
    Evidence reviewed

    Security concerns:

    • [medium] Clarify allowlist versus sandbox authority — extensions/codex/src/app-server/config.ts:781
      Current Codex app-server behavior maps non-full modes to workspace-write/no-network sandboxing or declines approvals, while docs describe allowlist as command approval; maintainers should decide the intended permission boundary before repair.
      Confidence: 0.84

    Acceptance criteria:

    • Live Codex app-server run comparing allowlist and full behavior for outbound HTTPS plus external writes with private details redacted.
    • Focused tests for Codex sandbox mapping, approval requests, and the chosen allowlist-mode behavior.
    • Docs check covering permission modes, exec approvals, and Codex harness references.

    What I checked:

    • Live issue state and opener context: this issue is open, unassigned, has a protected security label plus ClawSweeper labels requiring maintainer/product/security review, and was opened by jamesmcdproject (account created 2026-03-01; OpenClaw activity: 1 issue in the last 12 months).
    • Repository policy applied: Root AGENTS.md and the ClawSweeper/OpenClaw maintainer skills were read and applied; this issue crosses the repo's security/product-decision and Codex dependency-inspection gates. (AGENTS.md:1, 7fb0d45b48e1)
    • Docs separate allowlist from filesystem policy: Current docs say exec approvals are not a filesystem read-only policy and approved commands can mutate according to selected host or sandbox permissions; allowlist is documented as command matching, not as an egress/write jail. Public docs: docs/tools/exec-approvals.md. (docs/tools/exec-approvals.md:63, 7fb0d45b48e1)
    • Codex permission docs expose no middle posture: The permission-mode and Codex harness docs map auto to Codex on-request approval with workspace-write sandboxing and reserve full/danger-full-access for the intentional no-approval posture. Public docs: docs/tools/permission-modes.md. (docs/tools/permission-modes.md:50, 7fb0d45b48e1)
    • Native gateway exec does not itself impose this jail: The gateway exec path only assigns a sandbox when host is sandbox, then runs gateway allowlist processing and passes that same sandbox value to process execution; this narrows the likely remaining problem to backend/harness behavior rather than native gateway allowlist alone. (src/agents/bash-tools.exec.ts:1525, 7fb0d45b48e1)
    • Codex app-server maps workspace-write to no network and cwd-only writes: The Codex app-server policy builder returns workspaceWrite with writableRoots limited to the turn cwd and networkAccess false; only danger-full-access avoids that sandbox object. (extensions/codex/src/app-server/config.ts:781, 7fb0d45b48e1)

    Likely related people:

    • vincentkoc: Recent main history for the Codex app-server config and conversation binding includes Codex guardian, auto-exec review routing, approval blocking, and exec reviewer trust changes that are central to this issue. (role: recent area contributor; confidence: high; commits: b4cdd9211957, adad27d7448e; files: extensions/codex/src/app-server/config.ts, extensions/codex/src/conversation-binding.ts, src/agents/bash-tools.exec.ts)
    • joshavant: Authored the normalized auto-mode commit that introduced the exec mode surface now used by Codex Guardian and permission-mode docs, with coauthors on the same policy boundary. (role: feature-history contributor; confidence: medium; commits: 80227005a016; files: extensions/codex/src/app-server/config.ts, extensions/codex/src/conversation-binding.ts, docs/tools/exec-approvals.md)
    • steipete: Authored the permission-modes documentation that describes the Codex auto/workspace-write mapping and appears repeatedly in recent Codex app-server file history. (role: adjacent docs and Codex contributor; confidence: medium; commits: ae651e72101a, 6868cde4d45f, 5e11c85c0a7c; files: docs/tools/permission-modes.md, extensions/codex/src/app-server/config.ts)
    • kevinslin: Open PR feat: migrate exec policy config to mode #89756 changes the same exec policy/config/Codex mapping surface, but remains unmerged and conflicting, so it is routing context rather than a fix. (role: adjacent exec policy contributor; confidence: medium; commits: e9ad8b8c4715; files: extensions/codex/src/app-server/config.ts, src/infra/exec-approvals.ts, docs/tools/exec-approvals.md)
    How this review workflow works
    • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
    • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
    • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
    • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
    • Maintainers can also comment @clawsweeper review to request a fresh review only.
    • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
    • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
  2. added
    P2Normal backlog priority with limited blast radius.
    impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.
    issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.
    clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.
    clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.
    clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.
    clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.
    clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.
    clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.
    on Jun 14, 2026
  3. jamesmcdproject commented on Jun 19, 2026

    @jamesmcdproject
    Author

    Reporter here with a high-confidence live repro.

    Setup: 2026.6.5, an exec-capable agent with security: "allowlist" on its exec policy.

    Expected: allowlist gates which commands may run; approved commands retain normal host network + filesystem access (per docs/tools/exec-approvals, which frames allowlist as command approval, not an egress/write jail).

    Actual: the agent loses all outbound network and all external (non-cwd) filesystem writes. Scripts that fetch over HTTPS or write outside the turn cwd fail under the sandbox. Switching the policy to full restores both immediately — there is no intermediate posture.

    This lines up exactly with the extensions/codex/src/app-server/config.ts:781 mapping noted in the review (non-full → workspace-write + networkAccess: false, writes confined to cwd).

    Our workaround was to move the path-locked scripts out of the agent entirely, onto a separate non-agent process that runs outside the jail. A documented narrow egress / external-write grant for allowlist mode (option b in the review's decision set) would let us retire that workaround. Happy to provide further redacted logs if useful.

  4. jinngimk-lang commented on Aug 31, 2026

    @jinngimk-lang
  5. steipete commented on Oct 24, 2026

    @steipete
    Contributor

    Thanks for filing this. We're closing older issues that no longer look actionable on current main.

    The Codex app-server exec path has changed substantially since 2026.6.5, and we could not confirm the allowlist network/write coupling on current main. If allowlist agents still lose network or external-write access on a current release, please open a fresh issue with the config and a controlled comparison.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.securitySecurity documentation

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions