Repository navigation
feat(mxc): add Windows MXC sandbox backend - #97086
Conversation
Dependency GuardThis PR changes dependency-related files. Maintainers should confirm these changes are intentional. Changed files:
Maintainer follow-up:
|
Dependency graph changes are blockedOpenClaw does not accept dependency graph changes through PRs unless a repository admin or security explicitly authorizes the current head SHA. Dependency updates are generated internally by maintainers so external PRs cannot change the resolved graph. Detected dependency graph changes:
Auto-scrub was not attempted because this PR changes package manifest dependency graph fields:
Dependency graph changes must be reviewed by security or handled by maintainers internally. Please remove lockfile changes manually if they are not needed. To remove lockfile changes, restore them from the target branch: git fetch origin
git checkout 'origin/main' -- 'extensions/mxc/npm-shrinkwrap.json' 'pnpm-lock.yaml'
git commit -m 'chore: remove dependency lockfile change'
git pushIf this PR intentionally needs a dependency graph change, ask a repository admin or member of The action will approve the current head SHA ( |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
All alerts resolved. Learn more about Socket for GitHub. This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. |
|
Codex review: needs maintainer review before merge. Reviewed July 13, 2026, 1:47 AM ET / 05:47 UTC. Summary PR surface: Source +2720, Tests +2805, Docs +384, Config +67, Other +70. Total +6046 across 52 files. Reproducibility: not applicable. This PR introduces a new Windows MXC sandbox backend rather than fixing an established current-main bug. Review metrics: 2 noteworthy metrics.
Stored data model 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
Maintainer decision needed
Security Review detailsBest possible solution: Keep the external OpenShell-style plugin boundary, but land only after exact-head dependency approval and an explicit maintainer decision to accept the preview SDK argv exposure; otherwise pause until MXC provides a non-argv transport. Do we have a high-confidence way to reproduce the issue? Not applicable; this PR introduces a new Windows MXC sandbox backend rather than fixing an established current-main bug. Is this the best way to solve the issue? Yes for implementation ownership: the external installable plugin follows the existing OpenShell precedent and keeps vendor-native dependencies out of core, but accepting its security boundary remains a human decision. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 807491e0f125. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +2720, Tests +2805, Docs +384, Config +67, Other +70. Total +6046 across 52 files. View PR surface stats
Security concerns:
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 (23 earlier review cycles; latest 8 shown)
|
|
Thanks for the substantial MXC backend work. I took a maintainer pass over the current shape and wanted to separate the main blockers from the broader product/security decision. As written, this is declared as a bundled OpenClaw plugin ( Could you please address these before the next maintainer/security pass?
Please either:
Current checks are still failing, including dependency guard, security-fast, check-dependencies, Opengrep, changed-path scan, check-additional-boundaries-bcd, and checks-node-compact-small-whole-2. A few concrete items from those logs:
The backend hard-codes MXC schema
The hosted Windows unit checks are useful, but they do not prove the package/runtime path. Before approval we need redacted proof from a package-like Windows setup showing OpenClaw configured with I think the direction is worth continuing, but the next revision needs to make the packaging/security boundary explicit before maintainers can approve the dependency override. |
|
Small clarification after comparing this with the existing sandbox backend layout: The closest precedent here is So my recommended path for this PR is:
In short: the normal OpenClaw fit for this kind of optional Windows container backend looks like an official installable plugin, closer to OpenShell, rather than a core Docker-equivalent backend. |
|
Review follow-up pushed locally and ready to publish:
Validation:
Dependency report generated with Remaining blocker: real Windows MXC behavior proof |
|
Pushed follow-up fixes in
Current validation:
Real Windows MXC package proof completed on Crabbox static SSH Windows:
Copilot autoreview was retried twice on this head but the helper failed to parse Copilot MCP status-event noise as JSON before returning a structured review. No structured finding was produced. @clawsweeper re-review Maintainer/security note: Dependency Graph Guard still needs |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Additional user-facing plugin install proof is now available on the same static Windows Crabbox host:
This supplements the earlier Windows MXC backend execution proof on the same host, where the packaged plugin resolved @clawsweeper re-review |
|
Final CI/rebase refresh: force-pushed
The PR is mergeable again. Replacement CI is starting on the exact rebased head; @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Final exact-head CI confirmation for
There are no remaining non-dependency CI failures or pending checks. |
Add the official MXC sandbox plugin package with Windows ProcessContainer execution, plugin-owned MXC SDK dependency packaging, host-backed filesystem bridge support, and configured MXC policy file loading via mxcPolicyPaths. Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]> Copilot-Session: 9ea19539-b8ca-44fb-93bd-b8496e3deb2c
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
|
Rebased and repaired CI at exact head CI run |
| return resolvedOverride; | ||
| } | ||
|
|
||
| const binaryName = "wxc-exec.exe"; |
What Problem This Solves
OpenClaw does not currently have an official installable MXC sandbox backend for Windows hosts that can run sandboxed commands through Microsoft eXecution Containers. This leaves MXC-capable Windows environments without a first-party plugin path for ProcessContainer-backed execution and filesystem bridge operations.
Why This Change Was Made
This adds an official OpenShell-style external
mxcsandbox plugin package (@openclaw/mxc-sandbox) with Windows-only readiness checks, plugin-owned MXC SDK dependency ownership, ProcessContainer payload construction, a plugin-side launcher, host-backed filesystem bridge support, sandbox policy loading, and targeted tests.The plugin source lives under
extensions/mxc, but it is packaged as an installable plugin (bundledDist: false) so the MXC SDK/native dependency is owned by the plugin package instead of an unshipped bundlednode_modulestree. The backend uses the current MXC0.7.0-alphaschema and keeps sandbox defaults conservative: strict plugin config, read-only isolated workspaces fornone, a distinct read-only agent workspace forro, writable agent workspaces forrw, fail-closed protected-skill overlap handling, guarded fs-safe host mutations, required explicit policy files/paths, and host-derived Windows baseline roots.The MXC read-only skill mount resolver remains plugin-local instead of adding a plugin-specific public sandbox SDK export. The only new shared SDK surface is the narrow generic fs-safe recursive-remove seam requested by review because the sandbox bridge contract includes
recursive/forcebehavior that the pinned fs-safeRoot.removeAPI does not expose.User Impact
Users on MXC-capable Windows hosts can install the official MXC sandbox plugin, restart the Gateway, configure
sandbox.backend: "mxc", and run OpenClaw sandboxed commands through MXC. Non-Windows or unsupported Windows hosts remain unaffected because the plugin stays dormant when readiness probes fail.Install command:
Evidence
Related: microsoft/mxc#626
AI-assisted: yes. The implementation and review-response pass used Copilot CLI, with every accepted review finding checked against current OpenClaw code, the pinned fs-safe API, the MXC SDK source/types, focused tests, and native Windows behavior.
Final review-response refresh (2026-07-10)
92f6e6d62780c52a11976cc06ae0f3b76488a096.2f9cb9200669fe5df86fd229b445685e9b1b81b1(upstream/mainat rebase time).=). The final SDK-surface commit changed only its pinned export budget to match current main: 10,494 public exports / 5,237 callable exports.workspaceAccess: "ro"now maps the distinct agent workspace read-only in both ProcessContainer policy and the fs bridge.ContainerConfigtype.bundledDist: falsestatic-asset behavior has direct regression coverage.Linux validation
Local WSL2
Ubuntu-24.04, isolated Linux-filesystem clones, Nodev24.13.0, pnpm11.2.2:git diff --checkpassed.pnpm test:extension mxcpassed: 8 files passed / 2 Windows-only files skipped; 57 tests passed / 52 skipped.pnpm check:test-typespassed.pnpm buildpassed on production-equivalent head104bc7aad8d3d63ebc2659dd0ea20dee96b23318; the final delta only updatesextensions/mxc/test/mxc-backend.test.ts.pnpm check:changedcould not run locally because its selected Crabbox/Testbox binary failed its own--version/--helpsanity check on both candidate and base; this is environment/tooling, not candidate-specific.Native Windows validation
SSH target
[email protected], exact final head, Nodev24.18.0, pnpm11.2.2:pnpm test:extension mxcpassed: 10 files / 109 tests.node scripts/lib/plugin-npm-runtime-build.mjs extensions/mxc.openclaw-mxc-sandbox-2026.6.11.tgz: 32 files, includingpackage/dist/index.js,package/dist/mxc-spawn-launcher.mjs, andpackage/npm-shrinkwrap.json.npm-pack:install passed;openclaw plugins inspect mxc --runtime --jsonreportedstatus: "loaded"from isolated managed plugin state.wxc-exec.exeProcessContainer smoke passed:MXC_PROCESSCONTAINER_OK.nonedenied access to the distinct agent workspace.roallowed reads and denied mutation.rwpersistedMXC_RW_MARKER.Review closeout
Copilot autoreview was split into complete production, test, and docs bundles because the single complete PR bundle exceeded Copilot's input limit.
rwprotected-skill behavior; direct MXC source inspection and native Windows proof confirm a nested read-only grant does not override a writable parent, so the overlap guard remains intentionally fail-closed and the README now states that limitation accurately.104bc7aad8andc0a242c368exited clean with no accepted/actionable findings.ab74106328fixes the two extension Oxlint findings (import typeand preserved caught-error cause); targeted Oxlint and Copilot autoreview are clean.92f6e6d627moves recursive removal out of broadinfra-runtimeand keeps it only on focusedfile-access-runtime. After rebasing onto current main, the compact-shard test, surface check, focused tests, MXC extension suite, test types, SDK package boundary check, full WSL2 build, and Copilot autoreview are clean.Remaining maintainer gates
dependency-guardis expected to require maintainer/admin/secops approval for the intentional@microsoft/[email protected], packaged native executors, and[email protected]dependency graph.wxc-execargv. Base64 is not secrecy; maintainers should explicitly accept this preview-SDK boundary or wait for the non-argv transport tracked in SDK should avoid passing the full sandbox config envelope through process argv microsoft/mxc#626.mainadvanced after the validated rebase; the PR may show as behind even though the pushed candidate and evidence above are internally consistent.