Skip to content

[test] Fix clipboard UI policy validation - #1338

Merged
Jeff Whiteside (jsidewhite) merged 4 commits into
mainfrom
jsidewhite/mxc_CLIPBOARD
Oct 1, 2026
Merged

Jeff Whiteside (jsidewhite) merged 4 commits into
mainfrom
jsidewhite/mxc_CLIPBOARD

Conversation

@jsidewhite

@jsidewhite Jeff Whiteside (jsidewhite) commented Sep 29, 2026 •

Copy link
Copy Markdown
Member
  1. Add a regression test for CLIPBOARD blocking policy (passes)
  2. Update wxc-ui-probe to also pass

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
Copilot AI balanced review requested due to automatic review settings September 29, 2026 23:49
@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.

Copilot review overview

🟡 Changes recommended

Clipboard contention and unrelated probe failures can still be misreported as successful policy enforcement.

Review effort: Balanced
Findings: 3 Medium severity

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.

Comment thread src/testing/wxc_ui_probe/src/main.rs
Comment thread src/testing/wxc_ui_probe/src/main.rs
Comment thread tests/regression_tests/test_cases/data/Issue1246-ClipboardProbe.cs Outdated
Copilot AI balanced review requested due to automatic review settings October 1, 2026 03:24
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 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.

Copilot review overview

🟡 Changes recommended

The regression can treat an unreadable host clipboard as a conclusive token mismatch.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
Resolved since last review (3)

Comment thread tests/regression_tests/test_cases/data/Issue1246-ClipboardProbe.cs Outdated
@jsidewhite Jeff Whiteside (jsidewhite) changed the title Fix clipboard UI policy validation [test] Fix clipboard UI policy validation Oct 1, 2026
Copilot AI balanced review requested due to automatic review settings October 1, 2026 20:57
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 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.

Copilot review overview

🟡 Changes recommended

The regression is marked non-destructive despite permanently replacing the user's clipboard contents.

Review effort: Balanced
Findings: 1 High severity

Open (1)
Resolved since last review (1)

ExpectedTierSupport = @("base-container-psec")
Prerequisites = @("wxc-exec", "BaseContainer-capable host", "Windows PowerShell 5.1", "interactive desktop with host clipboard access")
HarnessArguments = "Default"
Destructive = $false
@jsidewhite
Jeff Whiteside (jsidewhite) merged commit 0615ad8 into main Oct 1, 2026
30 checks passed
@jsidewhite
Jeff Whiteside (jsidewhite) deleted the jsidewhite/mxc_CLIPBOARD branch October 1, 2026 22:57
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