Skip to documentation
Documentation navigation

Documentation navigation

Documentation / guides

Enforcement

Understand how a profile becomes native filesystem, network, environment, and process enforcement.

developer

The enforcement subtree explains what happens after a validated profile reaches a host backend. Compilation turns the profile into an effective policy, probes the native capability ladder, and reports the achieved level, guarantees, and per-feature compilation outcomes. The runtime subtree then uses that compiled authority for actual commands and processes.

How it works

The public sandbox.Profile carries requested authority. A backend compiles it into a reusable spawn transform and checks that required guarantees are present. The transform may be a re-exec helper, Seatbelt wrapper, restricted token, or backend-owned launch. The executor still owns the child environment, working directory, output, and lifecycle.

package example

import "github.com/looprig/sandbox"

func enforcementFacts(executor *sandbox.Executor) (uint8, sandbox.Guarantees, sandbox.CompileReport) {
	return executor.Level(), executor.Guarantees(), executor.Report()
}

Start here

Source

Proof

← back to documentation