# `mxc_sdk::process_security_environment_spec`
> **Audience:** MXC developers
Rust bindings **generated** from `external/windows-sdk/ProcessSecurityEnvironment.fbs`
by the FlatBuffers compiler (`flatc`).
> **Do not hand-edit `mod.rs` or `process_security_environment_layout/`.** They are generated; every file
> carries a `// Automatically generated by the Flatbuffers compiler. Do not
> modify.` header. Change the `.fbs` schema (with provenance) and rerun the
> regeneration script instead. The CI drift gate
> (`scripts/versioning/check-psec-codegen.js`) fails if the committed schema or
> generated module drifts.
## Provenance
The vendored schema originates from the Microsoft Windows OS repository.
Authoritative provenance — the validated Windows build, schema SHA-256, and
exact `flatc` version used — is recorded in
[`external/windows-sdk/ProcessSecurityEnvironment.provenance.toml`](../../../../../external/windows-sdk/ProcessSecurityEnvironment.provenance.toml).
That file is the single source of truth consumed by both the regeneration
script and the CI drift gate.
## Regenerating
Install the **exact** `flatc` version pinned in the provenance file
(currently `25.12.19`), then run from the repository root:
```powershell
pwsh -File scripts/versioning/regenerate-psec.ps1
```
Pass `-Flatc <path>` when `flatc.exe` is not on `PATH`. The script validates the
schema SHA-256 against the provenance file and refuses any `flatc` version other
than the pinned one, so output is byte-reproducible. Older `flatc` releases emit
elided lifetimes that trip the `mismatched_lifetime_syntaxes` lint (Rust 1.89+);
`25.12.19` is the first release with the upstream fix (flatbuffers PR #8709).
## SDK integration
The schema describes a **Windows-only** OS contract. Its generated Rust module
is compiled as part of `mxc-sdk` and consumed by the ProcessContainer and
Learning Mode modules. The bindings are pure Rust, so cross-platform SDK builds
remain valid.