fix(gateway): advertise exec approval node commands#88296
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 29, 2026, 5:41 PM ET / 21:41 UTC. Summary PR surface: Source +3, Tests +74. Total +77 across 3 files. Reproducibility: yes. source-reproducible: current main's node host advertises Review metrics: 1 noteworthy metric.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land this focused policy fix after maintainer security-boundary review, then close #57775 while keeping broader Windows command-surface reports separate. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: current main's node host advertises Is this the best way to solve the issue? Yes. Adding the shared exec-approval command constants to the existing desktop pairing/runtime command policy is the narrowest maintainable fix, provided the raw AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 15de9d881a84. Label changesLabel justifications:
Evidence reviewedPR surface: Source +3, Tests +74. Total +77 across 3 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (1 earlier review cycle)
|
|
Superseded and landed through the refreshed maintainer replay #100505 in commit fccb888. The landed version preserves this PR's pairing/reconnect fix and adds the missing security boundary at the dedicated relay: effective approved commands and the live Gateway allowlist are checked before node invocation. Raw Thank you @vincentkoc for finding and implementing the core advertisement fix. The stale branch could not be refreshed safely, so I replayed it with co-author credit and stronger regression coverage. Enabling Allow edits by maintainers on future contributor branches lets us update the original directly. |
Summary
Fixes #57775 by keeping
system.execApprovals.getandsystem.execApprovals.setin the desktop node command policy instead of dropping them after the node host advertises them.The commands are now eligible during desktop node pairing and preserved on approved reconnects, so
nodes describe/ Control UI can see exec-approval-capable Windows nodes. Rawnode.invokestill rejectssystem.execApprovals.*; callers must continue through the scopedexec.approvals.node.*RPCs.Verification
node scripts/run-vitest.mjs src/gateway/node-command-policy.test.ts src/gateway/node-connect-reconcile.test.tspassed: 2 files, 22 tests..agents/skills/autoreview/scripts/autoreview --mode local --prompt "Review the Windows node command advertisement fix for OpenClaw. Focus on node command allowlist security: exec approvals must be visible for approved desktop node hosts but must not become freely invokable via node.invoke."passed clean with no accepted/actionable findings.486d285c24f1253bcbcfc289c3ff4540f54ae318:checks-windows-node-testpassed in https://github.com/openclaw/openclaw/actions/runs/26681579714/job/78642815845.486d285c24f1253bcbcfc289c3ff4540f54ae318: native Windows probe passed in https://github.com/openclaw/openclaw/actions/runs/26681579703/job/78642806854.WSL2 status
The WSL2 probe found
wsl.exe, Windows10.0.26100.4946, PowerShell7.4.11, and default WSL version 2, but Ubuntu import/exec still failed (wsl2_ok=false,wsl_import_exit=-1,wsl_exec_exit=-1). Enabling HypervisorPlatform returned3010(reboot required), andMicrosoft-Hyper-V-Allreturned-2146498548. The workflow was intentionally non-failing for WSL2 because the runner needs a reboot/capability recovery before WSL2 can be used as proof.Notes
This is the narrow exec-approval advertisement fix from the PR #74163 Windows node/exec cluster. #84644 (
Commands: none reported) and #77730 (file-transfer nodeHostCommands missing from live handshake) look related but are broader command-surface/plugin-discovery failures; they need separate proof/fix work rather than being bundled into this change.