Skip to content

fix(windows): skip nested junctions in Glob roots - #4683

Draft
liubf21 wants to merge 1 commit into
apache:mainfrom
liubf21:fix/windows-glob-nested-junction
Draft

fix(windows): skip nested junctions in Glob roots#4683
liubf21 wants to merge 1 commit into
apache:mainfrom
liubf21:fix/windows-glob-nested-junction

Conversation

@liubf21

@liubf21 liubf21 commented Sep 3, 2026

Copy link
Copy Markdown

Summary

Fixes #3938

Allow recursive Glob roots to contain a validated nested NTFS junction. The broker skips the junction instead of traversing it, so ordinary files remain enumerable while the junction target receives no AppContainer ACE. Reparse-point roots, symlinks, volume mounts, file reparse points, and unsupported tags remain fail-closed.

Verification

  • cargo fmt --check
  • cargo check --locked --tests --target x86_64-pc-windows-gnu
  • npm exec biome lint packages/runtime/src/__tests__/filesystem-worker-windows-smoke.test.ts packages/runtime/src/filesystem-worker/sandbox-paths.ts
  • npm --workspace @maka/runtime run build
  • Focused filesystem-worker tests: 52 passed
  • git diff --check
  • Native Windows junction/ACL execution is pending Windows CI; the local Windows smoke suite is skipped on macOS.

Security

The nested exception is deliberately narrow: the broker reads reparse data, admits only directory mount-point tags whose substitute target is a local drive path, and continues rejecting all other reparse forms.

AI use

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: Codex assisted investigation, implementation, tests, documentation, and review. Commit f7f28c971099c852fa7f4ee8240fb21c11d925b2 carries Generated-by: Codex.

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No

@github-actions github-actions Bot added the effort/M Under 500 readable lines label Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/M Under 500 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(windows): Glob fails when an approved tree contains a nested junction

1 participant