Skip to documentation
SLOP

tiny.sandbox

Reference tiny.sandbox

Overview · API · Code relationships · Verification · Audit

Overview

Executes a single command in a temporary working tree so callers can inspect filesystem changes before deciding what to retain. A disposable directory serves as the layer, while execution returns a Result holding captured child output and the report of observed filesystem changes.

Four selectable backends provide execution environments: copied staging on any host, a Linux Bubblewrap overlay, macOS staging, and Windows staging. With copied staging, the runner clones the source directory into the layer and sets the child process working directory to that copy. This backend supplies no operating system confinement against absolute paths, parent directory traversals, or symlinks that reach outside the layer for reads and writes, so arbitrary child commands can modify the original source tree. Bubblewrap provides a dedicated process namespace, with a private network namespace enabled when selected by policy.

Execution relies on a borrowed run plan naming arguments, directories, isolation policy, and limits on run time and output bytes. Each run records an Audit describing the backend configuration across filesystem, process, network, and environment dimensions. The implementation constructs this record from the chosen runner and plan rather than by measuring actual isolation, allowing callers to compare supported dimensions against required policy instead of assuming every request was granted.

The package does not apply recorded layer changes back to the source tree. Callers must copy any files they want to retain out of the layer before calling Result.deinit, which deletes the layer directory.

Definitions

Actions

Public operations.

Types and contracts

Public types and contracts.

Namespaces

Public namespaces.

Code relationships

Direct static dependencies extracted from parsed source by semantic graph analysis.

Uses: tiny.bench, tiny.hypothesis, tiny.sys
Used by: None

Verification

No verification records are cataloged for this module in this build.

Audit

EvidenceValue
Sourcelib/sandbox/src/root.zig
Definitions5 of 39 documented
Members0 of 0 documented
Public names39 API, 156 indexed
Version26.7.0
Revisiondaab053ee433