Skip to content

Docs: PSEC startup attribute coexistence, identity defaults, and launch prerequisites #1451

Open

Description

@wfsky2015-debug

Brief description of your issue

Could the documentation clarify the public Windows PSEC interface used by MXC at commit 6cd3d58?

Documentation questions

  1. Startup attribute coexistence: Can PROC_THREAD_ATTRIBUTE_SECURITY_ENVIRONMENT and PROC_THREAD_ATTRIBUTE_SECURITY_CAPABILITIES be supplied together in one CreateProcessW attribute list? If supported, which Windows versions support this combination and where is its contract documented?

  2. Identity and capability defaults: How does PSEC determine the resulting AppContainer SID/profile and TokenCapabilities, including when the schema's capabilities field is unset? Which supported APIs expose these identity/default-selection semantics?

  3. Launch prerequisites: Where are the required executable/loader filesystem access and minimal explicit environment documented for a PSEC-attached CreateProcessW launch?

Public source references

This is a documentation/supportability question about public interfaces, not a report of a demonstrated defect. Links to the supported contract would be appreciated.

Activity

  1. added
    Issue-Docs
    Needs-Triage
    on Oct 8, 2026
  2. added
    Backend-ProcessContainer
    and removed
    Needs-Triage
    on Oct 14, 2026
  3. GlediraSocial commented on Oct 18, 2026

    @GlediraSocial

    Thank you for documenting the PSEC interface. I have a related clarification for the direct schema 1.0 route at commit 6cd3d58.

    The same-version Node README says that an omitted read/write list does not permit TEMP writes and that cwd alone does not add a filesystem grant. The PSEC builder copies the authored read-only/read-write/deny vectors. For direct CreateProcessSecurityEnvironment with capabilities and fs_read_write absent:

    1. What identity/capability and system/ALL APPLICATION PACKAGES read baseline remains effective beyond the explicit vectors, and does explicit fs_deny override that baseline?
    2. Can the environment or attached process receive independently created or redirected writable storage despite an absent read/write vector? If so, where is its ownership, host-content import and teardown contract documented?
    3. Is there a supported API or procedure to establish that effective baseline and the minimum loader/cwd requirements for a CreateProcessW launch using the PSEC startup attribute?

    This is a documentation/supportability question, not a vulnerability report. No private host details or credentials are included. Links to a versioned interface contract would help distinguish authored policy from native defaults.

    References:

    • mxc/sdk/node/README.md

      Lines 420 to 426 in 6cd3d58

      ### Default-deny applies to everything
      No `network` field → no network. No `readwritePaths` → process can't write `%TEMP%`. No `ui` → no GUI. Use the discovery helpers to compose a sensible baseline.
      ### `process.cwd` doesn't grant filesystem access
      Setting `cwd` (or the `workingDirectory` argument) does **not** add that path to the policy. Add it to `readonlyPaths` / `readwritePaths` explicitly.
    • pub(super) fn has_conflicting_proxy_identity(policy: &ContainerPolicy) -> bool {
      policy.allowed_proxy_peer.is_some() && unrestricted_host_loopback_allowed(policy)
      }
      pub(super) fn build_psec_spec(request: &ExecutionRequest) -> Vec<u8> {
      let mut builder = flatbuffers::FlatBufferBuilder::with_capacity(1024);
      let capabilities = effective_capabilities(&request.policy, true);
      let ui_restrictions = crate::job_object::to_job_object_uilimit_mask(
      &wxc_common::ui_policy::resolve_ui_restrictions(
      &request.policy.ui,
      &request.policy.base_process_ui,
      ),
      ) as u64;
      let mut spec = PsecProcessSecurityEnvironment::default();
      spec.version = SchemaVersionT { major: 1, minor: 0 };
      spec.capabilities = (!capabilities.is_empty()).then(|| capabilities.join(","));
      spec.disallow_win32k_system_calls = request.policy.ui.disable;
      spec.ui_restrictions = ui_restrictions;
      spec.fs_read_write = non_empty_paths(&request.policy.readwrite_paths);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Backend-ProcessContainerIssue-Docs

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions