Skip to content

firma-run: add macOS VZ guest launch contract#151

Draft
falcucci wants to merge 1 commit into
dario/fir-112-macos-structural-confinement-strategy-decision-parity-pathfrom
push-rtwwzrzpxtyl
Draft

firma-run: add macOS VZ guest launch contract#151
falcucci wants to merge 1 commit into
dario/fir-112-macos-structural-confinement-strategy-decision-parity-pathfrom
push-rtwwzrzpxtyl

Conversation

@falcucci

@falcucci falcucci commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

cherry-picking the VZ guest work from #141

the split is useful to isolated the guest work development to match Apples Virtualization.framework boundaries

https://developer.apple.com/documentation/virtualization

here we specifically use FIRMA_RUN_VZ_GUEST to select the macOS vz mode.

before launch, the backend validates the configured runner and guest artifacts, rejects missing or relative paths, checks that the runner is executable on Unix and only then emits a macos_vz_guest proof.

the contract carries the execution envelope the runner must enforce:

  • sandbox id
  • runtime dir
  • runner path
  • guest image paths
  • command
  • args
  • cwd
  • environment
  • mounts
  • identity mode
  • seccomp artifact path
  • proxy URL
  • DNS stub address
  • attribution headers

required invariants:

  • sidecar-only egress
  • confined DNS
  • fail-closed startup/runtime
  • direct-bypass resistance
  • stdio/signal/exit preservation

since there is still no Apple Virtualization.framework runner here, it serves us as a bedside contract for the future runner.

routing also learns that macOS structural modes may need a host DNS refusal stub even when they are not using the Linux namespace path. the sandbox-exec uses that stub on loopback. the VZ guest contract exposes the same endpoint so the future runner can make guest DNS deterministic instead of letting the agent fall back to ambient resolution.

Note that the ESF remains out of this patch.

Tested with:

cargo test -p firma-run macos_vz

@falcucci falcucci self-assigned this Jun 9, 2026
@falcucci falcucci added the macos label Jun 9, 2026
cherry-picking the VZ guest work from #141

the split is useful to isolated the guest work development
to match Apples Virtualization.framework boundaries

https://developer.apple.com/documentation/virtualization

here we specifically use FIRMA_RUN_VZ_GUEST to select the macOS vz mode.

before launch, the backend validates the configured runner and guest artifacts,
rejects missing or relative paths, checks that the runner is executable on Unix
and only then emits a macos_vz_guest proof. 

the contract carries the execution envelope the runner must enforce:

- sandbox id
- runtime dir
- runner path
- guest image paths
- command
- args
- cwd
- environment
- mounts
- identity mode
- seccomp artifact path
- proxy URL
- DNS stub address
- attribution headers
- required invariants:
  - sidecar-only egress
  - confined DNS
  - fail-closed startup/runtime
  - direct-bypass resistance
  - stdio/signal/exit preservation

**since there is still no Apple Virtualization.framework runner here**,
it servers us as a bedside contract for the future runner.

routing also learns that macOS structural modes may need a host DNS refusal
stub even when they are not using the Linux namespace path. the sandbox-exec
uses that stub on loopback. the VZ guest contract exposes the same endpoint
so the future runner can make guest DNS deterministic instead of letting the
agent fall back to ambient resolution.

*Note that the ESF remains out of this change.*

Tested with:

    cargo test -p firma-run macos_vz
@falcucci falcucci force-pushed the push-rtwwzrzpxtyl branch from 5a0d253 to a610b29 Compare June 10, 2026 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant