Skip to content

Add filesystem policy path validation (same-path conflict, existence check, object-based conflict)#551

Open
SohamDas2021 wants to merge 3 commits into
mainfrom
user/sodas/filesystem-policy-path-validation
Open

Add filesystem policy path validation (same-path conflict, existence check, object-based conflict)#551
SohamDas2021 wants to merge 3 commits into
mainfrom
user/sodas/filesystem-policy-path-validation

Conversation

@SohamDas2021

@SohamDas2021 SohamDas2021 commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

📖 Description

Validate filesystem paths across readwritePaths, readonlyPaths, and deniedPaths at config parse time:

  1. Same-path conflict: most restrictive path wins- deny > r/o > r/w.
  2. Paths must exist: warn if a listed path does not exist on the host (diagnostic aid; not a hard error since some backends create mount targets dynamically).
  3. Object-based conflict: reject if two different path strings resolve to the same filesystem object (same device + inode on Unix, same canonical path on Windows) with conflicting intents.

All checks live in wxc_common and apply to every backend.

🔗 References

🔍 Validation

✅ Checklist

📋 Issue Type

  • Bug fix
  • Feature
  • Task

GitHub Actions runs the PR validation build automatically. The ADO pipeline
(MXC-PR-Build) is the official build pipeline that signs the binaries; it
runs on merge to main and nightly, and Microsoft reviewers can trigger it
on a PR with /azp run. See docs/pull-requests.md.

Microsoft Reviewers: Open in CodeFlow

Copilot AI review requested due to automatic review settings June 23, 2026 21:17
@SohamDas2021 SohamDas2021 requested a review from a team as a code owner June 23, 2026 21:17
@SohamDas2021 SohamDas2021 requested a review from MGudgin June 23, 2026 21:18
@SohamDas2021 SohamDas2021 marked this pull request as draft June 23, 2026 21:19

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

Adds cross-list filesystem policy validation in wxc_common during config parsing to catch conflicting path intents early and provide better diagnostics for missing host paths.

Changes:

  • Invoke new cross-list filesystem validation from validate_filesystem_paths.
  • Implement same-path conflict detection, existence warnings, and object-based conflict checks (inode-based on Unix, canonicalization-based on Windows).
  • Add unit tests for same-string conflicts across readwritePaths / readonlyPaths / deniedPaths.

Comment thread src/core/wxc_common/src/config_parser.rs Outdated
Comment thread src/core/wxc_common/src/config_parser.rs
Comment thread src/core/wxc_common/src/config_parser.rs Outdated
@SohamDas2021 SohamDas2021 force-pushed the user/sodas/filesystem-policy-path-validation branch from 1f20aff to 33997be Compare June 23, 2026 21:39
@jsidewhite

Copy link
Copy Markdown
Member

Can you add Daniel Dudugjian to this PR?

@SohamDas2021 SohamDas2021 requested review from a team and daniedud-MSFT June 23, 2026 22:45
@microsoft microsoft deleted a comment from jsidewhite Jun 24, 2026
@SohamDas2021 SohamDas2021 marked this pull request as ready for review June 24, 2026 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants