Policy-driven, layered isolation and containment
This report presents the forensic synthetic code analysis of microsoft/mxc, a Rust project with 1,129 GitHub stars. SynthScan v2.0 examined 113,191 lines of code across 606 source files, recording 460 pattern matches distributed across 8 syntactic categories. The overall adjusted score of 4.6 places this repository in the Likely human-written band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 460 distinct pattern matches across 8 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | .azure-pipelines/1ES.Build.Official.yml | 1 | # Copyright (c) Microsoft Corporation. All rights reserved. | COMMENT |
| LOW | .azure-pipelines/templates/Rust.Toolchain.Public.yml | 1 | # Copyright (c) Microsoft Corporation. All rights reserved. | COMMENT |
| LOW | .azure-pipelines/templates/Rust.Toolchain.Public.yml | 21 | # That URL is byte-stable for a given (version, triple) so the SHA-256 | COMMENT |
| LOW | .azure-pipelines/templates/Fuzz.Build.Job.yml | 1 | # Copyright (c) Microsoft Corporation. All rights reserved. | COMMENT |
| LOW | tests/scripts/run_bwrap_most_specific_test.sh | 1 | #!/bin/bash | COMMENT |
| LOW | tests/scripts/run_lxc_timeout_test.sh | 1 | #!/bin/bash | COMMENT |
| LOW | tests/scripts/run_lxc_env_cwd_test.sh | 1 | #!/bin/bash | COMMENT |
| LOW | tests/scripts/run_bwrap_filesystem_object_test.sh | 1 | #!/bin/bash | COMMENT |
| LOW | sdk/tests/unit/wire-conformance.test.ts | 1 | // Copyright (c) Microsoft Corporation. | COMMENT |
| LOW | sdk/tests/unit/wire-conformance.test.ts | 21 | // cleanly and catches enum/type NARROWING in the wire model. | COMMENT |
| LOW | sdk/tests/unit/wire-conformance.test.ts | 141 | // Every public field must either exist on the wire type or be on the EXPLICIT | COMMENT |
| LOW | sdk/tests/unit/wire-conformance.test.ts | 161 | type _FilesystemKeys = AssertTrue<Equivalent<OnlyInPublic<FilesystemConfig, WireFilesystem>, 'clearPolicyOnExit'>>; | COMMENT |
| LOW | sdk/tests/unit/wire-conformance-state-aware.test.ts | 1 | // Copyright (c) Microsoft Corporation. | COMMENT |
| LOW | sdk/tests/unit/wire-conformance-state-aware.test.ts | 21 | // ------------------------------------ -------------------------------------- | COMMENT |
| LOW | sdk/tests/integration/test-helpers.ts | 141 | export const debugSpawnOptions = { | COMMENT |
| LOW | sdk/tests/integration/test-helpers.ts | 241 | COMMENT | |
| LOW | sdk/tests/integration/wslc-e2e.test.ts | 1 | // Copyright (c) Microsoft Corporation. | COMMENT |
| LOW | …ests/integration/isolation-session-state-aware.test.ts | 1 | // Copyright (c) Microsoft Corporation. | COMMENT |
| LOW | sdk/tests/integration/microvm-filesystem.test.ts | 1 | // Copyright (c) Microsoft Corporation. | COMMENT |
| LOW | sdk/tests/integration/linux-process-container.test.ts | 21 | // MXC_SKIP_LXC_TESTS=1 skips the entire LXC describe block. Provided as | COMMENT |
| LOW | scripts/check-csharp-bindings-codegen.js | 1 | #!/usr/bin/env node | COMMENT |
| LOW | scripts/versioning/check-schema-codegen.js | 1 | #!/usr/bin/env node | COMMENT |
| LOW | scripts/versioning/check-sdk-types-codegen.js | 1 | #!/usr/bin/env node | COMMENT |
| LOW | scripts/versioning/check-rust-toolchain-sync.js | 1 | #!/usr/bin/env node | COMMENT |
| LOW | scripts/versioning/check-schema-versions.js | 1 | #!/usr/bin/env node | COMMENT |
| LOW | scripts/versioning/validate-configs.js | 1 | // Copyright (c) Microsoft Corporation. | COMMENT |
| LOW | .github/workflows/issue-triage.lock.yml | 1 | # gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"8915a4b385c4f7e28a8098eb47c0de7c278dadecfb3b074a7afcbbfc433 | COMMENT |
| LOW | .github/workflows/issue-triage.lock.yml | 21 | # gh aw compile | COMMENT |
| LOW | .github/workflows/SDK.Integration.Test.Job.yml | 61 | - name: Install bubblewrap + LXC stack (Linux only, cached) | COMMENT |
| LOW | csharp/Microsoft.Mxc.Sdk/ErrorCode.cs | 1 | // Copyright (c) Microsoft Corporation. | COMMENT |
| LOW | src/rust-toolchain.toml | 1 | # Pin the Rust toolchain used for local development to match CI. | COMMENT |
| LOW | src/tools/mxc_schema_gen/src/main.rs | 1 | // Copyright (c) Microsoft Corporation. | COMMENT |
| LOW | src/tools/mxc_diagnostic_console/src/etw.rs | 1 | // Copyright (c) Microsoft Corporation. | COMMENT |
| LOW | src/tools/mxc_diagnostic_console/src/main.rs | 1 | // Copyright (c) Microsoft Corporation. | COMMENT |
| LOW | src/core/mxc_engine/src/policy.rs | 1 | // Copyright (c) Microsoft Corporation. | COMMENT |
| LOW | src/core/mxc_engine/src/policy.rs | 21 | use wxc_common::mxc_error::MxcError; | COMMENT |
| LOW | src/core/mxc_engine/src/policy.rs | 521 | /// Execution timeout in milliseconds (`None` = no timeout). | COMMENT |
| LOW | src/core/mxc_engine/src/policy.rs | 601 | self | COMMENT |
| LOW | src/core/mxc_engine/src/dispatch.rs | 1 | // Copyright (c) Microsoft Corporation. | COMMENT |
| LOW | src/core/mxc_engine/src/dispatch.rs | 141 | #[cfg(target_os = "windows")] | COMMENT |
| LOW | src/core/mxc_engine/src/lib.rs | 1 | // Copyright (c) Microsoft Corporation. | COMMENT |
| LOW | src/core/mxc_engine/src/run.rs | 1 | // Copyright (c) Microsoft Corporation. | COMMENT |
| LOW | src/core/mxc_engine/src/run.rs | 21 | //! without such machinery (`lxc-exec`, `mxc-exec-mac`, and the FFI layer) use | COMMENT |
| LOW | src/core/mxc_engine/src/run.rs | 41 | /// ProcessContainer DACL-fallback tier: its `Drop` restores the host ACEs the | COMMENT |
| LOW | src/core/mxc_engine/src/run.rs | 61 | dacl_manager: None, | COMMENT |
| LOW | src/core/mxc_engine/src/state_aware.rs | 1 | // Copyright (c) Microsoft Corporation. | COMMENT |
| LOW | src/core/mxc_engine/src/platform.rs | 1 | // Copyright (c) Microsoft Corporation. | COMMENT |
| LOW | src/core/mxc-sdk/tests/streaming.rs | 1 | // Copyright (c) Microsoft Corporation. | COMMENT |
| LOW | src/core/mxc-sdk/tests/sandbox.rs | 1 | // Copyright (c) Microsoft Corporation. | COMMENT |
| LOW | src/core/mxc-sdk/tests/sandbox.rs | 241 | // Windows ProcessContainer (AppContainer + BaseContainer) — integration tests. | COMMENT |
| LOW | src/core/mxc-sdk/src/lib.rs | 1 | // Copyright (c) Microsoft Corporation. | COMMENT |
| LOW | src/core/mxc-sdk/src/lib.rs | 21 | //! let policy = SandboxPolicy { | COMMENT |
| LOW | src/core/mxc-sdk/src/lib.rs | 41 | //! The selected backend is driven by the `containment` field in the request | COMMENT |
| LOW | src/core/mxc-sdk/src/lib.rs | 81 | /// | COMMENT |
| LOW | src/core/mxc-sdk/src/sandbox.rs | 1 | // Copyright (c) Microsoft Corporation. | COMMENT |
| LOW | src/core/mxc-sdk/src/sandbox.rs | 101 | /// OS / wait failure. | COMMENT |
| LOW | src/core/lxc/src/main.rs | 41 | #[arg(long = "containername")] | COMMENT |
| LOW | src/core/lxc/src/main.rs | 61 | COMMENT | |
| LOW | src/core/wxc_common/src/interruptible_reader.rs | 1 | // Copyright (c) Microsoft Corporation. | COMMENT |
| LOW | src/core/wxc_common/src/interruptible_reader.rs | 81 | COMMENT | |
| 337 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | src/core/lxc/src/main.rs | 210 | // ── Telemetry init (experimental) ─────────────────────────────── | COMMENT |
| MEDIUM | src/core/lxc/src/main.rs | 255 | // ── Telemetry emit (experimental) ─────────────────────────────── | COMMENT |
| MEDIUM | src/core/wxc_common/src/config_parser.rs | 3825 | // ── Telemetry ──────────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/core/wxc_common/src/process_util.rs | 378 | // ── Captured-output process execution ────────────────────────────────────── | COMMENT |
| MEDIUM | src/core/wxc_common/src/process_util.rs | 510 | // ── Capability SID helpers ──────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/core/wxc_common/src/process_util.rs | 523 | // ── Sibling binary resolution ───────────────────────────────────────────── | COMMENT |
| MEDIUM | src/core/wxc/src/main.rs | 747 | // ── Telemetry init (experimental) ─────────────────────────────── | COMMENT |
| MEDIUM | src/core/wxc/src/main.rs | 1080 | // ── Telemetry emit (experimental) ─────────────────────────────── | COMMENT |
| MEDIUM | …ackends/appcontainer/common/src/appcontainer_runner.rs | 1085 | // ─────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | …ackends/appcontainer/common/src/appcontainer_runner.rs | 1087 | // ─────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | …backends/isolation_session/common/src/console_relay.rs | 312 | // ── ConsoleRelayParams + create_console_relay_thread ────────────────── | COMMENT |
| MEDIUM | src/backends/isolation_session/common/src/pipe_relay.rs | 100 | // ── Stop-event-aware pipe relay ──────────────────────────────────────────── | COMMENT |
| MEDIUM | src/backends/isolation_session/common/src/pipe_relay.rs | 505 | // ── Tests for `create_relay_thread_with_stop` ────────────────────────── | COMMENT |
| MEDIUM | …/backends/isolation_session/common/src/console_mode.rs | 25 | // ── Local console raw-VT-mode RAII guard ────────────────────────────────── | COMMENT |
| MEDIUM | …/backends/isolation_session/common/src/console_mode.rs | 145 | // ── Console Ctrl handler RAII guard ────────────────────────────────────── | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | docs/authoring-a-new-feature.md | 26 | ## Step 0: Where does my feature go? | COMMENT |
| LOW | docs/authoring-a-new-feature.md | 57 | ## Step 1: Write a Feature Spec | COMMENT |
| LOW | docs/authoring-a-new-feature.md | 81 | ## Step 2: OS changes (if applicable) | COMMENT |
| LOW | docs/authoring-a-new-feature.md | 122 | ## Step 1: Add the field to the wire model (the schema source of truth) | COMMENT |
| LOW | docs/authoring-a-new-feature.md | 162 | ## Step 2: Add the model struct | COMMENT |
| LOW | docs/authoring-a-new-feature.md | 186 | ## Step 3: Map the wire field to the domain model | COMMENT |
| LOW | docs/authoring-a-new-feature.md | 220 | ## Step 4: Implement the feature in the runner | COMMENT |
| LOW | docs/authoring-a-new-feature.md | 270 | ## Step 5: Add a test config | COMMENT |
| LOW | docs/authoring-a-new-feature.md | 309 | ## Step 6: Update the SDK (if needed) | COMMENT |
| LOW⚡ | src/backends/windows_sandbox/guest/src/main.rs | 29 | // Step 3: accept 4 connections from the host daemon. | COMMENT |
| LOW⚡ | src/backends/windows_sandbox/guest/src/main.rs | 37 | // Step 4: lock down firewall — only allow the host IP. | COMMENT |
| LOW⚡ | src/backends/windows_sandbox/guest/src/main.rs | 43 | // Step 5: enter command loop. | COMMENT |
| LOW⚡ | …c/backends/appcontainer/common/src/sandbox_tracking.rs | 166 | // Step 1: Clear BFS filesystem policies (must happen before profile deletion). | COMMENT |
| LOW⚡ | …c/backends/appcontainer/common/src/sandbox_tracking.rs | 169 | // Step 2: Delete the AppContainer profile. | COMMENT |
| LOW | …c/backends/appcontainer/common/src/sandbox_tracking.rs | 192 | // Step 3: Delete the registry tracking entry. | COMMENT |
| LOW | src/backends/isolation_session/common/src/manager.rs | 122 | /// Step 1: Provision an agent user. Returns the OS-assigned agent | COMMENT |
| LOW | src/backends/isolation_session/common/src/manager.rs | 232 | /// Step 2: Start the isolation session. | COMMENT |
| LOW | src/backends/isolation_session/common/src/manager.rs | 282 | /// Step 3: Create a process inside the started isolation session. | COMMENT |
| LOW | src/backends/isolation_session/common/src/manager.rs | 542 | /// Step 4: Stop the isolation session. | COMMENT |
| LOW | src/backends/isolation_session/common/src/manager.rs | 554 | /// Step 5: Deprovision the agent user. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | src/backends/windows_sandbox/guest/src/main.rs | 29 | // Step 3: accept 4 connections from the host daemon. | COMMENT |
| LOW⚡ | src/backends/windows_sandbox/guest/src/main.rs | 37 | // Step 4: lock down firewall — only allow the host IP. | COMMENT |
| LOW⚡ | src/backends/windows_sandbox/guest/src/main.rs | 43 | // Step 5: enter command loop. | COMMENT |
| LOW⚡ | …c/backends/appcontainer/common/src/sandbox_tracking.rs | 166 | // Step 1: Clear BFS filesystem policies (must happen before profile deletion). | COMMENT |
| LOW⚡ | …c/backends/appcontainer/common/src/sandbox_tracking.rs | 169 | // Step 2: Delete the AppContainer profile. | COMMENT |
| LOW | …c/backends/appcontainer/common/src/sandbox_tracking.rs | 192 | // Step 3: Delete the registry tracking entry. | COMMENT |
| LOW | src/backends/isolation_session/common/src/manager.rs | 122 | /// Step 1: Provision an agent user. Returns the OS-assigned agent | COMMENT |
| LOW | src/backends/isolation_session/common/src/manager.rs | 232 | /// Step 2: Start the isolation session. | COMMENT |
| LOW | src/backends/isolation_session/common/src/manager.rs | 282 | /// Step 3: Create a process inside the started isolation session. | COMMENT |
| LOW | src/backends/isolation_session/common/src/manager.rs | 542 | /// Step 4: Stop the isolation session. | COMMENT |
| LOW | src/backends/isolation_session/common/src/manager.rs | 554 | /// Step 5: Deprovision the agent user. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/playground/src/renderer/app.ts | 796 | function updateContainmentDropdown(): void { | CODE |
| LOW | tests/playground/src/renderer/app.ts | 819 | function isExperimentalContainment(): boolean { | CODE |
| LOW | tests/playground/src/renderer/app.ts | 827 | function updatePlatformBadgeForContainment(containment: string): void { | CODE |
| LOW | sdk/src/helper.ts | 47 | export function warnLegacyContainmentOnce(legacy: string, canonical: string): void { | CODE |
| LOW | sdk/src/helper.ts | 147 | export function resolveBinaryAndCommonArgs( | CODE |
| LOW | sdk/src/sandbox.ts | 20 | function generateRandomContainerName(): string { | CODE |
| LOW | sdk/src/sandbox.ts | 137 | function buildProcessBaseContainerConfig( | CODE |
| LOW | sdk/src/sandbox.ts | 722 | function tryParseErrorEnvelopeFromLines(output: string): MxcError | null { | CODE |
| LOW | sdk/src/platform.ts | 113 | function isWindowsSandboxAvailable(): boolean { | CODE |
| LOW | sdk/src/platform.ts | 226 | function populateIsolationFromProbe(support: PlatformSupport): void { | CODE |
| LOW | sdk/src/platform.ts | 379 | function getDarwinRustTargetTriple(): string { | CODE |
| LOW | sdk/src/policy.ts | 143 | function hasAllApplicationPackagesAccess(dirPath: string): boolean { | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | sdk/src/state-aware-helper.ts | 140 | // Not JSON. Definitely script output. | COMMENT |
| MEDIUM | src/core/wxc_common/src/filesystem_dacl.rs | 3128 | // test is robust to host-specific ACL layouts. | COMMENT |
| MEDIUM | src/backends/windows_sandbox/daemon/src/pipe_server.rs | 317 | /// TODO: Change to a more robust approach like bind to port 0 (OS-assigned) | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | .github/workflows/Build.yml | 2 | # split: this file orchestrates, each stage lives in its own reusable. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/testing/wxc_e2e_tests/tests/e2e_windows.rs | 929 | except Exception as e:\n\ | CODE |