sandlock
sandlock copied to clipboard
The lightest sandbox. A process-based sandbox for Linux, no container, no VM, no privilege, no prompt injection
Under `chroot="/"` and `fs_mount`, the supervisor rewrites paths for `openat`/`statx`/`newfstatat`/`faccessat`/`readlinkat`/etc., but not the `xattr` family. So `getxattr`/`lgetxattr`/`listxattr` on a path under an `fs_mount` target resolve against the **real (empty) mount...
I have an error `Error: unknown --net-allow protocol` [...] on every --net-allow option set, even on provided examples. I suppose its due to some misconfiguration from my side, how can...
While running VM validation for the Protection opt-out work in #17, I hit a second kernel-version gate that prevents sandlock from running on RHEL 9 / Ubuntu 22.04 even with...
# RFC: Python parity for the Handler trait (Follow-up B) PR #36 landed the Rust `Handler` trait and the `Sandbox::run_with_extra_handlers(I: IntoIterator)` shape. The existing Python SDK (ctypes-based, in `python/src/sandlock/`) has...
## Summary Calling `Sandbox(policy).run(...)` from a uvicorn server process returns `exit_code=-1, error=\"sandlock_spawn failed\"` every time. The identical call succeeds from a fresh single-threaded Python process in the same container. ##...
sandlock's network enforcement validates IPs/ports at the seccomp notif layer, but the actual TCP/IP processing still runs in the host kernel. gVisor's netstack means a bug in TCP parsing can't...
```bash $ sandlock run -r /usr -r /lib -r /etc --net-connect 443 -- curl -sSL https://example.com Example Domainbody{background:#eee;width:60vw;margin:15vh auto;font-family:system-ui,sans-serif}h1{font-size:1.5em}div{opacity:0.8}a:link,a:visited{color:#348}Example DomainThis domain is for use in documentation examples without needing permission....
```bash $ pip3 install sandlock --break-system-packages Looking in indexes: https://mirrors.aliyun.com/pypi/simple Collecting sandlock Downloading https://mirrors.aliyun.com/pypi/packages/ea/43/edb389fa0714be7135d8f93ced4f31d762c1c9d8912d57651cf648d5c0a3/sandlock-0.6.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.0 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.0/3.0 MB 21.5 MB/s eta 0:00:00 Installing collected packages: sandlock Successfully installed sandlock-0.6.0...
## Summary A total of 28 vulnerabilities have been identified in the current main branch of Sandlock, all of which are sandbox escape and exploit PoCs discovered via code audit....
## Problem sandlock currently has several Linux runtime paths that assume the x86_64 syscall ABI. This prevents the sandbox from building or running correctly on Linux arm64/aarch64 environments. Examples of...