Add Windows filepath behavior clarifications#666
Conversation
Added sections on path grants and upward directory traversal in Windows to clarify access behavior.
Clarify path grant behavior and upward directory traversal in Windows.
There was a problem hiding this comment.
Pull request overview
This PR updates the schema documentation (docs/schema.md) to clarify Windows filesystem-policy behavior, specifically around root-directory grants and scenarios where tools traverse upward through parent directories.
Changes:
- Add new Windows-specific documentation sections covering path grants vs. root directories and upward parent-directory traversal behavior.
- Fix a formatting/indentation issue in the final “See the
tests/examples/…” line.
Updated section headers for clarity and consistency regarding Windows BaseContainer. Adjusted wording to enhance understanding of path grants and upward directory traversal.
| #### Upward directory traversal for Windows BaseContainer | ||
|
|
||
| Many tools search **upward** from the working directory toward the volume root, | ||
| looking for a marker file that defines their project. With Windows BaseConatainer, When such a tool reaches a parent directory that is not in the allowlist, `ACCESS_DENIED` will be returned. To avoid this error when using BaseContainer and tools with this behavior, grant them the full path from the volume root down to your target. |
There was a problem hiding this comment.
typo: BaseConatainer
incorrect capitalization: When
|
|
||
| #### Upward directory traversal for Windows BaseContainer | ||
|
|
||
| Many tools search **upward** from the working directory toward the volume root, |
There was a problem hiding this comment.
I feel like this advice cuts against least-privilege. The end result of this would be that access is granted too broadly. It basically says 'when granting access to c:\users\gudge\appdata\local\someapp also grant access to c:\users\gudge\appdata\local, c:\users\gudge\appdata, c:\users\gudge, c:\users and c:\
There was a problem hiding this comment.
You're not wrong. The remediation for a tool behaving with this upwards search is:
- Fix the tool to not do the upwards search.
- Overprovision R/O access from Root.
- MXC does work to accommodate this.
If the audience for this documentation is a tool maker, 1 is the best option.
If the audience for this documentation is a user without this kind of access to fix the tool, 2 is the best option (or choose a different tool).
📖 Description
Adds details to the schema documentation on filepath rules clarifying behavior on Windows. These changes describe behavior when root paths are added to a readwritePath rule and behavior around upward path traversals.
🔗 References
N/A -- standalone documentation improvement.
🔍 Validation
Visual inspection of the rendered markdown
✅ Checklist
Cargo.lock, thedependency-feed-checkcheck passes (see docs/pull-requests.md)📋 Issue Type
GitHub Actions runs the PR validation build automatically. The ADO pipeline
(
MXC-PR-Build) is the Azure version of the PR pipeline, kept in parity with the GitHubActions build; it runs on merge to
main, and Microsoft reviewers with write access can trigger iton a PR with
/azp run. See docs/pull-requests.md.If the
dependency-feed-checkcheck fails on a new dependency, the crate must be added tothe feed before the PR can pass. See docs/pull-requests.md
for the steps.
Microsoft Reviewers: Open in CodeFlow