Add Process Security Environment ingress contract - #1076
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
There was a problem hiding this comment.
Copilot review overview
Review tier: Balanced
Findings: 1
New issues introduced by this change (2)
| Severity | Finding |
|---|---|
src/backends/appcontainer/common/src/base_container_runner.rs — This can report the wrong host capability. For a captureDenials request, select_psec returns… |
|
src/backends/appcontainer/common/src/base_container_helpers.rs — The documented ProcessContainer contract is now stale: `docs/process-container/networking.md:109-111… |
What changed in this PR
Adds negotiated PSEC 1.1 ingress support while retaining PSEC 1.0 fallback behavior.
Changes:
- Extends the PSEC FlatBuffer contract with ingress policy fields.
- Adds capability negotiation and version-aware policy construction.
- Integrates ingress support into BaseContainer and Learning Mode selection.
| File | Description |
|---|---|
network_policy_generated.rs |
Adds generated ingress accessors and serialization. |
ingress_policy_generated.rs |
Defines generated ingress bindings. |
generated/.../lib.rs |
Exports ingress bindings. |
learning_mode/windows/src/secenv.rs |
Exposes negotiated PSEC capabilities. |
learning_mode/windows/src/lib.rs |
Re-exports the support type. |
base_container_runner.rs |
Adds version-aware PSEC selection and validation. |
base_container_helpers.rs |
Builds PSEC 1.0/1.1 policies. |
ProcessSecurityEnvironment.provenance.toml |
Updates the schema hash. |
ProcessSecurityEnvironment.fbs |
Adds the ingress contract. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
Copilot review overview
Review tier: Balanced
Findings: None
Issues resolved since last review (2)
| Severity | Finding |
|---|---|
src/backends/appcontainer/common/src/base_container_helpers.rs — The documented ProcessContainer contract is now stale: `docs/process-container/networking.md:109-111… View resolved comment |
|
src/backends/appcontainer/common/src/base_container_runner.rs — This can report the wrong host capability. For a captureDenials request, select_psec returns… View resolved comment |
There was a problem hiding this comment.
Copilot review overview
Review tier: Balanced
Findings: None
Suppressed comments (1)
src/backends/appcontainer/common/src/base_container_helpers.rs:246
- This PSEC 1.1 path removes
privateNetworkClientServer, but the public GA docs still say that capability is required before private-network traffic can flow and is always selected byingress.default: "allow"(docs/process-container/networking.md:28-45, 285-288anddocs/sandbox-policy/0.8.0/networking/networking.md:379-382, 426-435). If the 1.1 ingress table replaces that capability gate, update those mappings and matrices to distinguish native 1.1 enforcement from the PSEC 1.0/SBOX capability fallback; otherwise users are given an incorrect account of the effective network policy.
if support.host_supports_network_ingress() && policy.network_ingress.is_some() {
capabilities
.retain(|capability| !capability.eq_ignore_ascii_case(PRIVATE_NETWORK_CAPABILITY));
cbc123f to
433cda9
Compare
433cda9 to
51f928e
Compare
There was a problem hiding this comment.
Copilot review overview
Review tier: Balanced
Findings: 1
New issues introduced by this change (1)
| Severity | Finding |
|---|---|
external/windows-sdk/ProcessSecurityEnvironment.fbs — The new wire field is not connected to the BaseContainer runtime. base_container_helpers.rs:56… |
Add directional ingress policy to the PSEC FlatBuffer contract and regenerate the Rust bindings. This enables runtime support to negotiate and serialize the OS ingress policy in the next PR. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e995fbb0-4ea4-4aa3-a8bb-efa0d3bf01a4
51f928e to
7643a3d
Compare
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The additive schema change, generated bindings, module exports, and verified provenance hash are consistent.
Review tier: Balanced
Findings: None
Issues resolved since last review (1)
| Severity | Finding |
|---|---|
external/windows-sdk/ProcessSecurityEnvironment.fbs — The new wire field is not connected to the BaseContainer runtime. base_container_helpers.rs:56… View resolved comment |


📖 Description
Extends the vendored Process Security Environment (PSEC) FlatBuffer contract with an optional
IngressPolicycontainingdefault_actionandhost_loopback, both defaulting todeny, and adds it toNetworkPolicy. This establishes the PSEC 1.1 wire shape needed for directional ingress while preserving compatibility when the new table is absent.Used
process_security_environment_specification/regenerate.ps1to regenerate the flatbuffer objects associated withexternal/windows-sdk/ProcessSecurityEnvironment.fbs🔗 References
🔍 Validation
cargo check --manifest-path src\Cargo.toml -p process_security_environment_spec✅ Checklist
Cargo.lock, thedependency-feed-checkcheck passes (see docs/pull-requests.md)📋 Issue Type