Repository navigation
inspect: box inspect --security-report (#28) - #50
Merged
Merged
Conversation
A statement of what a sandbox's VMM can and cannot touch: host UID and strict slot, capabilities, no_new_privs, seccomp, namespaces and limits; the network; the root, /data and every host mount; KVM and what box last proved about the kernel boundary; then findings, each fail, warn or info. It is read back out of the configuration box hands the backend -- the podman arguments from vmArgs, the OCI spec from krunSpec, the Firecracker jail's from fcSpec -- not from the Boxfile, so it cannot describe a confinement box does not apply. When the sandbox is up, the VMM is read from /proc too (UID, capability mask, no_new_privs, seccomp, network namespace) and every difference is a failure; the command then exits 1. Text by default, --security-report=json for CI. The escape suite checks the report against what it reads from /proc itself. Its network-namespace check could pass without reading anything: a VMM running as another UID hides its namespace link, and an empty string never equals the host's. It now reads the link through podman's namespace and fails if it still cannot. Also: Firecracker now says when BOX_HOME makes its socket paths too long for a Unix socket, instead of only that it never opened its API socket. podman strict, firecracker strict and krun standard: the report matches the running VMM, no escapes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #28. Part of the v0.5 milestone.
box inspect <name> --security-reportstates what a sandbox's VMM can and cannot touch.--security-report=jsongives the same for CI and audits.What makes it trustworthy
vmArgs(podman),krunSpec(krun),fcSpec(the Firecracker jail) — and reads capabilities,no_new_privs, seccomp, namespaces, limits, the UID mapping, mounts and the network back out of their output. It cannot describe a confinement box does not apply./procentry is read (UID, capability mask,no_new_privs, seccomp, network namespace). Any difference is afailfinding and the command exits 1. Anything unreadable counts as a difference, never as a match./procitself.Example (podman, strict, running)
Fixed on the way
/proc/<pid>/ns/netlink, and the empty result never equals the host's, so the check passed blind. It now reads the link through podman's namespace and fails if it still can't.BOX_HOMEfailed with only "never opened its API socket". It now names the socket path and says to shortenBOX_HOME.Tests
no_new_privs, seccomp, host network namespace, unreadable namespace) is caught on its own; findings fail on real problems and not on a sound sandbox; the krun and Firecracker specs report what they configure.