Skip to content

fix(policy): reject Windows filesystem roots as read-write paths - #5303

Merged
shailendra-nv merged 7 commits into
ai-openshell:windowsfrom
nv-rahool:fix/5302-windows-root-paths/nv-rahool
Nov 19, 2026
Merged

shailendra-nv merged 7 commits into
ai-openshell:windowsfrom
nv-rahool:fix/5302-windows-root-paths/nv-rahool

Conversation

@nv-rahool

@nv-rahool nv-rahool commented Nov 5, 2026 •

Copy link
Copy Markdown

Summary

Reject filesystem roots as read-write grants across POSIX and Windows path spellings, including normalized device namespaces and NTFS directory-stream aliases. Namespace validation uses constant stack space and skips oversized paths.

Related Issue

Closes #5302

Changes

  • Recognize drive, UNC share, device, volume, partition, and namespace-link roots independently of the gateway OS, including separator and trailing-dot/space aliases.
  • Check non-verbatim namespace components after Win32 normalization, so paths such as \\.\Global\.\C:\ cannot evade root rejection.
  • Recognize ::$INDEX_ALLOCATION and :$I30:$INDEX_ALLOCATION directory streams, including verbatim paths; a stream of a root does not narrow the grant.
  • Preserve narrower directory paths and the known GLOBALROOT/SystemRoot alias. Unknown object-namespace aliases remain conservatively rejected, as explicitly requested.
  • Add policy and gateway regressions, narrower-path and literal-namespace controls, and deep/oversized-input coverage. Document the rejected aliases and migration guidance.
  • Reuse the VM runtime hashes and K3s installer pin already merged into windows via fix(ci): repair Windows VM runtime and K3s installer pins #5736, retaining checksum enforcement.

The existing host-dependent absolute-path check is outside this change. The acknowledged compatibility advisory for conservative rejection of unknown object aliases remains documented; it does not satisfy the current train's ordinary no-break restriction. The maintaining operator requested merge after successful local validation with this protection retained.

Testing

Latest revision: fb66c770e8de9d6adb0e641ecaf117880a981209 (new signed-off commit; existing commits preserved).

  • Native Windows ARM64, Rust 1.95.0: cargo test --locked -p openshell-policy — 310 passed in the unoptimized test profile.
  • Full local native Windows suite: mise run --skip-tools windows:test:arm64 — 6,669 passed across 77 binaries, 43 skipped, no failures. Test execution took 74.630 seconds after compilation.
  • Scoped Clippy with warnings denied, repository Rust formatting, Markdown lint (157 files), and git diff --check.
  • Both new regressions failed before the fix and passed afterward. Native canonicalization and directory metadata confirm all nine reported alias spellings identify the drive root and now fail validation; narrower Windows-directory controls remain accepted.
  • Existing root, SystemRoot, literal-namespace, and deep-namespace tests pass. Unknown-alias rejection has explicit preservation coverage.
  • Windows MSVC x64/ARM64: 6,669 passed and 43 skipped per architecture, both on the first attempt.
  • Separate /windows-ci ARM64 check/build/test/packaging pipeline for this revision.
  • Branch Checks: Linux/macOS Rust, SDKs, lint, formatting, and repository checks passed. Compatibility execution succeeded; its known finding remains open.
  • Branch E2E/integration: all selected runtime, conformance, feature, driver integration, and packaging suites passed (64 jobs passed; 6 optional jobs skipped).

The prior revision e3739ef passed Windows x64/ARM64, Branch Checks, and E2E; those results are not being counted for this new revision. Native probes verify validation and filesystem resolution, not MXC workload writes. Manual MXC scenarios have not been rerun on this revision. The earlier full local pre-commit attempt hit a Windows ARM64 Biome crash; current verification follows the scoped guidance in CONTRIBUTING.md.

Checklist

  • Conventional Commit messages and DCO sign-offs.
  • Regression tests and policy documentation updated.
  • bug(policy): Windows drive and share roots are accepted as read_write paths #5302 attached and accepted.
  • All requested test workflows passing on the latest revision.
  • Both additional review findings fixed and all inline threads resolved.
  • Approved after successful full local validation and merged via the normal GitHub merge operation as 7e4e113e3249238b61db71947c4b79b2d7a247e3.
  • Separate /windows-ci ARM64 pipeline complete; it was still running when merge was requested and performed.

