You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reason will be displayed to describe this comment to others. Learn more.
Agreed. I removed the PSEC version from the public Rust SDK capability description. It now describes the observable behavior: native support for filesystem.enumeratePaths without granting file-content reads.
The reason will be displayed to describe this comment to others. Learn more.
question (non-blocking): Should the error state that the users version of Windows doesn't support enumerate paths rather than calling out PSEC 1.1 directly?
I guess the question is the same for the error message in src/backends/appcontainer/common/src/dispatcher.rs as well.
Just wondering if folks see PSEC 1.1 if they'll know what we mean is all. That said, we can probably get away with just making sure the docs say what we mean. #Resolved
The reason will be displayed to describe this comment to others. Learn more.
Agreed. I changed the probe, dispatcher, fallback, and direct AppContainer messages to lead with “not supported by this version of Windows” and explain that enumeration-only access requires native ProcessContainer support and cannot fall back to AppContainer. PSEC details remain in internal capability diagnostics and backend documentation.
The reason will be displayed to describe this comment to others. Learn more.
note (non-blocking): For this if statement and the one below, it'd probably be preferrable to have the part after the && go in a separate variable above it just so it's all readable/maintainable. #Resolved
The reason will be displayed to describe this comment to others. Learn more.
Agreed. I extracted named requirement/support booleans for enumeration and unrestricted host loopback, while keeping each capability query conditional so an unused capability query cannot reject an unrelated request. I also corrected the nearby PSEC 1.1 comment.
The reason will be displayed to describe this comment to others. Learn more.
note (non-blocking): perhaps this will be removed eventually with the refactor once secenv.rs is moved out of learning mode. The RealCapturePlatformSupport just seems to add duplication. #WontFix
The reason will be displayed to describe this comment to others. Learn more.
Agreed. CapturePlatformSupport is currently retained as the injectable test seam for native-capture eligibility. Consolidating it with SecurityEnvironmentApi fits the planned refactor that moves secenv.rs out of Learning Mode, so I would prefer to keep that broader cleanup out of this feature PR.
The reason will be displayed to describe this comment to others. Learn more.
Bubblewrap and LXC do not need backend-local duplicates. Their one-shot ScriptRunner/SandboxBackend paths run wxc_common::validator::validate_common, which rejects non-empty enumeratePaths for every backend except ProcessContainer before backend execution. The WSLC check here is for the separate state-aware provision path, which does not use the one-shot runner validation path. I expanded the central validator test to explicitly cover Bubblewrap and LXC.
The reason will be displayed to describe this comment to others. Learn more.
Great callout, and maybe we should make it clearer which paths are validated centrally... or fix code so it's super clear.
Copilot says it's not a concern because all paths are covered...
Bubblewrap and LXC do not need duplicate backend-local checks. Their one-shot execution paths
always call wxc_common::validator::validate_common, which already rejects enumeratePaths for every backend except
Windows ProcessContainer. The WSLC check is specifically needed for its state-aware provision path, which uses separate
phase validation.
..but I agree with you the code should speak for itself.
Unlike ReadwritePaths, ReadonlyPaths, and DeniedPaths, this collection defaults to null. That makes the established collection-initializer pattern (EnumeratePaths = { path }) throw and forces callers to special-case the new field; initialize it to an empty list for a consistent public API.
Document enumerate precedence in normalization
src/core/wxc_common/src/config_parser.rs:980
Adding enumeratePaths to this normalization changes the documented ordering, but the function comment still says deny > readonly > readwrite. That omits the new level and contradicts the implementation, which treats enumeration as stricter than read-only access.
The reason will be displayed to describe this comment to others. Learn more.
Copilot review overview
🟡 Changes recommended
PSEC 1.1 enumeration can currently serialize an ingress table on hosts that do not advertise ingress support, and the Node.js builder lacks required schema/backend gating.
Get a fresh assessment by requesting another Copilot review.
The reason will be displayed to describe this comment to others. Learn more.
Copilot review overview
🔵 Needs a closer look
The TypeScript policy builder can emit enumeratePaths for schema versions whose exact contracts reject it, and one parser comment now documents stale precedence.
The reason will be displayed to describe this comment to others. Learn more.
Summary
Attribution was re-verified against ae1e60a54779f0f32d9eeec7edae9d65a4083b54...ed7c3db9b4df8b7f6e886f5318951ee35c78417e.
The merge base exactly equals the PR base, and the local/GitHub diff content is
equivalent after ignoring blob-hash abbreviation and hunk-label differences.
Two High findings survive: PSEC 1.1 enumeration can serialize an unadvertised
ingress table, and the new C# enum member changes an existing public numeric
value. The review event is COMMENT; the High findings should still be fixed
before merge.
Verified clean, with receipts
Unsupported non-ProcessContainer backends received fail-closed rejection
guards; no silent policy broadening was found.
The PR adds independent support-bit coverage showing PSE_SUPPORT_FS_ENUMERATE and PSE_SUPPORT_NETWORK_INGRESS can differ.
Generated wire/schema artifacts were treated as generated output rather than
reviewed for hand-written implementation defects.
The central resolver still has only its definition and production call in
both base and head; the two added Rust tests cover serialization/predicates,
not the resolver matrix.
Findings outside the diff
Low (documentation drift) - Capability design document is now stale. docs/backend-support-probe-api-plan.md:83 — newly_exposed_by_change: the file is byte-identical base versus head, but its
exhaustive capability list omits the new filesystemEnumeratePaths value added
by this PR. Add the new capability to the list.
Low (documentation drift) - C# discovery documentation omits the new public
capability.sdk/dotnet/README.md:115-144 — newly_exposed_by_change: the README is modified by the PR, but the capability
discovery example and prose are unchanged while BackendCapability gains FilesystemEnumeratePaths. Add it to the example and explain the mapped policy
field.
Verified pre-existing - not attributed to this PR
No unrelated pre-existing finding is being charged to this PR. The unchanged
regression harness and design document are cited only where the PR's new
behavior newly depends on or invalidates them.
Withdrawn
src/backends/process_container/common/src/appcontainer_runner.rs:1734-1740
— invalid: the added check is redundant in normal dispatch, but redundancy
alone does not establish a defect and can be intentional defense in depth.
Separate PSEC contract version negotiation from individual capability support, preserve SDK compatibility, and strengthen policy validation and regression coverage.
Co-authored-by: Copilot <[email protected]>
Copilot-Session: 3f79f2c6-12b0-4859-8537-6fa9f5209cd6
Explicitly run the positive ProcessContainer enumeration serialization case as Windows so the cross-platform validation remains deterministic on Linux and macOS runners.
Co-authored-by: Copilot <[email protected]>
Copilot-Session: 3f79f2c6-12b0-4859-8537-6fa9f5209cd6
The reason will be displayed to describe this comment to others. Learn more.
Copilot review overview
🟡 Changes recommended
The Node.js path mishandles explicit ProcessContainer targeting and its new mapping test fails on non-Windows lanes, while the probe can misreport deny support.
Get a fresh assessment by requesting another Copilot review.
Re-verified the review against updated head d2db390e and the new PR base b773325c.
Disposition: all 14 inline findings are addressed. The two original High
findings are fixed: PSEC ingress capability is resolved independently from the
1.1 contract version, and the C# capability enum preserves its released
numeric values.
Verification completed:
29 focused Rust tests passed, including the resolver matrix, enumeration
without ingress, path precedence, backend rejection, and capability-cache
tests.
Node SDK unit tests: 432 passed, 20 skipped, 0 failed.
The capable-host #1162 executor E2E was not run locally. CI's Windows x64/ARM64
build jobs and Rust CodeQL were still running when checked; the other reported
build, SDK, lint, versioning, and integration checks were passing.
Two Low, non-blocking documentation items from the review body remain:
docs/backend-support-probe-api-plan.md:83 still omits filesystemEnumeratePaths from its capability list.
sdk/dotnet/README.md:115-144 still omits BackendCapability.FilesystemEnumeratePaths from the discovery example and
prose.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds support for fs_enumerate for applications that call
FindFirstFile/FindNextFile.Closes #1162
Microsoft Reviewers: Open in CodeFlow