Skip to content

Recursively audit packaged Mach-O ABI and dependency closure #328

Closed

Description

@wieslawsoltes

Parent: #227
Related release sink: SceneTech/AppScene#130

Problem

The installed WebScene SDK packager rewrites and audits the known application executable and staged WebGPU framework, but a hybrid application can carry additional Mach-O files such as Node native extension modules. vscode-demo/scripts/package-macos.py currently owns a second recursive audit for architecture, deployment target, rpaths, install names, and dependency closure across every packaged Mach-O.

That ABI/closure verifier is product-neutral and belongs with WebScene's macOS SDK packaging surface.

Focused contract

  • Recursively discover regular Mach-O entries in the final bundle without following symlinks.
  • Require the configured architecture set and bounded minimum macOS policy for every slice.
  • Validate dylib IDs, rpaths, @rpath/@loader_path/@executable_path expansion, system allowlists, and bundle-contained dependency closure.
  • Reject absolute non-system dependencies, escaping/dangling paths, case collisions, special entries, architecture/deployment mismatch, and mutation during audit.
  • Emit deterministic path-relative evidence; do not add Code OSS names, browser-source bans, or application feature rules.

Acceptance

  • Fixtures cover host executables, frameworks, native extension modules, fat/wrong-architecture binaries, malformed load commands, escaping paths, missing dependencies, Unicode names, symlinks, and mutation.
  • Real installed-SDK external consumers pass on macOS; Linux/Windows source/schema tests remain portable.
  • Include bounded 10,000-entry discovery, time, FD/RSS, and evidence-size gates plus sanitizer coverage where applicable.

The downstream integration keeps its audit until an installed SDK exposes equivalent evidence and the exact Code OSS package passes it.

Activity

  1. wieslawsoltes commented on Sep 18, 2026

    @wieslawsoltes
    CollaboratorAuthor

    The exact Code OSS package audit found a useful product-policy case adjacent to this generic closure work: extensions/microsoft-authentication/dist/libmsalruntime.dylib is the only WebKit-linked image among 24 packaged Mach-O files. It is a valid system dependency in generic closure terms, so it does not change #328's product-neutral allowlist contract.

    SceneTech/vscode-demo#3 now owns the Code OSS-specific decision. The paired MSAL broker dylib/addon is unreachable because the browser workbench initializes the remote Node extension host with UIKind.Web, and unchanged Microsoft authentication skips NativeBrokerPlugin while retaining browser/protocol/device-code flows. The downstream package policy prunes only those two files and adds a final absence/flow-marker gate. #328 should continue reporting deterministic dependency evidence so application policy can reject otherwise-valid system frameworks such as WebKit.

  2. wieslawsoltes commented on Sep 18, 2026

    @wieslawsoltes
    CollaboratorAuthor

    Implemented by #343 from exact origin/main base 348ea440.

    Focused evidence at head 55ab2182:

    • portable Linux source/schema contract: pass
    • portable Windows source/schema contract: pass (including exact 10,000-entry scan under the 15-second bound)
    • hosted macOS real installed-SDK consumer: pass; configures and installs the tools-only SDK surface, compiles a host executable, dylib, and .node bundle, checks 10 deterministic audit passes, then proves a dangling mutated dependency is rejected
    • local macOS repeat: 15 adversarial tests pass; real installed consumer audits 3 Mach-O images in 10 stable passes with 2,510-byte path-relative evidence

    The verifier is product-neutral. Code OSS/browser policy remains downstream as planned.

  3. added a commit that references this issue on Sep 18, 2026
    1cf8bc5
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

    vscode-oss/plannedPlanned for the AppScene/WebScene VS Code OSS integration

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions