Fail unavailable guarded denial capture before sandbox creation - #1290
Merged
Richie Gomez (richiemsft) merged 1 commit intoSep 28, 2026
Merged
Conversation
Verify guarded WPR prerequisites after ProcessContainer tier selection but before backend construction or DACL mutation. Keep native PSEC capture independent from guarded fallback availability. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e408b60b-e267-416c-806d-0a7e119fe53f
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Copilot started reviewing on behalf of
Richie Gomez (richiemsft)
September 26, 2026 01:14
View session
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The shared dispatch gate correctly covers both execution paths while leaving native capture independent of guarded-WPR prerequisites.
Review effort: Balanced
Findings: None
What changed in this PR
Adds an early guarded-WPR prerequisite check so unsupported captureDenials requests fail before ProcessContainer sandbox creation.
Changes:
- Adds reusable prerequisite verification with actionable errors.
- Gates AppContainer fallback selection while preserving native PSEC/V2 capture.
- Adds dispatch tests and documents the early failure behavior.
| File | Description |
|---|---|
src/core/mxc_engine/src/guarded_capture.rs |
Exposes prerequisite errors through the production factory. |
src/backends/process_container/common/src/guarded_capture.rs |
Adds the factory availability-check interface. |
src/backends/process_container/common/src/dispatcher.rs |
Rejects unavailable guarded capture before backend or DACL setup. |
docs/schema.md |
Documents pre-sandbox rejection. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
Author
| @@ -453,7 +464,14 @@ fn select_backend_with_fallback( | |||
| }); | |||
There was a problem hiding this comment.
I think you need to merge from main - these should be updated.
Richie Gomez (richiemsft)
deleted the
richiemsft/fix-capture-denials-preflight
branch
September 28, 2026 18:18
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.
📖 Description
Fail
captureDenialsrequests before ProcessContainer backend construction when the selected AppContainer tier requires guarded WPR but WPR/plm.exeprerequisites are unavailable.The availability check now runs at the shared tier-selection boundary used by both run-to-completion and streaming execution, before DACL mutation or sandbox creation. Native PSEC/V2 capture remains usable without guarded-WPR prerequisites.
🔗 References
Resolves #1248
🔍 Validation
cargo fmt --all -- --checkcargo test -p process_container_common capture_denials --lib(11 passed)cargo test -p mxc_engine --lib(150 passed)cargo clippy -p process_container_common -p mxc_engine --all-targets -- -D warningsThe full
process_container_commonsuite reached 313/314 tests; the unrelated host-to-container loopback runtime test timed out and reproduced when rerun alone.✅ Checklist
Cargo.lockis unchanged📋 Issue Type
Microsoft Reviewers: Open in CodeFlow