Under the hood

Warden integration

How Warden applies the same portable policy to real workloads without coupling the two products.

The bridge between a decision and a process

Sandbox Policy decides the boundary; Warden owns the running process. A small adapter connects the two without making either product depend on the other's internals.

libmaelys-warden-policy-adapter.a is built in the Warden repository because it knows both public APIs. Neither Sandbox Policy core nor Warden's Executor core depends on the other.

CODE
libmaelys-sandbox-policy        libmaelys-executor
            │                           ▲
            ▼                           │
    SandboxPlan ──► Warden Policy adapter
                            │
                            ▼
                    sealed ExecutorPlan

The adapter maps filesystem semantics, process confinement and network modes, preserves the MIR decision digest and refuses unsupported mediator or capability combinations.

Run the policy

CODE
maelys-policy compile policy.json -o policy.mir
maelys-warden run --plan policy.mir --receipt run.json -- npm test

Warden may also compile trusted JSON in memory, but the policy compiler remains the authority for source schema and MIR canonicality.

Add controlled network access

For mediated networking, Sandbox Policy records allowed destinations. Warden selects the frontend and manages process isolation. Netd authenticates the execution, resolves/pins DNS, enforces the allowlist and produces network receipts.