-
Notifications
You must be signed in to change notification settings - Fork 60
Update Learning Mode to V2 API contracts #739
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 7 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
347c352
Update Learning Mode API contracts
richiemsft 0c329dd
Harden V2 capture policy integration
richiemsft bd2ec2c
Clarify V2 security environment docs
richiemsft 1a8613f
Refresh lm_analyze documentation
richiemsft b21163a
Address PR 739 review feedback
richiemsft dfca3cc
Retry transient trace delivery failures
richiemsft 5f4237b
Address comprehensive V2 review feedback
richiemsft c9934c8
Avoid dynamic regex in PSEC provenance parser
richiemsft b0a05b8
Merge remote-tracking branch 'origin/main' into user/saulg/learning-mβ¦
richiemsft 580c19e
Route BaseContainer APIs by schema version
richiemsft 873ddb1
Document schema-based BaseContainer routing
richiemsft 5222015
Bypass legacy fallback for schema 0.8
richiemsft 880c0ea
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
richiemsft 7436f52
Skip host API probes during dry-run
richiemsft b9368ff
Fix dry-run validation test lint
richiemsft 6961b4a
Restore proxy compatibility fallback
richiemsft File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
|
richiemsft marked this conversation as resolved.
Outdated
|
||
|
|
||
| namespace ProcessSecurityEnvironmentLayout; | ||
|
|
||
| struct SchemaVersion { | ||
| major:uint16; | ||
| minor:uint16; | ||
| } | ||
|
|
||
| table ProcessSecurityEnvironment { | ||
| version:SchemaVersion (required); | ||
| capabilities:string; | ||
| disallow_win32k_system_calls:bool = false; | ||
| ui_restrictions:uint64 = 0; | ||
| fs_read_write:[string]; | ||
| fs_read_only:[string]; | ||
| fs_deny:[string]; | ||
| network_policy:NetworkPolicy; | ||
| } | ||
|
|
||
| table ProxyInfo { | ||
| url:string; | ||
| } | ||
|
|
||
| enum FilterAction : byte { deny, allow } | ||
| enum IpProtocol : byte { any, tcp, udp, icmpv4, icmpv6 } | ||
|
|
||
| table IpSubnet { | ||
| address:string; | ||
| prefix_length:ubyte = 0; | ||
| } | ||
|
|
||
| table DestinationRule { | ||
| subnet:IpSubnet; | ||
| except:[IpSubnet]; | ||
| } | ||
|
|
||
| table PortRule { | ||
| protocol:IpProtocol = any; | ||
| port:uint16 = 0; | ||
| end_port:uint16 = 0; | ||
| } | ||
|
|
||
| table EndpointRule { | ||
| destinations:[DestinationRule]; | ||
| ports:[PortRule]; | ||
| } | ||
|
|
||
| table EndpointPolicy { | ||
| default_action:FilterAction = deny; | ||
| allow:[EndpointRule]; | ||
| deny:[EndpointRule]; | ||
| } | ||
|
|
||
| table NetworkPolicy { | ||
| proxy:ProxyInfo; | ||
| egress:EndpointPolicy; | ||
| allowed_appcontainer_peer:string; | ||
| } | ||
|
|
||
| root_type ProcessSecurityEnvironment; | ||
| file_identifier "PSEC"; | ||
52 changes: 52 additions & 0 deletions
52
external/windows-sdk/ProcessSecurityEnvironment.provenance.toml
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| # Provenance for the vendored ProcessSecurityEnvironment FlatBuffers schema. | ||
| # | ||
| # This file is the single source of truth for the pinned regeneration toolchain | ||
| # and the authoritative hash of the vendored `ProcessSecurityEnvironment.fbs`. | ||
| # It is consumed by: | ||
| # * src/core/generated/process_security_environment_specification/regenerate.ps1 | ||
| # (validates the schema hash + pins the exact flatc version before generating) | ||
| # * scripts/versioning/check-psec-codegen.js | ||
| # (CI drift gate β verifies the committed schema + generated crate) | ||
| # | ||
| # Update this file whenever the vendored schema is refreshed from the OS source, | ||
| # then regenerate the bindings (see the crate README). | ||
|
|
||
| [source] | ||
| # The schema originates from the internal Microsoft Windows OS repository and is | ||
| # not publicly redistributable. Only the schema text (not the OS tree) is vendored. | ||
| repository = "Windows OS (internal Azure DevOps)" | ||
| # The PSEC schema is a Windows OS containment contract; there is no public OS | ||
| # revision to cite. Instead of guessing a source path/revision, we record the | ||
| # Windows build the vendored schema contract was validated against. | ||
| validated_windows_build = "10.0.26663.1000" | ||
| # Azure DevOps PR 16307987 is the RELATED Learning Mode trace ABI change β it is | ||
| # NOT the pull request that introduced or last modified this PSEC schema. | ||
| # Recorded for traceability only; do not represent it as the schema's origin. | ||
| related_trace_abi_pull_request = 16307987 | ||
|
|
||
| [schema] | ||
| # SHA-256 of external/windows-sdk/ProcessSecurityEnvironment.fbs, computed over | ||
| # the LF-normalized (git-blob) content so it is checkout-independent regardless | ||
| # of autocrlf. Verified by regenerate.ps1 and the CI drift gate. | ||
| sha256 = "2bb6b5bb5eccf589ffa1d19ad1f011dcc72b3e7eacefa1f0741e123cb259bf29" | ||
|
|
||
| [tool] | ||
| # Exact flatc version used to generate the committed bindings. Regeneration | ||
| # pins this exact version (not a floor) so output is byte-reproducible. | ||
| # 25.12.19 is the first release carrying flatbuffers PR #8709, which stops flatc | ||
| # emitting elided lifetimes that trip the `mismatched_lifetime_syntaxes` lint | ||
| # (added in Rust 1.89). | ||
| flatc_version = "25.12.19" | ||
| flatc_release = "https://github.com/google/flatbuffers/releases/tag/v25.12.19" | ||
| generated_date = "2026-08-03" | ||
|
|
||
| # Exact GitHub release assets for flatc 25.12.19. The CI drift gate downloads the | ||
| # platform asset, verifies its SHA-256 against these values, unzips it, and | ||
| # regenerates into a temp directory to diff against the committed bindings. | ||
| [tool.flatc_assets.linux] | ||
| name = "Linux.flatc.binary.clang++-18.zip" | ||
| sha256 = "50c1915deeeb714f2a05c8ec795bd1af898d251a62e2774067703b29188efc90" | ||
|
|
||
| [tool.flatc_assets.windows] | ||
| name = "Windows.flatc.binary.zip" | ||
| sha256 = "fff9445c9db907227bc64b54cc98743084c4949282aa4e576cff6a955724ddc8" |
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.