Skip to content

Fix captureDenials probe parity - #1070

Draft
Huzaifa Danish (huzaifa-d) wants to merge 7 commits into
mainfrom
user/modanish/implement-issue-785
Draft

Fix captureDenials probe parity#1070
Huzaifa Danish (huzaifa-d) wants to merge 7 commits into
mainfrom
user/modanish/implement-issue-785

Conversation

@huzaifa-d

@huzaifa-dHuzaifa Danish (huzaifa-d) commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

📖 Description

Align --probe capture-denial selection with runtime behavior and report native capture availability.

🔗 References

Resolves#785

🔍 Validation

cargo test -p appcontainer_common; targeted Clippy and rustfmt.

✅ Checklist

📋 Issue Type

  • Bug fix
  • Feature
  • Task
Microsoft Reviewers: Open in CodeFlow

huzaifa-msftand others added 4 commits August 31, 2026 10:16
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CopilotAI balanced review requested due to automatic review settings August 31, 2026 18:02
@azure-pipelines

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

CopilotAI 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

Review tier: Balanced
Findings: None

What changed in this PR

Aligns wxc-exec --probe tier selection with runtime request-aware behavior and reports native denial-capture capability.

Changes:

  • Passes the complete execution request into probing.
  • Mirrors runtime BaseContainer capability selection.
  • Adds native-capture reporting, tests, and design documentation.
FileDescription
src/​core/​wxc/​src/​main.rsPasses the full request to the probe.
src/​backends/​appcontainer/​common/​src/​probe.rsAdds request-aware probing and capture facts.
src/​backends/​appcontainer/​common/​src/​base_container_runner.rsExposes native-capture availability.
docs/​superpowers/​specs/​2026-08-31-issue-785-probe-capture-denials-design.mdDocuments the design.
docs/​superpowers/​plans/​2026-08-31-issue-785-probe-capture-denials.mdRecords the implementation plan.
Suppressed comments (1)

src/backends/appcontainer/common/src/probe.rs:173

  • A successful tier decision is not sufficient to declare a non-native captureDenials request launchable. The runtime only constructs a guarded-WPR factory unconditionally; starting it later fails when the colocated plm.exe is missing or fails its signature/directory trust checks (mxc_engine/src/guarded_capture.rs:182-216). In that state this probe returns a tier with no error, while the real run still fails—the false-positive parity bug remains. Please include a side-effect-free guarded-capture availability/trust fact from the wxc/mxc_engine layer and reject capture requests that need guarded WPR when that provider is unavailable.
 Ok(decision) => ProbeOutput {
tier: Some(decision.tier.as_str()),
needs_dacl_augmentation: Some(decision.needs_dacl_augmentation),
warnings: decision.warnings,
probes,
error: None,

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

CopilotAI review requested due to automatic review settings September 1, 2026 17:21

CopilotAI 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

Review tier: Balanced
Findings: None

CopilotAI review requested due to automatic review settings September 1, 2026 17:23

CopilotAI 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

Review tier: Balanced
Findings: 1 High severity

New issues introduced by this change (1)
SeverityFinding
High severitysrc/​backends/​appcontainer/​common/​src/​probe.rs — The probe still reports a captureDenials request as launchable whenever tier detection succeeds,…

Comment threadsrc/backends/appcontainer/common/src/probe.rs
Co-authored-by: huzaifa-d <16077119+huzaifa-d@users.noreply.github.com>
CopilotAI review requested due to automatic review settings September 2, 2026 18:12

CopilotAI 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

🔵 Needs a closer look

Legacy SBOX capture can still produce a successful probe despite an unavailable required guarded fallback.

Review tier: Balanced
Findings: None

Issues resolved since last review (1)
SeverityFinding
High severitysrc/​backends/​appcontainer/​common/​src/​probe.rs — The probe still reports a captureDenials request as launchable whenever tier detection succeeds,… View resolved comment
Suppressed comments (1)

src/backends/appcontainer/common/src/probe.rs:185

  • This does not mirror the dispatcher's guarded-capture gate. prefer_base_container can be true when native PSEC/V2 capture is unavailable but legacy SBOX is usable; the dispatcher then sets guarded_capture_required because uses_native_capture_for_request is false. If plm.exe is unavailable, this probe still returns the BaseContainer tier with no error, while the real run fails when the guarded factory starts. Please base this check on the same native-capture eligibility used by select_backend_with_fallback (and cover the legacy-SBOX/policy-incompatible-PSEC case), rather than on BaseContainer preference.
 if request.policy.capture_denials.is_some()
&& !prefer_base_container
&& !probes.guarded_capture_available =>

Sign up for freeto 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.

wxc-exec --probe ignores captureDenials, reporting a launchable tier for runs that fail

4 participants

@huzaifa-d@huzaifa-msft