validate_filesystem_paths only treated POSIX "/" (and repeated "/") as the
filesystem root, so read_write entries such as "C:/", "C:\", "\",
"\\?\C:\" or "\\server\share" passed validation on a Windows gateway and
reached the MXC driver as a whole-drive grant.

Detect roots lexically and independently of the gateway host OS: POSIX
roots, drive roots, the current-drive root, verbatim/device drive roots and
UNC share roots, ignoring repeated separators and "." components. The
shared validator covers sandbox create, live policy updates and the
supervisor's OPA data check.

Signed-off-by: Rahool Paliwal <rpaliwal@nvidia.com>
@copy-pr-bot

copy-pr-bot Bot commented Nov 5, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

All contributors have signed the DCO ✍️ ✅
Posted by the DCO Assistant Lite bot.

@nv-rahool

Copy link
Copy Markdown
Author

I have read the DCO document and I hereby sign the DCO.

@nv-rahool

Copy link
Copy Markdown
Author

recheck

@shailendra-nv shailendra-nv left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The shared-validator change fixes the reported C:/ case, but two equivalent-root cases still pass the new validation; details are inline. Focused native ARM64 tests using the verbatim PR validator/helper pass the three new policy tests and fail two additional regression tests for these cases. This was extracted-code validation and native path-resolution testing; the full PR build and gateway E2E were not rerun, and no successful workload root write is claimed.

Comment thread crates/openshell-policy/src/lib.rs Resolved
Comment thread crates/openshell-policy/src/lib.rs Resolved

@shailendra-nv shailendra-nv left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes for the two remaining root-path validation gaps described in the existing inline comments:

  • Windows namespace/separator aliases still pass validation: #5303 (comment)
  • Win32 trailing-dot/space root aliases still pass validation: #5303 (comment)

Please close these gaps and add regression coverage before merging. The PR remains at the reviewed commit, 37ea092. Native ARM64 extracted-code tests confirmed both findings; full PR builds and gateway E2E were not rerun.

is_filesystem_root only recognised the namespace prefix when the original
path started with two backslashes, so "//?/C:/", "/\?\C:\" and the NT
spelling "\??\C:\" passed validation. It also treated only empty and "."
components as naming the root, so "C:/...", "C:/ " and "C:/. " passed even
though Win32 drops trailing dots and spaces from a component. The MXC driver
converts "/" to "\" and resolves each of these paths to the drive root.

Match the "\\?\", "\\.\" and "\??\" prefixes after separator normalization,
and treat two leading separators as a UNC prefix when either is a backslash,
so a POSIX "//tmp/x" keeps its meaning. When deciding whether a path names a
root, ignore trailing dots and spaces in its components, as Win32 does; this
includes paths with a leading "/", which the MXC driver reads as the root of
the current drive. Verbatim and NT paths keep their components as written,
so "\\?\C:\..." remains a narrower path.

Signed-off-by: Rahool Paliwal <rpaliwal@nvidia.com>
@nv-rahool

Copy link
Copy Markdown
Author

Pushed 926cc6a for both review threads.

  • Linux (Rust 1.95.0): cargo test -p openshell-policy --lib passes 304/304; cargo fmt --all --check and cargo clippy -p openshell-policy --all-targets --no-deps -- -D warnings are clean. With the previous is_filesystem_root, the new alias test fails.
  • Windows x64 (Windows Insider 28020.3382): cargo test -p openshell-policy passes 304/304, cargo test -p openshell-server --lib validate_policy_safety passes 8/8, and mise run windows:lint:x64 and mise run windows:build:x64 succeed. For each spelling I compared the validator's result with std::fs::canonicalize of the slash-converted path: every spelling that resolves to \\?\C:\ is rejected, and the accepted controls (\\?\C:\..., \??\C:\ , /tmp/..., C:/work/b35/rw) do not resolve to it.
  • Through a gateway with the MXC driver on the same host:
    • Before this commit, sandbox create rejected none of //?/C:/, /\?\C:\, \??\C:\, //./C:/, C:/..., C:/ , C:/. , \... and \\.\C:\.... //?/C:/ and /\?\C:\ reached Ready; the others failed later in CreateProcessSecurityEnvironment (0x80070057). A live policy set adding //?/C:/, \??\C:\, C:/... or C:/ loaded.
    • With this commit, all of these, plus /... and / , are rejected with InvalidArgument at sandbox create and at policy set. /tmp, C:/work/b35/rw and a live update adding C:/work/b35/rw2 still work. The C:\ ACL was unchanged.

