Skip to content

Add Windows filepath behavior clarifications#666

Open
mapalko wants to merge 3 commits into
microsoft:mainfrom
mapalko:patch-1
Open

Add Windows filepath behavior clarifications#666
mapalko wants to merge 3 commits into
microsoft:mainfrom
mapalko:patch-1

Conversation

@mapalko

@mapalko mapalko commented Jul 21, 2026

Copy link
Copy Markdown
Member

📖 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

📋 Issue Type

  • Bug fix
  • Feature
  • Task

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 GitHub
Actions build; it runs on merge to main, and Microsoft reviewers with write access can trigger it
on a PR with /azp run. See docs/pull-requests.md.

If the dependency-feed-check check fails on a new dependency, the crate must be added to
the feed before the PR can pass. See docs/pull-requests.md
for the steps.

Microsoft Reviewers: Open in CodeFlow

mapalko added 2 commits July 21, 2026 11:08
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.
Copilot AI review requested due to automatic review settings July 21, 2026 22:30
@mapalko
mapalko requested a review from a team as a code owner July 21, 2026 22:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Comment thread docs/schema.md Outdated
Comment thread docs/schema.md Outdated
Updated section headers for clarity and consistency regarding Windows BaseContainer. Adjusted wording to enhance understanding of path grants and upward directory traversal.
Comment thread docs/schema.md
#### 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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

typo: BaseConatainer
incorrect capitalization: When

Comment thread docs/schema.md

#### Upward directory traversal for Windows BaseContainer

Many tools search **upward** from the working directory toward the volume root,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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:\

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.

You're not wrong. The remediation for a tool behaving with this upwards search is:

  1. Fix the tool to not do the upwards search.
  2. Overprovision R/O access from Root.
  3. 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).

@microsoft-github-policy-service microsoft-github-policy-service Bot added the Needs-Author-Feedback Issue needs attention from issue or PR author label Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs-Author-Feedback Issue needs attention from issue or PR author

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants