Skip to content

BaseContainer: granted user-profile path fails unless volume root is also granted #1109

Closed

Description

Relevant area(s)

Windows ProcessContainer / BaseContainer

Brief description

A valid readwritePaths grant for an existing user-profile directory is unusable on a BaseContainer-capable host unless the volume root is also added separately to readonlyPaths.

The failure reproduces through @microsoft/mxc-sdk 0.8.0 without OpenClaw's adapter. wxc-exec --probe reports tier: "base-container", needsDaclAugmentation: false, and no warnings, so callers have no readiness signal explaining the failure.

This is not universal to every MXC host. It depends on the host volume-root ACL and on workloads that query root metadata while resolving or opening an otherwise-granted path. It is significant for ordinary user-profile grants such as Downloads/Documents and can produce false-success command results.

Environment

  • @microsoft/mxc-sdk: 0.8.0
  • Policy schemas tested: 0.8.0-alpha and 0.7.0-alpha (same result)
  • Windows: 11 Insider, build 26340.9233
  • Probe result: base-container, needsDaclAugmentation: false, warnings []
  • Filesystem: NTFS
  • The system-drive root did not contain the S-1-15-2-1 / S-1-15-2-2 metadata ACEs authored by wxc-host-prep prepare-system-drive

Minimal configuration

Generated with createConfigFromPolicy, then passed to spawnSandboxFromConfig:

{
  "version": "0.8.0-alpha",
  "containment": "process",
  "process": {
    "commandLine": "C:\\Windows\\System32\\cmd.exe /D /S /C \"dir && type sentinel.txt && echo sandbox-write>from-sandbox.txt\"",
    "cwd": "C:\\Users\\<user>\\Downloads\\mxc-grant-proof",
    "env": [],
    "timeout": 30000
  },
  "filesystem": {
    "readwritePaths": [
      "C:\\Users\\<user>\\Downloads\\mxc-grant-proof"
    ],
    "readonlyPaths": [],
    "deniedPaths": []
  },
  "network": {
    "defaultPolicy": "block",
    "enforcementMode": "capabilities"
  }
}

The host creates sentinel.txt before launching the sandbox.

Actual behavior

selected isolation tier: base-container
working directory: C:\Users\<user>\Downloads\mxc-grant-proof (from process.cwd)
process security environment created (processmodel.dll)
process created
Access is denied.
Exit code: 1

The sandbox write is not visible on the host.

A separate attrib C:\Users\<user>\Downloads\mxc-grant-proof control reports Path not found while returning exit code 0. That false-success shape can make callers believe a filesystem operation succeeded.

Control that succeeds

Adding only the volume root fixes the same command:

"readonlyPaths": ["C:\\"]

After that change:

  • dir lists the granted directory
  • type sentinel.txt reads the host file
  • from-sandbox.txt is visible on the host
  • exit code is 0

Adding C:\Users, the user profile, or Downloads without adding C:\ does not fix the failure.

Expected behavior

An existing directory explicitly granted through readwritePaths should be usable at that absolute path, or the SDK/probe should reject the request with an actionable diagnostic stating that volume-root metadata access is missing.

For BaseContainer, the documented non-cascading volume-root behavior makes a narrow automatic root grant appear possible without exposing descendants. Please clarify which layer should own it:

  1. BaseContainer/PSEC automatically grants the minimum volume-root metadata needed to resolve explicit leaf grants.
  2. createConfigFromPolicy adds each required volume root as a non-cascading read-only grant.
  3. wxc-exec --probe reports missing root preparation for BaseContainer, not only the DACL fallback.

Security note

Automating wxc-host-prep prepare-system-drive is not a safe workaround while #648 remains open: that helper can recursively rewrite descendant ACLs. This report is specifically about the BaseContainer path, where the probe says DACL augmentation is not needed and a non-cascading root policy grant resolves the failure.

Activity

  1. added
    Needs-Triage
    OS-Windows
    on Sep 4, 2026
  2. jsidewhite commented on Sep 14, 2026

    @jsidewhite
    Member

    The dir command is enumerating parent directories - this requires the directory be configured with enumerate powers (see Issue #1162).

  3. removed
    Needs-Triage
    on Sep 14, 2026
  4. PierrunoYT commented on Oct 9, 2026

    @PierrunoYT

    Another data point for the parent-folder problem, on a build where enumeratePaths isn't available yet. Windows 11 25H2 build 26200.9457, isolationTier: "base-container", @microsoft/mxc-sdk 0.9.0 and 1.0.0, project under %USERPROFILE% granted read-write:

    • git status exits 128: fatal: Unable to read current working directory: Permission denied
    • npm -v fails: EPERM: operation not permitted, lstat 'C:\' (from realpath)
    • powershell.exe starts in C:\ instead of the project folder
    • Adding processContainer.filesystem.enumeratePaths for the project's ancestors fails with: enumeratePaths is not supported by this version of Windows; enumeration-only access requires native ProcessContainer support

    So on current 25H2 builds there is no way to run git or npm in a user-profile project without granting the parents read-only, which exposes the whole profile. It would help to document which Windows build first ships PSEC 1.1 fs_enumerate, and to have getPlatformSupport() report it, so callers can choose their own fallback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-Windows

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions