Interfaces
SandboxOpts
Options for Sandbox.create.
Properties
Section titled “Properties”client?
Section titled “client?”
optionalclient?:Client
An existing client; by default one is created with the default login and the organization from instance.
document?
Section titled “document?”
optionaldocument?:string|Uint8Array<ArrayBufferLike>
A full environment document instead of packages/egress.
egress?
Section titled “egress?”
optionalegress?: readonlystring[]
Outbound allowlist (hostnames; “” allows all). Default [“”]. Cloud metadata, loopback and private ranges are always blocked.
egressPolicy?
Section titled “egressPolicy?”
optionalegressPolicy?:"deny"|"destroy"
What happens outside the allowlist: “deny” (refuse the connection, default) or “destroy” (stop the sandbox).
optionalenvs?:Record<string,string>
Environment variables for every command (kept client-side, on this handle).
instance?
Section titled “instance?”
optionalinstance?:string
The organization ID (used when client is unset). If unset, $CHAINCTL_SANDBOX_INSTANCE is used;
if that’s empty too, the organization is auto-detected when you belong to exactly one
($CHAINGUARD_SANDBOX_NO_DETECT_INSTANCE=1 turns that off). List IDs with listOrganizations(),
chainguard-sandbox orgs or chainctl iam organizations list.
optionalname?:string
Label; the display name becomes <name>/<word-word>. Default “sandbox”.
packages?
Section titled “packages?”
optionalpackages?: readonlystring[]
Chainguard package names (default DEFAULT_PACKAGES). Unknown packages fail create.
source?
Section titled “source?”
optionalsource?:object
Start from a GitHub repository (cloned into /work) instead of an empty tree.
revision?
Section titled “revision?”
optionalrevision?:string
url:
string
startTimeoutMs?
Section titled “startTimeoutMs?”
optionalstartTimeoutMs?:number
How long to wait for the guest to start (ms, default 180000).
