Security: enforce ACP sandbox inheritance for sessions_spawn#32254
Security: enforce ACP sandbox inheritance for sessions_spawn#32254osolmaz merged 2 commits intoopenclaw:mainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 363d9b2e08
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| const sandboxedRuntime = params.sandboxInfo?.enabled === true; | ||
| const acpHarnessSpawnAllowed = hasSessionsSpawn && acpEnabled && !sandboxedRuntime; |
There was a problem hiding this comment.
Gate ACP tool summary on sandbox runtime
acpHarnessSpawnAllowed is only used for the narrative ACP guidance, but the sessions_spawn tool summary still keys off acpEnabled alone, so sandboxed prompts continue to advertise runtime="acp" as a valid path. In sandboxed sessions this now conflicts with spawnAcpDirect (which always returns forbidden), so the model can be steered into repeated failing tool calls; the tool summary should be conditioned on the same sandbox-aware flag.
Useful? React with 👍 / 👎.
Greptile SummaryThis PR successfully enforces sandbox inheritance for ACP (Agent Control Plane) spawns, addressing a security boundary violation where sandboxed sessions could pivot to host-side ACP initialization. Key Changes:
Security Implementation: Test Coverage: Confidence Score: 5/5
Last reviewed commit: 363d9b2 |
363d9b2 to
e8d5a4c
Compare
|
Landed via temp rebase onto main.
Thanks @dutifulbob! |
|
For anyone who might be reading this, this is a temporary stopgap, and we will eventually figure out how to put acpx and harnesses into the sandbox |
…w#32254) * Security: enforce ACP sandbox inheritance in sessions_spawn * fix: add changelog attribution for ACP sandbox inheritance (openclaw#32254) (thanks @dutifulbob) --------- Co-authored-by: Onur <2453968+osolmaz@users.noreply.github.com>
…w#32254) * Security: enforce ACP sandbox inheritance in sessions_spawn * fix: add changelog attribution for ACP sandbox inheritance (openclaw#32254) (thanks @dutifulbob) --------- Co-authored-by: Onur <2453968+osolmaz@users.noreply.github.com>
…w#32254) * Security: enforce ACP sandbox inheritance in sessions_spawn * fix: add changelog attribution for ACP sandbox inheritance (openclaw#32254) (thanks @dutifulbob) --------- Co-authored-by: Onur <2453968+osolmaz@users.noreply.github.com>
Summary
Describe the problem and fix in 2–5 bullets:
sessions_spawnenforced sandbox inheritance forruntime="subagent", but ACP spawns (runtime="acp") did not enforce equivalent sandbox/runtime constraints.sandbox="require"forruntime="acp"; tool wiring now forwards sandbox intent/context to ACP spawn; sandboxed prompts no longer suggest ACP spawn.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
sessions_spawnwithruntime="acp"now returnsforbiddenwhen called from sandboxed requester sessions.sessions_spawnwithruntime="acp"now returnsforbiddenwhensandbox="require"is set.Security Impact (required)
Yes/No) NoYes/No) NoYes/No) NoYes/No) YesYes/No) NoYes, explain risk + mitigation:sandbox="require"ACP requests.Repro + Verification
Environment
Steps
sessions_spawnwithruntime="acp".sessions_spawnwithruntime="acp", sandbox="require".Expected
sandbox="require"is requested.Actual
forbiddenwith explicit errors.Evidence
Attach at least one:
Human Verification (required)
What you personally verified (not just CI), and how:
src/agents/acp-spawn.test.tsincludes new forbidden cases for sandboxed requester andsandbox="require".src/agents/tools/sessions-spawn-tool.test.tsverifies ACP sandbox/options forwarding.src/agents/system-prompt.test.tsverifies sandboxed prompts suppress ACP spawn guidance and show block note.acp-spawn.test.ts.Compatibility / Migration
Yes/No) YesYes/No) NoYes/No) NoFailure Recovery (if this breaks)
363d9b2e0.src/agents/acp-spawn.tssrc/agents/tools/sessions-spawn-tool.tssrc/agents/system-prompt.tsforbiddenon ACP spawn from non-sandboxed sessions.Risks and Mitigations
List only real risks for this PR. Add/remove entries as needed. If none, write
None.