kosa8 docs

Commands / kosa8 sandbox create

kosa8 sandbox create

Boot a new sandbox microVM

Usage

kosa8 create [NAME]

Boots a sandbox: its own VM, kernel and container engine.

--egress deny and --egress-allow are enforced on the host, in the userspace network every frame from the VM passes through, so root inside the sandbox cannot lift them; the same policy is also applied inside the guest. In an allow-list sandbox DNS is answered by the host, for the listed names only. --egress-allow '*.example.com' admits every name below example.com, at any depth, but not example.com itself (list it too if needed); *.com and other public suffixes are refused. A wildcard is enforced on the host alone: the in-guest layer cannot resolve one ahead of time, so it steps aside for a sandbox that has one. --egress fakenet is for malware analysis: nothing leaves the host, and a simulated internet there answers every name and connection and records it (kosa8 lab net SANDBOX; see kosa8 lab --help). Refused attempts go to the audit log (see kosa8 sandbox egress).

--pcap FILE captures from the first frame, boot included. Every frame the sandbox sends or receives is written, on the host, to a pcapng file that opens in Wireshark or tshark. The guest cannot see, stop or edit it — root in the guest included — because the capture is taken where the host's userspace network reads each frame.

Rotation: FILE is the first segment. At --pcap-max-mb it closes and FILE.2.pcapng, FILE.3.pcapng... follow; with --pcap-files N the oldest is deleted once N exist, so the capture never holds more than N × max on disk. --pcap-files 1 keeps one segment and stops when it is full, deleting nothing. Each closed segment's SHA-256 is written to the audit log (action sandbox.pcap.segment).

A capture holds everything the guest said in the clear — tokens, cookies, keys sent without TLS. The files are owner-only; treat them like the secrets they may contain.

--label CUI marks it with a classification from the org policy's lattice (UNCLASSIFIED < CUI when no policy defines one). The label is inherited by every snapshot, restore and fork, limits which host directories may be mounted (--mount), what egress it may have and where its snapshots may go, and is recorded in the audit log. See kosa8 label --help.

Options

FlagTypeWhat it doesDefault
--cpusuintvCPUs2
--diskintdata disk in GB, holding images and everything written inside the sandbox (sparse: it costs what is used, not what is declared; default is the plan's)0
--egressstringnetwork policy, enforced on the host: any (default), deny (nothing leaves, DNS included), or fakenet (nothing leaves; a simulated internet on the host answers and records everything)—
--egress-allowstringArraypermit outbound traffic only to these hostnames, *.domain wildcards, IPv4 addresses or CIDRs (repeatable); implies deny for everything else[]
--labelstringArrayclassification from the org policy (CUI, "CUI//SP-EXPT//NOFORN"), or KEY=VALUE for any other label (repeatable)[]
--memoryuint64memory in MiB1024
-v, --mountstringArrayshare a host directory into the sandbox: HOST:GUEST[:ro] (repeatable)[]
--pcapstringcapture every frame the sandbox sends or receives to this pcapng file, from boot—
--pcap-filesintsegments kept on disk; the oldest is deleted beyond this (1 = stop when full)8
--pcap-max-mbint64size at which a capture segment closes and the next begins, in MiB64