Not changed: //server/share written only with forward slashes is still not treated as a share root, so that POSIX //tmp/x keeps its meaning. On Windows the MXC driver would pass it on as \\server\share.

@shailendra-nv shailendra-nv left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes: the current revision still accepts a GLOBALROOT device path that names a whole drive. The actionable finding and reproduction evidence are inline.

Reviewed commit: 926cc6a7f49de649f3be30b3378b1a57950d3996 against windows. The separator/namespace and trailing-dot/space cases raised previously are covered by this revision. All four added policy tests passed in an isolated native Windows ARM64 harness using the exact validator/helper; the additional GLOBALROOT rejection regression failed with Ok(()). Full crate/server tests and MXC end-to-end enforcement were not rerun.

Separately, linked issue #5302 lacks state:accepted, and the PR author's verified repository permission is read, so the target branch's issue-acceptance requirement remains unmet.

Comment thread crates/openshell-policy/src/lib.rs Resolved
is_filesystem_root took the first name after "\\?\", "\\.\" or "\??\" as
the volume, so "\\?\GLOBALROOT\Device\HarddiskVolume4\" was read as the
directory "Device\HarddiskVolume4" on a volume called GLOBALROOT and passed
validation. GLOBALROOT links to the root of the NT object namespace, so the
path names the whole volume, and the MXC driver accepts grants in that
namespace.

Read the name after the prefix as an entry of the "\??" directory: "UNC"
and drive letters as before, "Global" as a link back to the same directory,
and "GLOBALROOT" as the object namespace root. Below that root, "\??",
"\GLOBAL??" and "\DosDevices" hold the same names, and a "\Device" path
names a volume after the device name, after "HarddiskN\PartitionM" for a
disk, or after the server and share for a network redirector. Any other
object path is treated as a root, because a link elsewhere in the namespace
can name a whole volume.

Signed-off-by: Rahool Paliwal <rpaliwal@nvidia.com>
@nv-rahool

Copy link
Copy Markdown
Author

Pushed d644341 for the GLOBALROOT review.

  • Linux (Rust 1.95.0): cargo test -p openshell-policy --lib passes 305/305; cargo fmt --all --check and cargo clippy -p openshell-policy --all-targets --no-deps -- -D warnings are clean. Against the previous is_filesystem_root, the new test fails on \\?\GLOBALROOT\Device\HarddiskVolume4\.
  • Windows x64 (Windows Insider 28020.3382, C: = \Device\HarddiskVolume4 = \Device\Harddisk0\Partition4): cargo test -p openshell-policy passes 305/305, cargo test -p openshell-server --lib validate_policy_safety passes 8/8, and mise run windows:lint:x64 and mise run windows:build:x64 succeed. For each spelling I compared the validator's result with std::fs::canonicalize:
    • Rejected, and each resolves to \\?\C:\: \\?\, \\.\ and \??\GLOBALROOT\Device\HarddiskVolume4\, \\.\GLOBALROOT\Device\HarddiskVolume4\. , \\?\GLOBALROOT\Device\Harddisk0\Partition4\, \\?\GLOBALROOT\??\C:\, \\?\GLOBALROOT\GLOBAL??\C:\, \\?\GLOBALROOT\DosDevices\C:\, \\?\Global\C:\, \\.\Global\C:\, \\?\GLOBALROOT\??\Global\C:\ and the volume GUID path.
    • Also rejected: \\?\GLOBALROOT\Device\Mup\localhost\C$\ (resolves to \\?\UNC\localhost\C$), and \\?\GLOBALROOT\SystemRoot (C:\Windows) under the unknown-object-path rule.
    • Accepted, and each resolves to C:\work\b35 or the matching share path: \work\b35 under each of the device, partition, GLOBALROOT\??, Global, Mup and volume GUID spellings.
  • Through a gateway with the MXC driver on the same host (Session 0):
    • sandbox create rejects \\?\, \\.\ and \??\GLOBALROOT\Device\HarddiskVolume4\, //?/GLOBALROOT/Device/HarddiskVolume4/, \\?\GLOBALROOT\??\C:\, \\?\Global\C:\ and \\?\GLOBALROOT\SystemRoot with InvalidArgument ("policy contains…"). \\?\GLOBALROOT\Device\HarddiskVolume4\work\b35\rw and C:/work/b35/rw reach Ready.
    • A live policy set adding \\?\GLOBALROOT\Device\HarddiskVolume4\ or \\?\Global\C:\ is rejected with InvalidArgument; one adding \\?\GLOBALROOT\Device\HarddiskVolume4\work\b35\rw2 loads (version 2). The C:\ ACL was unchanged.
    • I did not run a workload write test with the unfixed build, so I have not checked whether MXC would have granted the whole volume.

