Repository navigation
fix(occ): run inline programs without an approval client in exec mode full - #3961
Conversation
… full The corporate security preset fills tools.exec.strictInlineEval true, which asks for an explicit approval of each inline program (python3 -c, node -e, an awk program) even in exec mode full. OCE has no approval client, so those commands still failed after #3960 filled mode full. Deployment admission now fills strictInlineEval false, the personal preset's value, where tools.exec runs in mode full beside no security or ask. An explicit value stays.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs real behavior proof before merge. What this changesThis PR defaults strictInlineEval to false when the global exec policy uses mode full. Example: A corporate Agent runs python3 -c 'print(42)' without an approval client.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 4 items remain Keep this PR open: it addresses a real exec failure, but the global default can also weaken an Agent entry’s explicit allowlist policy. Priority: P1 Before merge
Findings
Tests
Agent review detailsHow this fits togetherOCC admission transforms a saved Configuration into an immutable Agent revision; Compute renders that snapshot for OpenClaw, which combines global and per-Agent exec settings before authorizing process execution. flowchart TB
A[Saved Configuration] --> B[OCC admission]
B --> C[Agent revision]
C --> D[Compute rendering]
D --> E[OpenClaw exec policy]
E --> F[Process execution]
Technical reviewBest possible solution: Keep admission as the single owner, but apply the inline-program default according to each Agent’s effective exec policy while preserving stricter inherited policies. Do we have a high-confidence way to reproduce the issue? The pinned corporate preset sets strictInlineEval true, and Gateway source requires approval for detected inline programs even with mode full; the reported failure is source-reproducible, without a reviewer-run reproduction. Is this the best way to solve the issue? Admission is the appropriate shared owner, but checking only the global policy misses OpenClaw’s independently layered per-Agent exec policy. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 2bd3868c3765. Provenance checked
TestingProof path: in-process harness. SecurityNeeds attention: The inherited default can remove a command-approval boundary outside the intended full-mode scope. EvidenceSecurity concerns:
What I checked:
Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 28, 2026, 11:59 AM ET / 15:59 UTC. |
Problem
#3960 fills
tools.exec.mode: "full"so thecorporatesecurity preset no longer refuses every shell command without an approval client. The pinned OpenClaw'scorporatepreset also fillstools.exec.strictInlineEval: true. That setting asks for an explicit approval of each inline program (python3 -c,node -e, an awk program, and the other interpreters in OpenClaw's inline-eval list) on the Gateway exec host, whatever the security or mode. OCE has no approval client, so undercorporatethose commands still fail:Plain commands such as
echo okrun. Agents often use inline programs, so acorporateAgent still loses part of its shell.Change
admitGatewaySecurityDefaultsalso fillstools.exec.strictInlineEval: false, thepersonalpreset's value. The fill applies only where exec runs in modefull(filled by admission or set in the Configuration) andtools.execsets nosecurityorask. A Configuration that sets its own exec policy (modeaskorallowlist, or a legacy security/ask pair) keeps the preset's value, and an explicitstrictInlineEval: trueis kept.strictInlineEval) still counts as the first-agent helper's own prior revision (fix(scripts): let first-agent reruns accept their own older revision #3954): filling it gives the same document.Verification
a3b12ef6), on a remote test VM: a Vitest case in an OpenClaw snapshot callscreateExecToolwith hostgateway, modefull, and thecorporatepreset'sstrictInlineEval. The Gateway mock returns the no-route answer (decision: null). WithstrictInlineEval: true,echo okcompletes, andpython3 -c,node -eand an awk program fail with the error above. WithstrictInlineEval: false, all three complete.tests/conformance/configuration-occ.test.mjs: unset (filled),corporate(filled), explicitstrictInlineEval: true(kept), explicit modefull(filled), explicit modeaskand legacysecurity/ask(not filled).tests/integration/first-agent-startup.test.mjs: a prior revision without the rule matches, and an explicittrueis drift.configuration-occ,secret-occ,first-agent-startup,configuration-controller.tsc --buildis clean, anddocs:check-lengthpasses.Risks
corporate, inline programs now run without approval wherever exec runs in modefull. That is the same trade fix(occ): run shell commands without an approval client and refuse the sandbox exec host #3960 made for every other command. OCE's Sandbox Driver, IAM and Credential Proxy contain the commands. An operator who wants inline programs refused can settools.exec.strictInlineEval: true. Without an approval client, those commands are then refused, as before this change.