Files
codex/codex-rs/mxc-sandbox/Cargo.toml
iceweasel-oai 2c9e1a5775 Add managed network policy support to the Windows MXC sandbox (#44872)
## What changed

Add `create_command_args()` to encode argv, permissions, policy cwd, and optional managed network context through the existing bounded environment transport.

For managed networking, generate a policy that allows IPv4 and IPv6 loopback while denying direct non-loopback egress and general inbound access. Require nonempty, nonzero proxy ports and reject `allow_local_binding=false` at both launcher and policy boundaries because native host-loopback access is bidirectional.

Document the MXC launch contract, platform requirements, and limitations.

## Testing

Add portable tests covering managed network transport and policy translation, plus rejection of missing proxy ports, zero ports, and unsupported local-binding restrictions at both boundaries.

GitOrigin-RevId: 8d31b98f94a2ba3769369aa50de8e53dc143bac4
2026-09-11 17:19:23 +00:00

45 lines
1.2 KiB
TOML

[package]
name = "codex-mxc-sandbox"
version.workspace = true
edition.workspace = true
license.workspace = true
[lib]
doctest = false
[lints]
workspace = true
# This direct dependency pins MXC's transitive ETW dependency for Windows GNU linking.
[package.metadata.cargo-shear]
ignored = ["tracelogging"]
[dependencies]
anyhow = { workspace = true }
codex-network-proxy = { workspace = true }
codex-protocol = { workspace = true }
codex-utils-absolute-path = { workspace = true }
codex-utils-path-uri = { workspace = true }
codex-windows-sandbox = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
thiserror = { workspace = true }
wxc_common = { workspace = true }
[target.'cfg(windows)'.dependencies]
appcontainer_common = { workspace = true }
learning_mode_windows = { workspace = true }
# 1.2.4 imports OneCore_apiset, which the GNU Windows toolchain does not ship.
tracelogging = "=1.2.3"
windows-sys = { version = "0.61", features = [
"Win32_Foundation",
"Win32_Storage_FileSystem",
"Win32_System_Com",
"Win32_System_SystemInformation",
"Win32_UI_Shell",
] }
[dev-dependencies]
pretty_assertions = { workspace = true }
tempfile = { workspace = true }