@shailendra-nv shailendra-nv left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed d6443414ac2b35644c9307bfa0bc5c984f263fc1. The previously reported GLOBALROOT root alias is now rejected, including all three native namespace spellings. All five added policy tests plus the native-resolution regression passed in the isolated Windows ARM64 harness.

Requesting changes for one new regression: unbounded namespace recursion still runs on paths already marked too long, causing a reproducible stack-overflow abort in unoptimized development/test builds. The inline comment contains the before/after evidence and the optimized-build limitation.

The condition for proceeding to /windows-ci, approval, and merge has not been met because this actionable finding remains. No full crate/server tests or MXC end-to-end tests were run in this re-review.

Comment thread crates/openshell-policy/src/lib.rs Resolved
Signed-off-by: Shailendra Singh <shailendras@nvidia.com>
@shailendra-nv shailendra-nv added test:e2e Requires end-to-end coverage test:windows Run native Windows x64 and ARM64 lint/tests on PR mirrors labels Nov 19, 2026 — with ChatGPT Codex Connector

Copy link
Copy Markdown
Collaborator

/windows-ci

Copy link
Copy Markdown
Collaborator

/ok to test 41f9399

@github-actions

Copy link
Copy Markdown

Label test:e2e applied, but pull-request/5303 does not exist yet. A maintainer needs to comment /ok to test 41f93990d9cd556577abe35c1356fba5f882430e to mirror this PR. Once the mirror exists, re-apply the label or re-run Branch E2E Checks from the Actions tab.

@github-actions

Copy link
Copy Markdown

Compatibility review (advisory)

Unaddressed breaking changes

The candidate rejects valid narrower Windows namespace paths, not only filesystem roots. This breaks existing policy files on a non-breaking train.

1. policy — ACKED

A Windows read_write path such as //?/GLOBALROOT/SystemRoot was accepted as an absolute subdirectory but is now rejected as an overly broad filesystem root.

  • Impact: Existing policies using narrower object-namespace aliases fail openshell sandbox create and openshell policy set with INVALID_ARGUMENT.
  • Action: Restrict namespace-root detection to paths known to denote whole volumes so narrower aliases remain valid on this non-breaking train.
  • PR: fix(policy): reject Windows filesystem roots as read-write paths #5303
Review details
  • Execution: complete
  • Candidate: PR #5303 (e47a04c6e83fbb97d6f0cb273f868e02b0453591)
  • Baseline: 5b9e5b91afb10afbce8d9be09e2513a7efc22a21 (5b9e5b91afb10afbce8d9be09e2513a7efc22a21)
  • Reviewed: rust-sdk, python-sdk, go-sdk, typescript-sdk, api-behavior, cli, configuration, policy, helm, state

Advisory review; publication gates are unchanged.

Branch check run

shailendra-nv commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

