mirror of
https://github.com/openai/codex.git
synced 2026-11-15 21:50:46 +00:00
Migrate the Windows MXC sandbox to split MXC crates (#52707)
## Why PSEC API symbols can be present on transitional Windows builds where MXC is not enabled. Availability detection needs to verify that a native process security environment can actually be created. ## What changed - Replace `mxc-sdk` with pinned `appcontainer_common`, `learning_mode_windows`, and `wxc_common` dependencies, and update Cargo and Bazel dependency metadata. - Use MXC's cached create/close probe for `is_available()` and query native deny-path support through `SecurityEnvironmentApi` before launching requests with denied paths. - Adapt request construction and the existing policy test to the vector-based environment field, and update the sandbox documentation. GitOrigin-RevId: e8cc6a35d46884d0a069b747d33e711512ec1596
This commit is contained in:
+17
-18
@@ -491,24 +491,23 @@ crate.annotation(
|
||||
workspace_cargo_toml = "rust/runfiles/Cargo.toml",
|
||||
)
|
||||
|
||||
# MXC's resource compiler lookup needs an explicit path for Windows GNU targets.
|
||||
crate.annotation(
|
||||
build_script_deps = [
|
||||
"@crates//:cc-1.2.55",
|
||||
"@crates//:winresource-0.1.31",
|
||||
],
|
||||
build_script_env = {
|
||||
"RC_PATH": "$(execpath @llvm//tools:llvm-rc)",
|
||||
},
|
||||
build_script_tools = [
|
||||
"@llvm//tools:clang",
|
||||
"@llvm//tools:llvm-rc",
|
||||
],
|
||||
crate = "mxc-sdk",
|
||||
patch_args = ["-p1"],
|
||||
patches = ["//patches:mxc-sdk_utf8_resources.patch"],
|
||||
workspace_cargo_toml = "src/Cargo.toml",
|
||||
)
|
||||
# MXC keeps its Rust workspace below the repository root.
|
||||
[
|
||||
crate.annotation(
|
||||
crate = name,
|
||||
workspace_cargo_toml = "src/Cargo.toml",
|
||||
)
|
||||
for name in [
|
||||
"appcontainer_common",
|
||||
"learning_mode_core",
|
||||
"learning_mode_windows",
|
||||
"mxc_config_contract",
|
||||
"mxc_telemetry",
|
||||
"process_security_environment_spec",
|
||||
"sandbox_spec",
|
||||
"wxc_common",
|
||||
]
|
||||
]
|
||||
|
||||
http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user