Conversation
imjasonh
force-pushed
the
sandbox
branch
2 times, most recently
from
February 21, 2026 18:03
9574d0f to
667dc5d
Compare
Adds three new sandbox backends for Linux and macOS: - bubblewrap (bwrap): namespace-based sandboxing with seccomp - landlock: kernel LSM sandboxing via native Rust N-API module - macos-container: lightweight VM sandboxing on macOS 15+ Includes sandbox detection, profile generation, seccomp BPF filters, telemetry integration, and comprehensive test coverage. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <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.
Summary
This PR adds three new lightweight sandbox backends — bubblewrap (bwrap), Landlock, and macOS Container — alongside the existing Docker, Podman, and sandbox-exec backends. It also adds seccomp syscall filtering as a
defense-in-depth layer for the Linux backends, and introduces comprehensive CI testing across Linux, macOS, and WSL2.
New sandbox backends
/opt/hostedtoolcache), WSL path warnings, and integrates seccomp via fd passing.
rules, loads a seccomp BPF filter, then exec's the target command. Cross-compiled for amd64/arm64 and bundled with the npm package.
Seccomp syscall filtering
Shared BPF filter generation (bwrap-seccomp.ts) blocking 26 syscalls across x86_64 and aarch64: ptrace, kernel modules, keyctl, personality, namespace ops (setns/unshare), mount/umount, pivot_root, chroot, reboot, clock
manipulation, bpf, userfaultfd. clone3 returns ENOSYS (not EPERM) to trigger glibc fallback to clone(). Delivered via fd for bwrap, via temp file for landlock.
Integration tests check that some of these -- the easiest ones to test -- are successfully blocked.
Sandbox detection & routing
CI
test-rig.tsto better handle parsing of telemetry on WindowsBuild & packaging
@google/gemini-cli-landlock) for landlock filesystem rules and seccomp loadingConfiguration & docs