Final disposition for fb66c77, merged as 7e4e113:

  • The original root-alias, recursive-parser, and SystemRoot findings are fixed. The subsequent normalized Win32 namespace and NTFS directory-stream findings are fixed in new signed-off commit fb66c77. All inline review threads are resolved.
  • Unknown GLOBALROOT alias rejection remains intact, with the compatibility advisory acknowledged and migration guidance documented. The maintaining operator requested approval and merge after successful local testing with this protection retained.
  • Full native local ARM64 testing passed: 6,669 tests across 77 binaries, 43 skipped, no failures. The focused policy suite passed 310 tests; scoped Clippy, formatting, and Markdown lint passed.
  • Windows x64/ARM64 CI each passed 6,669 tests, with 43 skipped, on the first attempt. Branch Checks and E2E/integration passed on the same commit.
  • The separate /windows-ci ARM64 check/build/test/packaging pipeline was still running at merge time. Its status is in the Windows CI bot comment; it is not counted as a completed pass here.
  • DCO and issue acceptance pass; bug(policy): Windows drive and share roots are accepted as read_write paths #5302 is attached and accepted. Checksum enforcement remains enabled for the reused CI pins.

Approval was submitted after the successful local run, and the normal GitHub squash merge completed on 2026-11-19 at 04:51 UTC.

@shailendra-nv shailendra-nv linked an issue Nov 19, 2026 that may be closed by this pull request
4 tasks
@sam-india-007

sam-india-007 commented Nov 19, 2026 •

Copy link
Copy Markdown

Windows ARM64 CI: ✅ passed

Commit fb66c77, requested by @shailendra-nv, 1h 13m, full log

