Repository navigation
Description
Draft upstream MXC bug
Proposed title
SDK should avoid passing the full sandbox config envelope through process argv
Relevant area(s)
Windows
Brief description of your issue
@microsoft/mxc-sdk currently serializes the full sandbox request envelope and passes it to wxc-exec as a base64 command-line argument (--config-base64 <payload>). That makes the full config available through normal process command-line inspection while the child process is starting/running.
For SDK callers that generate configs from higher-level products, the envelope can include sensitive operational details such as command lines, filesystem paths, environment-derived values, policy details, or future config fields. Base64 does not provide confidentiality, so the SDK default transport should avoid putting the full envelope in argv.
Steps to reproduce
-
Use
@microsoft/[email protected]on Windows with the default WXC executable path resolution. -
Build any one-shot sandbox config and call the SDK path that resolves the executable and arguments, for example the exported spawn/resolve flow that reaches
resolveBinaryAndCommonArgs. -
Observe that the SDK builds the child process arguments as:
--config-base64 <base64-encoded JSON envelope> -
Decode the second argument and confirm it is the full JSON request envelope.
-
Start the process and inspect the command line using common process-inspection tools while
wxc-execis running.
Source evidence checked:
- Current upstream
maincommit25e504e08f297b52c8aa2ca4966560a6ebb8b48fsdk/src/helper.ts:190-192createsenvelopeBase64fromenvelopeJsonand pushes--config-base64.src/core/wxc/src/main.rs:51-56declares the--config-base64CLI option.src/core/wxc/src/main.rs:697-701reads the base64 argument as the selected config input.src/core/wxc/src/main.rs:745passes that input toload_mxc_request_with_options.
- Published package
@microsoft/[email protected]dist/helper.js:151-152has the same defaultBuffer.from(...).toString('base64')plusargs.push('--config-base64', envelopeBase64)behavior.
I searched existing open and closed issues for config-base64, config base64, argv, command line, and process list config. The only config-base64 hit I found was #561, which is about panic telemetry and is not the same transport issue.
Expected behavior
The SDK default process transport should avoid putting the full config envelope in argv. For example, it could use a temporary config file with restrictive permissions, stdin, a named pipe, or another transport that does not expose the full payload through process command-line inspection.
It may still be useful for wxc-exec to keep --config-base64 for explicit/manual/debug/test use, but SDK callers should have a safer default and/or a clear option to choose a non-argv transport.
Actual behavior
The SDK default path always passes the full JSON envelope as a base64 command-line argument to wxc-exec. wxc-exec treats --config-base64 as a first-class config input and decodes it internally.
Impact
Consumers embedding MXC in larger tools may accidentally expose policy/config contents to process command-line observers. This is especially awkward for sandbox integrations because the request envelope is the same object that describes the command, filesystem policy, environment-related settings, and containment options.
This report is about the default transport shape and data minimization.
Activity
github-actions commentedon Jul 13, 2026
Triage complete.
Labels applied:
Area-SDK-Api,Area-Executor-Schema(in addition to the existingOS-Windows)Assigned:
@huzaifa-d— this issue spans the SDK API transport layer (sdk/src/helper.tsargv construction) and the executor's CLI schema (wxc-exec --config-base64argument handling).Needs-Triagehas been removed.huzaifa-d commentedon Jul 20, 2026
I agree that putting the full config in argv is not ideal, but I do not think this is a significant security issue for MXC. The config is already supplied by the caller, and an attacker who can inspect the SDK process command line is already running with access to the same user context. This does not provide a sandbox escape or privilege escalation.
Avoiding argv would require adding and maintaining a new transport, such as a protected temporary file, named pipe, or inherited Windows handle. IMO not worth given the small blast radius.