Repository navigation
Description
Version / branch / commit
main @ f30f550, built manually via go build (not make build-all).
OS and environment
LMDE 7 (gigi) / Linux 6.12 / Go 1.26.6 / amd64
Steps to reproduce
- Clone the repo, build with
go build -o zero ./cmd/zero(or plainmake build) instead of
make build-all. - Run
zero sandbox policy. - Run
zero doctor.
Expected behavior
Either the companion zero-linux-sandbox helper is produced by the normal build path too, or the
CLI/TUI actively surfaces that native sandbox enforcement is unavailable — ideally at the start of
a session that will run exec_command/write_file/etc, not only when a user thinks to run
zero doctor explicitly.
Actual behavior
zero sandbox policy reports:
enforcement_level: degraded
backend_native_isolation: false
backend_available: false
downgrade_reason: Linux sandbox helper is not available
bwrap is installed and functional — the missing piece is the zero-linux-sandbox companion
binary (cmd/zero-linux-sandbox/), which is only produced by make build-all, not by
make build/plain go build. Nothing outside of zero doctor (run explicitly) surfaces this —
the TUI and zero exec proceed normally with reduced isolation and no visible indication. A
session can run many tool calls with the native sandbox effectively off and nobody notices.
Root cause detail: selectPlatformBackend (internal/sandbox/manager.go) resolves the helper via
a plain $PATH lookup (lookupExecutable); it does not check the directory next to the running
zero binary (a different lookup path, findLinuxSandboxHelperCommand in
internal/sandbox/linux_helper.go, does check that, but it isn't what backend selection uses).
Relevant logs, screenshots, or error messages
$ zero sandbox policy
mode: enforce
network: deny
backend: unavailable
enforcement_level: degraded
requires_platform_sandbox: true
downgrade_reason: Linux sandbox helper is not available
backend_available: false
backend_native_isolation: false
warning: native process isolation unavailable on linux
warning: shell commands are not wrapped by a native platform sandbox
I have a candidate fix (TUI banner + persistent indicator, structured warning at the start of
zero exec, and producing zero-linux-sandbox from the normal make build target on Linux) on a
personal fork, tested against the full local gate (fmt, vet, full test suite, cross-compiled tests
for darwin/windows, lint, govulncheck — all green) — happy to open a PR against an approved issue
per CONTRIBUTING.md once/if this is triaged as worth fixing.
Activity
Vasanthdev2004 commentedon Sep 12, 2026
Two parts here, with different answers.
The missing helper on a plain
go buildis handled by #946, approved and waiting on merge: whenzero-linux-sandboxis neither beside the binary nor on PATH,zeronow execs itself as the helper, so ago build -o zero ./cmd/zerobinary gets native enforcement as long asbwrapis installed. Once that lands, your first two steps reportbackend_available: true.The visibility gap is real on its own and this issue stays open for it: today only
zero doctorandzero sandbox policysay enforcement is degraded, and a TUI session or azero execrun proceeds with reduced isolation and no notice. Approving for that part: a one-line notice at session start in the TUI and on stderr for exec wheneverenforcement_levelis degraded, naming the downgrade reason, wherever each surface already reports sandbox state.FabioLeitao commentedon Sep 29, 2026
PR is up for the visibility part: #1107. It is limited to what you approved: a one-line notice at session start in the TUI and on stderr for exec, only when
enforcement_levelis degraded, naming the downgrade reason (silent for native/unelevated enforcement and for an explicitly disabled sandbox). I left the plain-go buildhelper case out, since you said #946 covers it.go test ./...is not fully green on my machine, but the failing packages fail the same way on an unmodifiedupstream/mainarchive; details are in the PR description.fix(sandbox): say when a session's sandbox enforcement is degraded (T…
revert: drop fork sandbox enforcement warning superseded by upstream T…