Skip to content

[WSLC] Alias cannonicalization follow-up in denied-path overlap validator - #680

Open
SohamDas2021 wants to merge 1 commit into
mainfrom
user/sodas/wslc-alias-canon-followups
Open

[WSLC] Alias cannonicalization follow-up in denied-path overlap validator#680
SohamDas2021 wants to merge 1 commit into
mainfrom
user/sodas/wslc-alias-canon-followups

Conversation

@SohamDas2021

@SohamDas2021 SohamDas2021 commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

📖 Description

Follow-up to #657 , addressing the following:

  1. Tier-2 canonical-equality miss ( policy_mapping.rs ): the overlap validator now rejects a deny that canonicalizes exactly onto a mount root via an on-disk alias (which  contains_strictly  missed and D6 saw as absent), but only when the original strings differ lexically — so a literal exact match stays enforceable-by-not-mounting.
  2. Dangling reparse point misclassified as  Absent  ( filesystem_canonical.rs ): a dangling junction/symlink returned FILE/PATH_NOT_FOUND and was labelled  Absent ; it now re-probes with  FILE_FLAG_OPEN_REPARSE_POINT  and returns  Unknown  (fail closed) when the link object itself exists.
  3. Hard-link doc correction ( policy_mapping.rs ): fixed the comment to state hard links are names for one object and D6 groups hard-linked policy entries by file ID — the only residual gap is an unlisted hard link inside a mounted subtree.

🔗 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 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

Copilot AI review requested due to automatic review settings July 24, 2026 23:38
@SohamDas2021
SohamDas2021 requested a review from a team as a code owner July 24, 2026 23:38
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

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

Strengthens WSLC denied-path alias validation and dangling reparse-point handling.

Changes:

  • Detects canonical equality between denied paths and mount roots.
  • Re-probes dangling reparse points.
  • Corrects hard-link documentation and adds regression tests.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/core/wxc_common/src/filesystem_canonical.rs Handles dangling reparse points during canonicalization.
src/backends/wslc/common/src/policy_mapping.rs Extends overlap validation and updates alias documentation.

// object with no exclusion primitive — `contains_strictly`
// (strictly-deeper only) misses that, so reject it here.
let mount_lexical = NormalizedPath::parse(mounted);
if mount_norm == denied_norm && mount_lexical != denied_lexical {
Comment on lines +119 to +120
// Nothing here at all (or a genuinely missing parent): absent.
_ => PathCanonical::Absent,
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.

2 participants