ProcessContainer: the "default environment" is the HKLM+HKCU registry block, not the launcher's environment; please document it and offer a minimal default
Relevant area(s)
Windows
Brief description of your issue
With environment omitted, or with inheritDefaultEnvironment: true, a ProcessContainer workload receives the environment
built from the registry (machine + user), not the launching process's process.env. On the test host that was 60
variables, including machine-wide variables that held credentials. The schema only says the default is "backend-specific",
so a caller cannot tell from the docs that secrets set for the whole machine end up inside the sandbox.
What an embedder has to do today: set inheritDefaultEnvironment: false and build the whole block itself (SYSTEMROOT,
a PATH of System32, Wbem and Windows PowerShell, PATHEXT, LOCALAPPDATA, TEMP/TMP, the proxy variables),
then discover by trial what each program needs (PowerShell runs nothing without PATHEXT; Windows PowerShell's folder
is missing from PATH otherwise).
Expected behavior
- Document what the default environment is on each backend (Windows: the registry block).
- Offer a minimal default as an option, e.g.
inheritDefaultEnvironment: 'minimal'withSYSTEMROOT,PATH(system folders only),PATHEXT,TEMP/TMP,USERPROFILE,LOCALAPPDATA.
Related: #1783 (Bubblewrap inherits the host process environment).
Environment
Measured with @microsoft/mxc-sdk 1.0.1 on Windows 11 25H2; 1.1.0 passes inheritDefaultEnvironment to the native runner
unchanged (dist/v1/container.js), not re-measured.