[test] Fix clipboard UI policy validation - #1338
Merged
Merged
Conversation
Replace reachability-only clipboard checks with real Unicode data transfers so denied reads and writes are classified correctly. Seed scheduled read probes, add a Tier 1 restricted/permissive regression, and resolve executors from standard repository build outputs. Fixes #1246 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: d1965e08-2280-4727-b79e-1624577e775a
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Copilot started reviewing on behalf of
Jeff Whiteside (jsidewhite)
September 29, 2026 23:49
View session
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Clipboard contention and unrelated probe failures can still be misreported as successful policy enforcement.
Review effort: Balanced
Findings: 3
Open (3)
What changed in this PR
Improves clipboard policy validation by testing real Unicode clipboard transfers and adding Tier 1 regression coverage.
Changes:
- Seeds clipboard reads and performs real read/write operations.
- Adds restricted and permissive clipboard regression cases.
- Expands executable discovery across standard build outputs.
| File | Description |
|---|---|
tests/scripts/run_processcontainer_ui_policy_matrix_test.ps1 |
Seeds clipboard matrix reads. |
tests/scripts/run_processcontainer_ui_mitigations_test.ps1 |
Seeds mitigation clipboard reads. |
tests/scripts/lib/WinProcessContainer.Native.ps1 |
Adds clipboard-seeding helper. |
tests/regression_tests/TestCases.psd1 |
Registers issue 1246 regression. |
tests/regression_tests/test_cases/Invoke-Issue1246-Tier1ClipboardRestrictions.ps1 |
Implements Tier 1 policy matrix. |
tests/regression_tests/test_cases/data/Issue1246-ClipboardProbe.cs |
Adds native clipboard transfer probe. |
tests/regression_tests/README.md |
Documents executable discovery. |
tests/regression_tests/inc/Resolve-RegressionExecutable.ps1 |
Searches repository build outputs. |
src/testing/wxc_ui_probe/src/main.rs |
Uses Unicode data for clipboard probes. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Treat clipboard contention and unrelated setup failures as inconclusive instead of successful policy enforcement, and reject inconclusive host readback in the Tier 1 regression. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: d1965e08-2280-4727-b79e-1624577e775a
Copilot started reviewing on behalf of
Jeff Whiteside (jsidewhite)
October 1, 2026 03:24
View session
Branden Bonaby (bbonaby)
previously approved these changes
Oct 1, 2026
Allow host readback to distinguish an absent Unicode clipboard format from access denial or other probe failures after a blocked sandbox write. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: d1965e08-2280-4727-b79e-1624577e775a
Trust the probe's explicit access-denied verdict for restricted writes and reserve host token readback for the permissive control that must prove data transfer. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: d1965e08-2280-4727-b79e-1624577e775a
Copilot started reviewing on behalf of
Jeff Whiteside (jsidewhite)
October 1, 2026 21:03
View session
| ExpectedTierSupport = @("base-container-psec") | ||
| Prerequisites = @("wxc-exec", "BaseContainer-capable host", "Windows PowerShell 5.1", "interactive desktop with host clipboard access") | ||
| HarnessArguments = "Default" | ||
| Destructive = $false |
Branden Bonaby (bbonaby)
approved these changes
Oct 1, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.


wxc-ui-probeto also pass