Step Result Duration
if ($env:PR_NUMBER) { Import-Module .\scripts\pr-ci\OpenShellPrCi.psm1; Assert-PrCiVariables -PrN... ✅ passed 0s
& .\scripts\setup-windows-arm64-runner.ps1 -VerifyOnly ✅ passed 1s
$env:PATH = "$(Split-Path -Parent $env:RUSTC_WRAPPER);$env:PATH"; $found = (Get-Command sccache -... ✅ passed 0s
New-Item -ItemType Directory -Force (Split-Path -Parent $env:SCCACHE_ERROR_LOG) | Out-Null; & $en... ✅ passed 2s
& $env:RUSTC_WRAPPER --zero-stats ✅ passed 0s
& .\scripts\checkout-openshell.ps1 -Ref $env:OPENSHELL_REF ✅ passed 4s
& .\scripts\set-openshell-version.ps1 -Version $env:OPENSHELL_VERSION ✅ passed 0s
Set-Location $env:OPENSHELL_CHECKOUT_DIR ✅ passed 0s
mise run --skip-tools windows:check:arm64 ✅ passed 4m 07s
mise run --skip-tools windows:build:arm64 ✅ passed 22m 29s
mise run --skip-tools windows:test:arm64 ✅ passed 22m 29s
mise run --skip-tools windows:test:unsupported:arm64 ✅ passed 23m 33s
mise run --skip-tools windows:artifacts ✅ passed 2s
& "$env:CI_PROJECT_DIR\scripts\package-windows-release.ps1" ✅ passed 40s

Signed-off-by: Shailendra Singh <shailendras@nvidia.com>

Copy link
Copy Markdown
Collaborator

/windows-ci

Copy link
Copy Markdown
Collaborator

/ok to test e84cefb

@github-actions

Copy link
Copy Markdown

Compatibility review (advisory)

Unaddressed breaking changes

Existing policies using unrecognized Windows object-namespace aliases in filesystem_policy.read_write can now fail with INVALID_ARGUMENT. The PR acknowledges the impact and documents migration, but this train allows no Stable breaks.

1. policy — ACKED

Absolute read_write paths using unrecognized GLOBALROOT aliases were accepted previously but are now rejected conservatively with INVALID_ARGUMENT.

  • Impact: Sandbox creation and policy updates from the CLI or any SDK fail until affected policies replace those aliases with absolute drive or share paths.
  • Action: Defer conservative rejection of unrecognized object-namespace aliases to a breaking train, or preserve previously accepted aliases while continuing to reject known filesystem roots.
  • PR: fix(policy): reject Windows filesystem roots as read-write paths #5303
Review details
  • Execution: complete
  • Candidate: PR #5303 (453f2c94507131f057414b60de14007d0239fa88)
  • Baseline: 5b9e5b91afb10afbce8d9be09e2513a7efc22a21 (5b9e5b91afb10afbce8d9be09e2513a7efc22a21)
  • Reviewed: rust-sdk, python-sdk, go-sdk, typescript-sdk, api-behavior, cli, configuration, policy, helm, state

Advisory review; publication gates are unchanged.

Branch check run

Apply the VM runtime hashes and K3s installer pin already merged into windows in ai-openshell#5736. The runtime hashes match the published release asset digests.

Signed-off-by: Shailendra Singh <shailendras@nvidia.com>

Copy link
Copy Markdown
Collaborator

/windows-ci

Copy link
Copy Markdown
Collaborator

/ok to test e3739ef

Copy link
Copy Markdown
Collaborator

E2E diagnosed and repaired in new commit e3739ef: the previous head's macOS VM build failed because its pinned runtime archive hash was stale. The VM runtime and K3s installer files now exactly match the already-merged Windows repair in #5736 (f0db2ee); the three runtime hashes also match GitHub's release-asset digests. No checksum validation was disabled. Fresh CI has been requested for this head.

The policy code remains identical to e84cefb (308 native ARM64 tests and scoped Clippy passed). The remaining compatibility advisory for unknown object aliases stays open, with the root protection retained as requested.

@github-actions

Copy link
Copy Markdown

Compatibility review (advisory)

Unaddressed breaking changes

Stable policy validation now rejects previously accepted Windows object-namespace read-write paths, including aliases that may target narrower directories. Migration is documented and the risk is acknowledged, but this train does not allow breaks.

1. policy — ACKED

Unknown Windows GLOBALROOT object aliases previously passed filesystem validation but now return INVALID_ARGUMENT, except for the recognized SystemRoot alias.

  • Impact: Existing policies using a narrower unknown object alias fail during sandbox creation or policy application even when the alias does not grant a filesystem root.
  • Action: Preserve narrower unknown aliases in this non-breaking train, or defer their rejection to a break-allowing train while retaining the documented drive-or-share-path migration.
  • PR: fix(policy): reject Windows filesystem roots as read-write paths #5303
Review details
  • Execution: complete
  • Candidate: PR #5303 (e805ad0cbe5bb64498e7644fb667956547c03efd)
  • Baseline: 5b9e5b91afb10afbce8d9be09e2513a7efc22a21 (5b9e5b91afb10afbce8d9be09e2513a7efc22a21)
  • Reviewed: rust-sdk, python-sdk, go-sdk, typescript-sdk, api-behavior, cli, configuration, policy, helm, state

Advisory review; publication gates are unchanged.

Branch check run

@shailendra-nv shailendra-nv left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The prior root-alias and stack-overflow findings are fixed, and the SystemRoot compatibility regression is covered. Three new signed-off commits were added to this same PR without rewriting the original commits.

Validation is complete for e3739ef: Windows x64 and ARM64 each passed 6,667 tests (43 skipped), Branch Checks passed, and the full requested E2E/integration workflow passed. ARM64 passed on retry after one unrelated DNS fixture UDP-bind failure (Windows error 10013). Local policy tests passed 308/308; scoped Clippy and formatting passed. The broad local pre-commit limitation is recorded in the PR body.

Keeping Request changes for the remaining compatibility finding: unknown GLOBALROOT aliases that name narrower directories are conservatively rejected, which violates the current non-breaking train's compatibility rule. The maintainer explicitly chose to retain root protection and leave this finding open. Before approval/merge, stage this behavior in a release train that permits the documented change, or provide a verified compatibility solution that preserves whole-volume rejection for both creation and policy updates. Do not simply allow arbitrary aliases to clear the warning.

Issue #5302 is now attached and accepted. No approval or merge has been performed.

@shailendra-nv shailendra-nv left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed the unchanged head e3739ef and found two additional incomplete root-rejection cases: Win32-normalized device-namespace components and NTFS directory-stream spellings. Both return Ok(()) from the exact shared validator while native Windows ARM64 canonicalization resolves them to C:, and metadata identifies a directory. The inline comments contain the concrete inputs and requested regressions.

Validation: an isolated Rust 1.95 unoptimized harness containing the exact current validator/helper and all eight root-related tests added by this PR passed those eight tests; two added rejection assertions failed. I also compared the PR base: both aliases were accepted before, and remain accepted while the canonical root spelling is now rejected. Narrower namespace and directory-stream controls resolve to C:\Windows and remain accepted. This verifies validation and native filesystem resolution, not an MXC workload write test. No tracked files were changed.

Existing Windows, Branch Checks, and E2E CI results remain green, but do not cover these two cases. The previously acknowledged unknown-GLOBALROOT-alias compatibility finding remains open with protection retained, per the maintainer's decision. Issue #5302 remains accepted. Keeping Request changes; no approval or merge.

Comment thread crates/openshell-policy/src/lib.rs Resolved
Comment thread crates/openshell-policy/src/lib.rs Resolved
Signed-off-by: Shailendra Singh <shailendras@nvidia.com>

Copy link
Copy Markdown
Collaborator

/ok to test fb66c77

Copy link
Copy Markdown
Collaborator

/windows-ci

@github-actions

Copy link
Copy Markdown

Compatibility review (advisory)

Unaddressed breaking changes

Existing policies using unknown Windows object-namespace aliases now fail sandbox creation and policy updates with INVALID_ARGUMENT. The PR acknowledges this intentional break and provides migration guidance, but the supplied train does not allow Stable breaks.

1. policy — ACKED

A read_write path such as //?/GLOBALROOT/CustomAlias/work was accepted but is now rejected conservatively as an overly broad filesystem root.

  • Impact: CLI and SDK consumers with existing alias-based policies cannot create sandboxes or apply policy updates because the gateway returns INVALID_ARGUMENT.
  • Action: Restore acceptance of unknown aliases in this no-break train, or move the change to a break-allowed train while retaining guidance to replace each alias with a specific drive or share directory.
  • PR: fix(policy): reject Windows filesystem roots as read-write paths #5303
Review details
  • Execution: complete
  • Candidate: PR #5303 (d634932297268b4eed16b5399581fd797a026b18)
  • Baseline: 5b9e5b91afb10afbce8d9be09e2513a7efc22a21 (5b9e5b91afb10afbce8d9be09e2513a7efc22a21)
  • Reviewed: rust-sdk, python-sdk, go-sdk, typescript-sdk, api-behavior, cli, configuration, policy, helm, state

Advisory review; publication gates are unchanged.

Branch check run

@shailendra-nv shailendra-nv left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both additional root-validation findings are fixed in fb66c77 and their inline threads are resolved. The fix was added as a new signed-off commit, with narrower-path, literal-namespace, retained-protection, and gateway regressions.

Native local validation on this ARM64 machine passed: mise run --skip-tools windows:test:arm64 ran 6,669 tests across 77 binaries, all passed, with 43 skipped. The focused policy suite passed 310 tests; scoped Clippy, formatting, and Markdown lint also passed. The new regressions failed before the fix and pass afterward.

GitHub Windows x64/ARM64 each passed 6,669 tests (43 skipped); Branch Checks and the full selected E2E/integration workflow also passed for this exact commit. The separate /windows-ci ARM64 check/build/test/packaging pipeline is still running at the time of this review.

Following the explicit instruction to approve and merge after successful local validation. The conservative unknown-alias protection remains intact, and the acknowledged compatibility advisory remains documented; this approval does not claim that unknown-alias compatibility has been restored.

@shailendra-nv
shailendra-nv merged commit 7e4e113 into ai-openshell:windows Nov 19, 2026
124 of 127 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:e2e Requires end-to-end coverage test:windows Run native Windows x64 and ARM64 lint/tests on PR mirrors

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(policy): Windows drive and share roots are accepted as read_write paths

3 participants