Skip to content

Bind MCP indexing to authorized filesystem identities - #4679

Merged
Widthdom merged 8 commits into
mainfrom
fix-issue4606
Jul 19, 2026
Merged

Bind MCP indexing to authorized filesystem identities#4679
Widthdom merged 8 commits into
mainfrom
fix-issue4606

Conversation

@Widthdom

@Widthdom Widthdom commented Jul 19, 2026

Copy link
Copy Markdown
Owner

Summary

  • Bind MCP index authorization to retained no-follow root and opened entry identities.
  • Enumerate directories relative to retained handles on Linux, macOS, and Windows, and reject link or identity swaps at the actual open boundary.
  • Confine language-map and pattern configuration to an authorization-scoped project snapshot, normalize Windows long paths, and preserve the checked root identity in results and audit failures.
  • Preserve the latest main language-detection contracts while routing ambiguous .m / .pl prefix reads and project-marker enumeration through the same authorized identity boundary.
  • Stabilize the Windows CI transaction and isolated-hook timing contracts with restored test-only budgets tracked by Stabilize Windows CI timing contracts for shared-writer and hook-worker tests #4687.

Root cause

MCP authorized a canonical pathname before traversal, but later filesystem operations and configuration discovery reopened pathnames without binding every read and directory enumeration to the checked filesystem identity and authorization scope.

The latest main language detection added early content and project-marker probes for ambiguous extensions; the conflict resolution preserves those probes while ensuring MCP indexing supplies its identity-bound read and enumeration delegates.

The Windows test lane also used the production 5-second transaction contention timeout in a non-fair semaphore stress test and a 250 ms isolated-worker startup/callback budget, so hosted-runner scheduling variance could be misclassified as a transaction leak or healthy-hook timeout.

Impact

This prevents symlink, reparse-point, directory, file, and sidecar swaps from redirecting network-triggered MCP indexing outside the approved CWD/client roots or importing configuration cached under a wider scope.

The CI-only timing changes do not alter production defaults. They preserve dedicated timeout coverage while avoiding false failures on loaded Windows runners.

Validation

Documentation and changelog

Follow-up candidates

None.

Fixes #4606
Fixes #4687

@Widthdom
Widthdom marked this pull request as ready for review July 19, 2026 16:32
@Widthdom
Widthdom merged commit 1083d20 into main Jul 19, 2026
9 checks passed
@Widthdom
Widthdom deleted the fix-issue4606 branch July 19, 2026 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant