Skip to content

fix(windows): reject UNC paths before filesystem access - #781

Merged
steipete merged 7 commits into
mainfrom
fix/windows-unc-before-fs
Oct 1, 2026
Merged

steipete merged 7 commits into
mainfrom
fix/windows-unc-before-fs

Conversation

@steipete

@steipete steipete commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Problem

A hosted-runner timing diagnostic on 2026-09-30 (run 36742077471, fs-safe-windows-16core, Node 22 and 24, JavaScript fallback) wrapped every node:fs call and found library code calling fs.lstatSync on attacker-style UNC payloads before rejecting them:

  • lstatSync("\\server\share\secret.txt") from Root.read/open/stat(payload) (2770–2811 ms per call)
  • lstatSync("\\server\share\") from Root.mkdir("\\server\share")

On Windows even a metadata lookup on \\host\share\... makes the OS resolve and connect to host over SMB. An attacker who controls a pathname can therefore make the process reach out to a host of their choosing (NTLM credential exposure / SSRF) and stall it for seconds, even though the path is eventually rejected as outside the Root.

Root cause

prepareRootTraversal supports absolute spellings that reach the Root through a filesystem alias (symlinked ancestors, junctions, macOS /tmp vs /private/tmp). When an absolute candidate is not lexically inside the Root, rawPathRelativeToCanonicalRoot lstat/realpaths each prefix of the candidate to look for such an alias. Namespace-alias admission (hasWindowsPathAlias) only rejects colon aliases, so UNC (\\host\share, //host/share), extended UNC (\\?\UNC\host\share, \\.\UNC\...) and device-namespace roots (\\?\GLOBALROOT\..., \\.\pipe\..., \\?\Volume{...}) went straight into that walk. For \\server\share the single empty segment produced exactly the \\server\share\ lookup seen in the log.

A read-only audit of every public path-taking API found four more sites that probe the filesystem before their own containment check, independent of the Root resolver: secret-file writers (queue-key canonicalization), writeViaSiblingTempPath (target parent realpath), movePathToTrash (target lstat), and archive output preparation (prepareArchiveOutputPath parent realpath).

Fix

  • windowsShareOrDeviceRoot (pure syntax): comparable share/device root for any spelling with two leading separators. It folds \\?\UNC\ / \\.\UNC\ to \\, normalizes separators, and folds ASCII case only, so Unicode case folding (for example U+212A KELVIN SIGN) cannot make a different host compare equal. Namespaced drive roots \\?\C:\ and \\.\C:\ stay local and are excluded. Namespace spellings whose target the spelling cannot establish are always foreign: Node hands \\?\/\\.\ strings to Win32 unchanged, where .. climbs out of a drive or share (path.win32.resolve("\\\\.\\C:\\..\\UNC\\evil\\s") is \\.\UNC\evil\s) and trailing dots, spaces and empty components are rewritten, and GLOBALROOT/Global expose whole object namespaces. Ordinary \\host\share\.. stays clamped at the share by Node.
  • isForeignWindowsShareOrDevicePath (win32 only): true when that key matches none of the trusted boundary spellings.
  • Lexical rejection, before any filesystem call, with each site's existing error:
    • prepareRootTraversal (Root read/open/stat/exists/list/entries/walk/mkdir/remove/resolve, openRootFile*, root JSON readers, local-roots, external output) plus defense in depth inside rawPathRelativeToCanonicalRoot
    • pathScope.existing/files absolute realpath fallback
    • secret-file writers now run their existing lexical containment check before canonicalizing the queue key (they already required lexical containment, so no accepted input changes)
    • writeViaSiblingTempPath, movePathToTrash, archive output preparation

Compatibility: local alias walks, namespaced drives, and a Root/allowed root/destination that itself lives on \\server\share keep working (same-share candidates are still resolved). The one intentional behavior change: an absolute input on a different share or device namespace is no longer resolved through filesystem aliases back into the boundary. No test or documented contract relied on that; error codes are unchanged. POSIX behavior is unchanged.

Out of scope, noted for follow-up: when symlink following is allowed, an admitted local path whose symlink/reparse target is a UNC share is still resolved by the OS; this change only gates caller-supplied spellings. Standalone APIs where the caller supplies the location by contract (resolveAbsolutePathFor*, readSecretFile, stores, lock targets, copyTree, ...) keep accepting UNC paths by design.

Proof

  • New test/windows-share-root-admission.test.ts: syntax tables (UNC, extended/device UNC, mixed separators, doubled separator, GLOBALROOT/Volume/pipe/PhysicalDrive, namespaced drives, same-share, Kelvin sign, POSIX no-op); POSIX-runnable regressions that spoof process.platform and spy on node:fs to prove no call receives the canary host; Windows-only integration over Root, pathScope, secret writers, sibling-temp, trash and archive preparation in default and native-off modes, asserting no node:fs / fs/promises call argument contains the canary host.

  • Negative control: removing the gates makes the spy tests fail with the canary lookups recorded (/fs-safe-unc-canary, .../share, .../share/secret.txt, and one per audit site).

  • Autoreview (Codex, P1): two rounds of findings fixed (GLOBALROOT key conflation; Win32 trimming/dot-segment aliases of namespace spellings, which led to the fail-closed namespace rule above), third round scoped-clean.

  • Local (macOS): full pnpm test 13,142 passed (only the known locally-unbuildable allocator artifact suite fails); typecheck, lint:file-size, lint:fs-boundary, docs:check, git diff --check pass.

  • Windows A/B proof on fs-safe-windows-16core: run 36794090469 (throwaway diag/unc-admission-proof branch: this branch plus a setup file that records every node:fs call whose argument starts with two separators, excluding namespaced drives; JavaScript fallback; Node 22 and 24; before restores src/ from main 851bd85, tests unchanged). Suites: test:security files plus the new test file.

    leg Node 22 Node 24
    before (main src/) 185 UNC-shaped fs calls; 53 new regression tests fail 185 UNC-shaped fs calls; 53 new regression tests fail
    after (this branch) 0 calls; 257 passed 0 calls; 257 passed

    The before leg reproduces the original observation: write-boundary-bypass → lstatSync("\\server\share\") took 2782 ms, and read-boundary-bypass → lstatSync("\\server\share\secret.txt"); the canary payloads additionally reach lstatSync/realpathSync.native across \\?\UNC\…, \\.\UNC\… and \\?\GLOBALROOT\Device\Mup\… prefixes. The after leg includes the real-Windows integration tests for Root, pathScope, secret writers, sibling-temp, trash and archive preparation in default and native-off modes.

On Windows, even lstat or realpath on an attacker-chosen UNC path makes the
OS contact that SMB host (NTLM exposure, SSRF, multi-second stall). A hosted
runner diagnostic caught Root.read/open/stat/mkdir probing
\\server\share\secret.txt and \\server\share\ from the absolute-alias walk in
rawPathRelativeToCanonicalRoot before rejecting them as outside the Root.

Derive a syntactic share/device root key for spellings with two leading
separators (\\?\UNC\ and \\.\UNC\ folded to \\, ASCII-only case folding,
namespaced drives excluded as local). Namespace spellings whose authority is
not syntactic are always foreign: Node hands \\?\ and \\.\ strings to Win32
unchanged, where dot segments climb out of \\.\C:\ or \\?\UNC\host\share
and trailing dots, spaces and empty components are rewritten, and
GLOBALROOT/Global expose whole object namespaces.

Reject foreign share/device paths lexically, with each site's existing error,
before the Root canonical alias walk (plus defense in depth inside the walk),
the pathScope existing/files realpath fallback, secret-file queue-key
canonicalization (existing lexical containment now runs first),
writeViaSiblingTempPath, movePathToTrash, and archive output preparation.
Local alias walks, namespaced drives and the boundary's own share keep
working; POSIX behavior is unchanged.
@steipete
steipete requested a review from a team as a code owner October 1, 2026 00:02
@clawsweeper clawsweeper Bot added P0 Emergency: data loss, security bypass, crash loop, or unusable core runtime. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 1, 2026
@clawsweeper

clawsweeper Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed September 30, 2026, 9:34 PM ET / October 1, 2026, 01:34 UTC (Revision 5).

ClawSweeper review

What this changes

The branch adds Windows share and device-path checks to filesystem roots, path scopes, secret writes, temporary output, trash, and archive preparation, with tests and security documentation.

Merge readiness

⛔ Blocked before merge - 12 items remain

Current main still has the reported UNC lookup problem. The PR is useful, but three entry paths can still reach a different Unicode-named host before the new rejection runs, so it is not ready to merge.

Priority: P0
Reviewed head: f619bed4cfa3b2c72a974ce960c492be272f3d21
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The Windows before-and-after evidence is useful, but three security-boundary gaps prevent confidence in the patch.
Proof confidence 🦐 gold shrimp (3/6) Needs stronger real behavior proof before merge: Authority-chain proof required: The linked real-Windows Node 22/24 run reports zero canary filesystem calls after the fix across Root, path-scope, and output entrypoints, but it does not exercise an allowed UNC Root against the nearest distinct Unicode-folded host or show rejection before final filesystem I/O there. A redacted Windows trace of that route is needed; updating the PR body should trigger re-review, or a maintainer can request @clawsweeper re-review. No stored-data contract changes. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🧂 unranked krab (1/6) Security review found an item that needs attention.

Verification

Check Result Evidence
Real behavior Needs proof Needs stronger real behavior proof before merge: Authority-chain proof required: The linked real-Windows Node 22/24 run reports zero canary filesystem calls after the fix across Root, path-scope, and output entrypoints, but it does not exercise an allowed UNC Root against the nearest distinct Unicode-folded host or show rejection before final filesystem I/O there. A redacted Windows trace of that route is needed; updating the PR body should trigger re-review, or a maintainer can request @clawsweeper re-review. No stored-data contract changes. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 10 items Root guard runs after prefix admission: The new foreign-share check is only in the branch taken when direct Root-prefix admission fails. Case-folded prefix admission can inspect the candidate root first.
Case-folded prefix can trigger filesystem identity inspection: Windows Root-prefix comparison uses Unicode lowercasing; an identity match then inspects the candidate root path.
Path-scope guard misses lexical success: The added foreign-share check runs only after lexical resolution fails. An accepted missing path can later reach the existing-path fallback and its filesystem lookups.
Findings 3 actionable findings [P1] Check foreign shares before direct Root-prefix admission
[P1] Gate path-scope lexical success before missing-file fallback
[P1] Reject distinct share keys before secret queue canonicalization
Security Needs attention Distinct UNC host can bypass early rejection: The new ASCII-only share key distinguishes the two hosts, but earlier Unicode-folded containment comparisons can perform filesystem work before that key is checked.

How this fits together

fs-safe accepts caller-supplied paths and checks them against trusted filesystem roots before Node performs filesystem operations. These checks protect reads, writes, secret files, trash moves, and archive output.

flowchart LR
A[Caller-supplied path] --> B[Windows path parsing]
B --> C[Share and device check]
C --> D[Root containment check]
D --> E[Filesystem identity checks]
E --> F[Read, write, or rejection]
Loading

Decision needed

Question Recommendation
After the bypasses are repaired, should foreign-share filesystem aliases into a trusted Root be rejected unconditionally as the new security boundary? Adopt fail-closed admission: Accept the cross-share compatibility change after the early guards and Windows boundary proof are complete, with upgrade guidance in the release note.

Why: The PR intentionally changes previously accepted alias behavior, and the captured discussion contains no explicit maintainer acceptance of that compatibility tradeoff.

Before merge

  • Add real behavior proof - Needs stronger real behavior proof before merge: Authority-chain proof required: The linked real-Windows Node 22/24 run reports zero canary filesystem calls after the fix across Root, path-scope, and output entrypoints, but it does not exercise an allowed UNC Root against the nearest distinct Unicode-folded host or show rejection before final filesystem I/O there. A redacted Windows trace of that route is needed; updating the PR body should trigger re-review, or a maintainer can request @clawsweeper re-review. No stored-data contract changes. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Check foreign shares before direct Root-prefix admission (P1) - admitRawPathInsideRoot runs before this new guard. With a trusted \\kost\share Root, a path under \\Kost\share can match after Unicode lowercasing and cause candidate-root identity I/O on the different host before rejection. Check the raw authority first.
  • Gate path-scope lexical success before missing-file fallback (P1) - This guard runs only when lexical resolution fails. Node's Windows relative-path comparison accepts \\Kost\share\root\x beneath \\kost\share\root; pathScope.existing() can then carry that foreign spelling into its missing-file fallback and filesystem lookup. Reject the raw share before lexical resolution.
  • Reject distinct share keys before secret queue canonicalization (P1) - The new containment assertion uses Windows path.relative, which treats the Kelvin-sign host as the ASCII k host. It can therefore pass a different-host file path to canonicalPathFromExistingAncestor, allowing a network lookup before the secret writer rejects it. Compare raw share authority first.
  • Resolve security concern: Distinct UNC host can bypass early rejection - The new ASCII-only share key distinguishes the two hosts, but earlier Unicode-folded containment comparisons can perform filesystem work before that key is checked.
  • Resolve merge risk (P1) - The linked Windows run does not show rejection before final filesystem I/O for a distinct Unicode-folded host when the trusted Root itself is on a UNC share.
  • Resolve merge risk (P1) - Applications that relied on an absolute path reaching a trusted root through a different-share filesystem alias will now receive a containment error; maintainer acceptance of that upgrade change is not recorded.
  • Complete next step (P2) - Repair the three early-admission gaps, provide redacted Windows final-I/O proof for a distinct Unicode-folded host, and obtain the cross-share alias compatibility decision before merge.
  • Improve patch quality - Move the foreign-share check before each of the three Unicode-folded admission paths.
  • Improve patch quality - Add final-effect proof for the nearest unauthorized host under an allowed UNC Root, showing rejection before filesystem I/O.
  • Improve patch quality - Record the maintainer's cross-share alias compatibility decision and upgrade guidance.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.

Findings

  • [P1] Check foreign shares before direct Root-prefix admission — src/root-path.ts:183-186
  • [P1] Gate path-scope lexical success before missing-file fallback — src/root-paths.ts:300-305
  • [P1] Reject distinct share keys before secret queue canonicalization — src/secret-file.ts:273-276
  • [high] Distinct UNC host can bypass early rejection — src/root-path.ts:184
Agent review details

Security

Needs attention: Three early-admission gaps can still permit a different Unicode-named UNC host to receive a filesystem lookup before rejection.

Review metrics

Metric Value Why it matters
Code and test delta production +87/-6 lines; tests +283 lines The production growth spans nine security-sensitive source files and has a stated boundary-hardening purpose.

Merge-risk options

Maintainer options:

  1. Repair all three early guards (recommended)
    Move foreign-share rejection ahead of Root-prefix admission, path-scope lexical success, and secret queue canonicalization, then show the allowed and forbidden Windows final-I/O outcomes.
  2. Decide the alias contract
    A filesystem-boundary owner can accept the documented cross-share rejection once its upgrade effect is clear.

Technical review

Best possible solution:

Check the raw share or device authority before every prefix or relative-path comparison, then prove both same-share access and different-host rejection on Windows and document the approved cross-share upgrade behavior.

Do we have a high-confidence way to reproduce the issue?

Yes for the reported UNC lookup: the captured PR body gives a Windows before-and-after trace. The Unicode-host bypass has a high-confidence source path and Node path-comparison diagnostic, but no final-I/O Windows trace.

Is this the best way to solve the issue?

No. Lexical rejection is the right boundary, but these three guards must run before comparisons that can equate different host spellings.

Full review comments:

  • [P1] Check foreign shares before direct Root-prefix admission — src/root-path.ts:183-186
    admitRawPathInsideRoot runs before this new guard. With a trusted \\kost\share Root, a path under \\Kost\share can match after Unicode lowercasing and cause candidate-root identity I/O on the different host before rejection. Check the raw authority first.
    Confidence: 0.98
  • [P1] Gate path-scope lexical success before missing-file fallback — src/root-paths.ts:300-305
    This guard runs only when lexical resolution fails. Node's Windows relative-path comparison accepts \\Kost\share\root\x beneath \\kost\share\root; pathScope.existing() can then carry that foreign spelling into its missing-file fallback and filesystem lookup. Reject the raw share before lexical resolution.
    Confidence: 0.96
  • [P1] Reject distinct share keys before secret queue canonicalization — src/secret-file.ts:273-276
    The new containment assertion uses Windows path.relative, which treats the Kelvin-sign host as the ASCII k host. It can therefore pass a different-host file path to canonicalPathFromExistingAncestor, allowing a network lookup before the secret writer rejects it. Compare raw share authority first.
    Confidence: 0.97

Overall correctness: patch is incorrect
Overall confidence: 0.97

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 1ad57695bf87.

Labels

Label changes:

No label changes.

Label justifications:

  • P0: A remaining attacker-chosen UNC lookup can expose credentials or stall a Windows process before rejection.
  • merge-risk: 🚨 security-boundary: The new guards still allow a key-distinct Unicode host to reach filesystem identity or canonicalization work.
  • merge-risk: 🚨 compatibility: The PR intentionally ends support for cross-share aliases into a trusted boundary.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🦐 gold shrimp and patch quality is 🧂 unranked krab.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: Authority-chain proof required: The linked real-Windows Node 22/24 run reports zero canary filesystem calls after the fix across Root, path-scope, and output entrypoints, but it does not exercise an allowed UNC Root against the nearest distinct Unicode-folded host or show rejection before final filesystem I/O there. A redacted Windows trace of that route is needed; updating the PR body should trigger re-review, or a maintainer can request @clawsweeper re-review. No stored-data contract changes. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

Security concerns:

  • [high] Distinct UNC host can bypass early rejection — src/root-path.ts:184
    The new ASCII-only share key distinguishes the two hosts, but earlier Unicode-folded containment comparisons can perform filesystem work before that key is checked.
    Confidence: 0.97

What I checked:

  • Root guard runs after prefix admission: The new foreign-share check is only in the branch taken when direct Root-prefix admission fails. Case-folded prefix admission can inspect the candidate root first. (src/root-path.ts:184, f619bed4cfa3)
  • Case-folded prefix can trigger filesystem identity inspection: Windows Root-prefix comparison uses Unicode lowercasing; an identity match then inspects the candidate root path. (src/root-boundary.ts:95, f619bed4cfa3)
  • Path-scope guard misses lexical success: The added foreign-share check runs only after lexical resolution fails. An accepted missing path can later reach the existing-path fallback and its filesystem lookups. (src/root-paths.ts:305, f619bed4cfa3)
  • Secret queue canonicalization follows Unicode-folded containment: The new lexical containment check precedes canonicalization, but its Windows path-relative comparison can accept a distinct Unicode-folded host name. (src/secret-file.ts:274, f619bed4cfa3)
  • New share keys distinguish the host names: The new helper deliberately folds ASCII case only, so the Kelvin-sign host and the ASCII k host have different share keys. (src/windows-path-syntax.ts:28, f619bed4cfa3)
  • Windows path comparison diagnostic: A read-only Node diagnostic returned relative path x from \\kost\share\root to \\Kost\share\root\x, confirming the lexical comparison used by the affected paths.

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (4 earlier review cycles)
  • reviewed 2026-10-01T00:11:42.627Z sha 23d4f41 :: blocked before merge. :: none
  • reviewed 2026-10-01T00:33:50.708Z sha 018d311 :: blocked before merge. :: none
  • reviewed 2026-10-01T00:49:49.331Z sha ef8b70e :: needs real behavior proof before merge. :: [P1] Check foreign shares before direct Root-prefix admission
  • reviewed 2026-10-01T01:14:50.124Z sha 30dea7e :: needs real behavior proof before merge. :: [P1] Check foreign shares before direct Root-prefix admission | [P1] Gate path-scope lexical success before missing-file fallback | [P1] Reject distinct share keys before secret queue canonicalization

@clawsweeper clawsweeper Bot added merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed proof: sufficient Contributor real behavior proof is sufficient. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Oct 1, 2026
@steipete
steipete enabled auto-merge (squash) October 1, 2026 01:32
@steipete
steipete merged commit 900a770 into main Oct 1, 2026
46 checks passed
@steipete
steipete deleted the fix/windows-unc-before-fs branch October 1, 2026 01:46
steipete added a commit that referenced this pull request Oct 1, 2026
Follow-up to #781. ClawSweeper's review of #781 found that the library's
other lexical containment checks fold Unicode case (Windows path.relative,
the Root prefix identity match, isPathInside), so a host spelled with U+212A
KELVIN SIGN compared as the trusted ASCII host and was probed (Root identity
lstat, pathScope missing-file fallback, secret-file queue key) before the
ASCII-only share gate ran.

Run the share/device gate first at the shared lexical choke points:
prepareRootTraversal (before direct admission), the pathScope lexical core,
the public isPathInside, and secret-file containment. A spelling exactly
under a trusted boundary without climbing above it is never foreign, which
keeps Roots on GLOBALROOT shadow-copy paths working.

Refine namespace spellings: the authority (head, plus host and share for
UNC) must not be empty or end in a dot or space, and later all-dot or
all-space components may not climb above it; GLOBALROOT/Global stay
unidentifiable. Local spellings such as \\?\C:\a\..\b stay local.

Document the intentional cross-share compatibility change and the upgrade
path (boundary-relative paths, or paths spelled on the boundary's own share),
and account for the gate in the Windows isPathInside fast-path oracle.

Proof: real Windows A/B on fs-safe-windows-16core (run 36803970186): main
admits the Kelvin host in isPathInside, pathScope and secret writers; this
change rejects it with no fs call, and a real \\localhost\C$ network Root
keeps resolving its own share while \\127.0.0.1\C$ is rejected without an
fs call.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. P0 Emergency: data loss, security bypass, crash loop, or unusable core runtime. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant