Concepts

Architecture

How Sandbox Policy, Executor, Netd and native backends compose without merging their trust boundaries.

The product boundary

Warden is the product facade. It composes a portable decision, the policy-agnostic Executor engine, native confinement and optional Netd mediation. It does not contain Datalog rules and it does not decide which rights a workload deserves.

ARCHITECTUREThe Warden composition
Policy frontendJSON · C builder · Datalog
Canonical MIRresolved decision
Sandbox Policyhost resolution
Executorlifecycle + receipts
OS backendSeatbelt · Bubblewrap
ComponentOwnsDoes not own
Maelys Sandbox Policycanonical MIR, host-path resolution, capability requirementsprocess lifecycle, proxying
Executor engineprepare/spawn/wait/stop, backend selection, execution receiptsauthorization rules, DNS
Maelys Netdproxy authentication, allowlist, DNS/pinning, byte relay, network receiptsOS sandbox policy
Maelys Systemreactor, sockets, clocks, buffers, idempotent closeproduct or policy concepts
Maelys Wardensafe product composition and public CLI/C/SDK facadea second policy engine

Prepare before spawn

CODE
request + sealed plan


backend.prepare()
        │ immutable artifact

backend.spawn()
        │ execution handle
        ├── wait()
        ├── stop()
        └── receipt snapshot

Prepare canonicalizes and pins what the backend will need. Spawn consumes the immutable artifact. A confined request is accepted only when one backend advertises every required capability.

Native backends

GuaranteePOSIXBubblewrapSeatbelt
Unconfined executionyesyesyes
Strong NETWORK_NONEnonetns + seccompSBPL deny
Filesystem view mappings / tmpfsnoyesno
Portable READ / WRITE rulesnoyesyes
Standard HTTP/SOCKS clientsnoNetd relaydirect Netd loopback
Policy follows descendantsnoyesyes

Digests and receipts

CODE
JSON / builder ──► MIR digest ──► decisionDigest

                    ExecutorPlan digest ──► planDigest

              backend + capabilities + terminal outcome

                    execution receipt v1

The decision digest identifies the portable authorization result. The plan digest identifies the mechanical execution plan after host resolution. Keeping both prevents a receipt from blurring policy and enforcement.