Documentation
¶
Overview ¶
Package app is the containment product's command. It is the launch step of docs/adr-sandboxing.md: a runner (the plugin engine, workload's local driver, a person) starts `ext sandbox exec` with a grant, and the command confines its own process with src/cto/internal/confine and becomes the guest.
cto exec --grant FILE [--driver NAME] [--accept CLASS,...] [--runner CLASS,...]
[--status-fd N] [--dir DIR] -- PATH [ARG...]
cto exec --launch-fd N [--status-fd N]
cto check [--json]
With --grant the grant is read from a JSON file (a src/cto/sandbox Policy) and the guest's base environment is the caller's PATH only; a grant with secrets needs --launch-fd. With --launch-fd the whole launch (confine.Launch, secrets' values included) is read from an inherited file descriptor, which is how a runner passes it without putting a secret on a command line. --status-fd writes the one status line (the report, or the code of a refusal) to an inherited descriptor before the guest starts.
Index ¶
Constants ¶
const ( ExitUsage = 2 // the command line is wrong ExitRefused = 125 // the launch was refused: the status line or stderr says why ExitExec = 126 // the guest could not be started after the process was confined )
The exit statuses of `sandbox exec` when it does not become the guest.
const MaxLaunchBytes = 4 << 20
MaxLaunchBytes bounds a launch read from a descriptor.
Variables ¶
var Version = "0.1.0-dev"
Version is the version of this build of cto.
Functions ¶
Types ¶
This section is empty.