Vibeleaderboard
Index / tool

Microsoft eXecution Container (MXC)

github.com/microsoft/mxc
Category
Developer Tools
Rank
Pricing
Open Source
Type
TOOL
Use case
Security & Identity
Builder
@simonw
Latest release
v1.1.0
Date

About

MXC is a sandboxed code execution system from Microsoft for running untrusted code such as model output, plugins and tools on Windows, Linux and macOS. It offers multiple containment backends, from OS-native process sandboxes to full VMs, behind a unified policy-driven containment model. This lets applications run untrusted code with the same isolation approach across operating systems.

What it does

A library you compile or install into your own program so that a command you do not trust runs walled off from the machine. You describe the command, which folders it may read or write, whether it may reach the network, and whether it may touch the clipboard or screen. The library then picks a sandbox suited to the host: a native process jail on Windows, Linux or macOS by default, or heavier options such as WSL containers and lightweight virtual machines when asked by name. It returns captured output, a live process handle, or an interactive terminal session.

Why it's ranked here

Agents that execute model-written code need a jail, and this is a Microsoft-maintained, MIT-licensed one with the same request shape on three operating systems and published packages for Rust, .NET and Node. The policy language is versioned, marked immutable at its stable release, and rejects unknown fields instead of ignoring them. Several of the heavier backends are labelled experimental, and the strongest guarantees concentrate on Windows, so it is a solid foundation rather than a finished cross-platform answer.

What's good

Network access defaults to deny in both directions unless the request says otherwise, so forgetting a rule fails closed. A policy that the chosen backend cannot enforce is rejected rather than quietly applied, and the documentation repeats that an omitted section is not proof of enforcement. Errors carry the failing operating-system call, its status code and a suggested fix. On Windows, an audit mode records what a trusted tool actually touches and drafts a policy from it, with an explicit warning that it disables the sandbox while doing so.

Tradeoffs

Enforcement differs by backend, and the documentation says so repeatedly. The macOS custom-profile override drops the request's filesystem, network and UI rules entirely. The Windows lifecycle option for persistent containers cannot restrict networking at all and must declare everything allowed. WSL containers expose no standard input. Linux container mode via LXC needs root. Network rules are numeric address ranges, not hostnames, so domain allowlisting means running your own proxy. Official Windows builds can send telemetry once a user and administrator both permit it.

How to use it well

A fit for teams building an agent, plugin host or code-execution feature who want process-level isolation without shipping Docker, and who can test on each target OS. Start with the default process backend and a narrow read-only folder grant, as the bundled filesystem sample does, and treat the warnings list on each result as required reading. For hostname-level egress control, put a filtering proxy in front. It does not cover multi-tenant server isolation or scheduling; it isolates one workload on one host.

Technical notes+

The Rust crate root in src/mxc-sdk/src/lib.rs is a curated facade: everything public lives under a v1 module (run, spawn, spawn_with_pty, plus container::provision_container through deprovision_container), while backend and engine modules are re-exported doc-hidden. Backends are declared in src/mxc-sdk/src/backends/mod.rs behind target_os and cargo features (wslc, isolation_session, microvm, hyperlight). Containment::Process maps to Bubblewrap, Seatbelt or ProcessContainer per host; LXC is reachable only by naming it. docs/containment-policy/1.0.0/policy.md defines the closed JSON contract: egress and ingress default deny, deny beats allow, CIDR-only rules, and lifecycle phases limited to IsolationSession and WSLc. src/tools/wxc/src/main.rs is the clap-based wxc-exec CLI with --dry-run, --probe, --operation, and Windows-only --audit, which injects permissiveLearningMode and refuses non-ProcessContainer backends. sdk/node/src/index.ts holds only package documentation and an empty export; the Node surface lives behind the v1 subpath.

Observed

License
MIT (per source file headers)
Language
Rust core with .NET and Node SDK packages
Packaging
crates.io mxc-sdk, NuGet Microsoft.Mxc.Sdk, npm @microsoft/mxc-sdk
Interfaces
Library SDKs plus a standalone executor CLI taking JSON requests
Platforms
Windows 11 x64/ARM64, Linux x64/ARM64, macOS ARM64/x64
Default backends
ProcessContainer on Windows, Bubblewrap on Linux, Seatbelt on macOS
Experimental backends
Windows Sandbox, MicroVM and Hyperlight on Windows, per the README
Network default
Egress and ingress deny unless the request allows them
Telemetry
Opt-in on official Windows builds; no-op on other platforms

Read from README.md, samples/Cargo.toml, src/mxc-sdk/src/lib.rs, src/mxc-sdk/src/core/mod.rs, src/mxc-sdk/src/backends/mod.rs, sdk/node/src/index.ts, src/tools/wxc/src/main.rs, docs/containment-policy/1.0.0/policy.md, samples/run-with-containment-of-filesystem/rust/src/main.rs, SECURITY.md.

Similar tools

Browse all tools →

Tags

sandboxisolationcontainmentmicrosoftsecuritycross-platform

Editorially curated, with community endorsements as a secondary signal. Corrections welcome.