The profile ladder#
| Factor | process-fixture | filesystem-fixture | container-fixture | microvm-fixture |
|---|
| Cost | 1 | 2 | 3 | 5 |
|---|
| Filesystem control | no | yes | yes | yes |
|---|
| Network denial | no | no | yes | yes |
|---|
| Separate kernel | no | no | no | yes |
|---|
| Residual | shared-host-kernel, network-not-denied | shared-host-kernel, network-not-denied | shared-host-kernel | none |
|---|
Run it#
| Command | What it does |
|---|
python3 projects/sandbox-ladder/solution/cli.py untrusted=true,secrets=true,network=true,host_kernel=false --budget 3 | Policy simulation, JSON out |
|---|
... --docker-image <image> | Adds a docker run preview |
|---|
... --docker-image <image> --execute | Runs two probes on a local image |
|---|
python3 scripts/project_test.py sandbox-ladder --stage 1 --path learning-artifacts/sandbox-ladder | Grades stage 1 of your version |
|---|
python3 scripts/project_test.py sandbox-ladder --all --solution --strict | Grades the reference |
|---|
python3 code/main.py | Lesson demo, allow and deny battery |
|---|
python3 -m pytest code/tests/ -v | Lesson tests |
|---|
Planner steps#
Planner output for the sample#
profile=container-fixture mode=policy-simulation os_isolation=false
residual=shared-host-kernelno separate kernel
verify=runtime-configuration-and-escape-testsalways printed
JSON wrapper keys from cli.py
"mode": "policy_simulation", "runtime_verified": false
The Docker probe command#
docker run --rm --pull=never \local image only
--network none --read-only \no route, read-only root
--cap-drop ALL --security-opt no-new-privileges \
--pids-limit 32 --memory 64m --cpus 0.5 \
--user 65534:65534 <image> sh -c '<probes>'root_write, default_route
How sbx decides#
- Deny wins
- a deny beats an allow for the same hostname or CIDR.
- deny_kind
implicit means no rule matched. explicit names the rule.- check network
- host and port only, port 443 by default. It exits 1 on a denial.
- forward-bypass
- a tunnel with no inspection and no credential injection.
- Secrets
- the agent sees
proxy-managed or sbx-cs-<rand>, never the value. - SSH agent
- forwarding is on by default. Keys stay on the host.
- Governance
- only organization allow rules grant. Local deny rules still apply.
- Boundary
- the hypervisor, not in-VM privilege separation.
Safety modes for unmatched calls#
| Factor | strict | balanced | restricted | autonomous |
|---|
safe label | ask | allow | allow | allow |
|---|
destructive label | ask | ask | deny | allow |
|---|
unknown label | ask | ask | deny | allow |
|---|