Skip to content

Add Process Security Environment ingress contract - #1076

Merged
Branden Bonaby (bbonaby) merged 1 commit into
mainfrom
user/bbonaby/update-mxc-based-on-os-network-changes
Sep 4, 2026
Merged

Add Process Security Environment ingress contract#1076
Branden Bonaby (bbonaby) merged 1 commit into
mainfrom
user/bbonaby/update-mxc-based-on-os-network-changes

Conversation

@bbonaby

@bbonaby Branden Bonaby (bbonaby) commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

📖 Description

Extends the vendored Process Security Environment (PSEC) FlatBuffer contract with an optional IngressPolicy containing default_action and host_loopback, both defaulting to deny, and adds it to NetworkPolicy. 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.ps1 to regenerate the flatbuffer objects associated with external/windows-sdk/ProcessSecurityEnvironment.fbs

🔗 References

🔍 Validation

  • cargo check --manifest-path src\Cargo.toml -p process_security_environment_spec

✅ Checklist

📋 Issue Type

  • Bug fix
  • Feature
  • Task

Copilot AI balanced review requested due to automatic review settings September 1, 2026 17:36
@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

Review tier: Balanced
Findings: 1 Medium severity · 1 Low severity

New issues introduced by this change (2)
Severity Finding
Medium severity src/​backends/​appcontainer/​common/​src/​base_container_runner.rs — This can report the wrong host capability. For a captureDenials request, select_psec returns…
Low severity 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.

Comment thread src/backends/appcontainer/common/src/base_container_runner.rs Outdated
Comment thread src/backends/appcontainer/common/src/base_container_helpers.rs Outdated
Copilot AI review requested due to automatic review settings September 1, 2026 17:46
@microsoft-github-policy-service microsoft-github-policy-service Bot added the Copilot-Instructions PR modifies Copilot instruction files (.github/copilot-instructions.md or .github/instructions/) label Sep 1, 2026

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

Review tier: Balanced
Findings: None

Issues resolved since last review (2)
Severity Finding
Low severity 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
Medium severity 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

Copilot AI review requested due to automatic review settings September 1, 2026 18:06

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

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 by ingress.default: "allow" (docs/process-container/networking.md:28-45, 285-288 and docs/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));

@bbonaby Branden Bonaby (bbonaby) changed the title Add PSEC 1.1 ingress support Add Process Security flatbuffer 1.1 ingress support to base container runner Sep 1, 2026
Copilot AI review requested due to automatic review settings September 1, 2026 18:21

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

Review tier: Balanced
Findings: None

@bbonaby Branden Bonaby (bbonaby) changed the title Add Process Security flatbuffer 1.1 ingress support to base container runner Add Process Security flatbuffer v1.1 ingress support to base container runner Sep 1, 2026
@bbonaby
Branden Bonaby (bbonaby) force-pushed the user/bbonaby/update-mxc-based-on-os-network-changes branch from cbc123f to 433cda9 Compare September 1, 2026 18:34
Copilot AI review requested due to automatic review settings September 1, 2026 18:34

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

Review tier: Balanced
Findings: None

@bbonaby
Branden Bonaby (bbonaby) force-pushed the user/bbonaby/update-mxc-based-on-os-network-changes branch from 433cda9 to 51f928e Compare September 1, 2026 18:51
Copilot AI review requested due to automatic review settings September 1, 2026 18:51
@bbonaby Branden Bonaby (bbonaby) changed the title Add Process Security flatbuffer v1.1 ingress support to base container runner Add Process Security Environment ingress contract Sep 1, 2026

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

Review tier: Balanced
Findings: 1 Medium severity

New issues introduced by this change (1)
Severity Finding
Medium severity external/​windows-sdk/​ProcessSecurityEnvironment.fbs — The new wire field is not connected to the BaseContainer runtime. base_container_helpers.rs:56

Comment thread external/windows-sdk/ProcessSecurityEnvironment.fbs
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
@bbonaby
Branden Bonaby (bbonaby) force-pushed the user/bbonaby/update-mxc-based-on-os-network-changes branch from 51f928e to 7643a3d Compare September 2, 2026 16:04
@bbonaby
Branden Bonaby (bbonaby) marked this pull request as ready for review September 2, 2026 16:22
Copilot AI review requested due to automatic review settings September 2, 2026 16:22
@bbonaby
Branden Bonaby (bbonaby) requested a review from a team as a code owner September 2, 2026 16:22
@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

🟢 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
Medium severity external/​windows-sdk/​ProcessSecurityEnvironment.fbs — The new wire field is not connected to the BaseContainer runtime. base_container_helpers.rs:56View resolved comment

@jsidewhite

Copy link
Copy Markdown
Member

remove next time we update.


Refers to: external/windows-sdk/ProcessSecurityEnvironment.fbs:33 in 7643a3d. [](commit_id = 7643a3d, deletion_comment = False)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@bbonaby
Branden Bonaby (bbonaby) merged commit 3a22a2b into main Sep 4, 2026
27 checks passed
@bbonaby
Branden Bonaby (bbonaby) deleted the user/bbonaby/update-mxc-based-on-os-network-changes branch September 4, 2026 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Copilot-Instructions PR modifies Copilot instruction files (.github/copilot-instructions.md or .github/instructions/)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants