shadow-hdk-linux-sandbox
Shadow HDK's Linux confinement helper — the first executable of the kit's OS layer (Epic 0010,
D123). LocalEnvironment invokes it exactly as it invokes sandbox-exec on macOS: the helper
confines itself and execs the command, so there is one process, in the leash's process group,
exiting with the command's own code.
shadow-hdk-linux-sandbox --mode read-only|workspace-write [--root <dir>]... -- <argv>...
shadow-hdk-linux-sandbox --probe
What it applies
- Landlock (a kernel LSM any unprivileged process may apply to itself; Linux 5.13+, ABI 4 on
Ubuntu 24.04's 6.8): reads everywhere — the interpreter has to read its own installation;
writes beneath each
--rootforworkspace-writeand nowhere forread-only; the null, zero, full, random, urandom, tty, ptmx and pts devices writable in both modes, because devices are not files (gitopens/dev/nullread-write at startup); TCPbindandconnecthandled and denied where the kernel has it (ABI 4+). - seccomp:
socket()with any domain butAF_UNIXfails withEPERM, and so doesio_uring_setup— io_uring can open and connect sockets without asocketsyscall, so a filter that stopped atsocketwould stop nothing. Every other syscall is allowed; the filesystem is Landlock's.
No namespaces, no root, no daemon — which is what survives Ubuntu 24.04's default AppArmor policy, where bubblewrap's unprivileged user namespace does not. Bubblewrap stays behind it as the fallback on a kernel without Landlock; the kit's D36 proof decides which is in force by watching a write outside denied, a socket refused and a write inside land, before any confined mode opens. Nothing here is trusted for having run.
Exit codes
| code | meaning |
|---|---|
| the command's | after exec, the helper is the command |
| 120 | cannot confine — no Landlock (absent or lsm= without it), a ruleset the kernel did not enforce, seccomp refused; stderr says why |
| 121 | usage — the arguments above are the contract; full never reaches the helper |
| 126 / 127 | the command could not be executed / was not found |
--probe prints one JSON line — {"version": "…", "landlock_abi": N, "supported": true|false} —
and exits 0 or 120.
Building
cargo build --release
cargo test # the argument tests everywhere; the confinement tests on a Linux kernel
Packaged for PyPI by maturin (bindings = "bin"): one py3-none-<platform> wheel per OS × arch,
no Python-version coupling. shadow-hdk depends on it where sys_platform == 'linux'. Off Linux
the binary builds and refuses with 120 — so the crate lints, unit-tests and packages on any
developer machine.
Environment variables the kit reads (not the helper): SHADOW_HDK_LINUX_SANDBOX names the
helper's path when it is not beside the interpreter or on PATH; SHADOW_HDK_SANDBOX narrows the
kit's candidates to one mechanism (landlock, bubblewrap, seatbelt).
Metadata
Release files for shadow-hdk-linux-sandbox 0.38.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| shadow_hdk_linux_sandbox-0.38.0.tar.gz | 13.8 kB | Without provenance | Details for shadow_hdk_linux_sandbox-0.38.0.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| shadow_hdk_linux_sandbox-0.38.0-py3-none-musllinux_1_2_x86_64.whl | Python 3 | none | Linux musl 1.2+ x86-64 | Details for shadow_hdk_linux_sandbox-0.38.0-py3-none-musllinux_1_2_x86_64.whl |
| shadow_hdk_linux_sandbox-0.38.0-py3-none-musllinux_1_2_aarch64.whl | Python 3 | none | Linux musl 1.2+ ARM64 | Details for shadow_hdk_linux_sandbox-0.38.0-py3-none-musllinux_1_2_aarch64.whl |
| shadow_hdk_linux_sandbox-0.38.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | Python 3 | none | Linux glibc 2.17+ x86-64 | Details for shadow_hdk_linux_sandbox-0.38.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
| shadow_hdk_linux_sandbox-0.38.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | Python 3 | none | Linux glibc 2.17+ ARM64 | Details for shadow_hdk_linux_sandbox-0.38.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
Total release size: 875.8 kB
Release files / shadow_hdk_linux_sandbox-0.38.0.tar.gz
| Download URL | shadow_hdk_linux_sandbox-0.38.0.tar.gz |
|---|---|
| Size | 13.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
32ba42328ef4b8f7b1a13e1d4d45646517c43a1a7e50fbb3a09ff822866247f5
|
|
BLAKE2b-256 checksum How to use checksums |
608bccbacb66e68b0bf0886774e04240d7921c98a1ea6d48477fea61f76fc830
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.21 {"installer":{"name":"uv","version":"0.12.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / shadow_hdk_linux_sandbox-0.38.0-py3-none-musllinux_1_2_x86_64.whl
| Download URL | shadow_hdk_linux_sandbox-0.38.0-py3-none-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 243.4 kB |
| Tags | Linux musl 1.2+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
50b028bac2c2b5df725b5611dc51b768403f637e6180ba371c483d7667f538e0
|
|
BLAKE2b-256 checksum How to use checksums |
893c69a85396da19a20f2c3c90ce0b9003fbf58bc7a9948901d17d8ed981ce18
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.21 {"installer":{"name":"uv","version":"0.12.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / shadow_hdk_linux_sandbox-0.38.0-py3-none-musllinux_1_2_aarch64.whl
| Download URL | shadow_hdk_linux_sandbox-0.38.0-py3-none-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 232.1 kB |
| Tags | Linux musl 1.2+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
f4e5b44107688a70a39a91f12e4c6e76efc0de70e458e1a3b550e898e33f3141
|
|
BLAKE2b-256 checksum How to use checksums |
d4cd4039130f3828f810f8f2ae54fd636cfbc0ec56e6259823658e27c5ad75e4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.21 {"installer":{"name":"uv","version":"0.12.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / shadow_hdk_linux_sandbox-0.38.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | shadow_hdk_linux_sandbox-0.38.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 198.2 kB |
| Tags | Linux glibc 2.17+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
b70bee25cef080ecd399287edada5777f853d285e601f08c8adad132c55ff107
|
|
BLAKE2b-256 checksum How to use checksums |
138d95edd66c20db2915668816c08a27d4cd0d991d2f8b5bd21ce3462df04dce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.21 {"installer":{"name":"uv","version":"0.12.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / shadow_hdk_linux_sandbox-0.38.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | shadow_hdk_linux_sandbox-0.38.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 188.3 kB |
| Tags | Linux glibc 2.17+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
7724385d89a6d39cea7c90aa24311febd1591d39d6204c94acf6e3c21a89fc49
|
|
BLAKE2b-256 checksum How to use checksums |
47ad0e1c95ca0ae6e1c432a8b80405127f79dbcda1e599ccc6a7ab41cc0b79a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.21 {"installer":{"name":"uv","version":"0.12.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for shadow-hdk-linux-sandbox 0.38.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.