Skip to main content

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 --root for workspace-write and nowhere for read-only; the null, zero, full, random, urandom, tty, ptmx and pts devices writable in both modes, because devices are not files (git opens /dev/null read-write at startup); TCP bind and connect handled and denied where the kernel has it (ABI 4+).
  • seccomp: socket() with any domain but AF_UNIX fails with EPERM, and so does io_uring_setup — io_uring can open and connect sockets without a socket syscall, so a filter that stopped at socket would 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.44.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for shadow-hdk-linux-sandbox 0.44.0
File Size Uploaded Provenance Actions
shadow_hdk_linux_sandbox-0.44.0.tar.gz 13.8 kB Without provenance Details for shadow_hdk_linux_sandbox-0.44.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for shadow-hdk-linux-sandbox 0.44.0
File Actions
shadow_hdk_linux_sandbox-0.44.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.44.0-py3-none-musllinux_1_2_x86_64.whl
shadow_hdk_linux_sandbox-0.44.0-py3-none-musllinux_1_2_aarch64.whl Python 3 none Linux musl 1.2+ ARM64 Details for shadow_hdk_linux_sandbox-0.44.0-py3-none-musllinux_1_2_aarch64.whl
shadow_hdk_linux_sandbox-0.44.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.44.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
shadow_hdk_linux_sandbox-0.44.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.44.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Total release size: 853.2 kB

Release files / shadow_hdk_linux_sandbox-0.44.0.tar.gz

Download URL shadow_hdk_linux_sandbox-0.44.0.tar.gz
Size 13.8 kB
Tags Source
SHA-256 checksum
How to use checksums
546679e49805596792f8f60776b0a9fc585373165079147bbf422b4ca283e528
BLAKE2b-256 checksum
How to use checksums
809e65a870ae181a88a67e74c64c80b403e7ce56e57a9c52931e37e1d1e49ca0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.22 {"installer":{"name":"uv","version":"0.12.22","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.44.0-py3-none-musllinux_1_2_x86_64.whl

Download URL shadow_hdk_linux_sandbox-0.44.0-py3-none-musllinux_1_2_x86_64.whl
Size 237.6 kB
Tags Linux musl 1.2+ x86-64 Python 3
SHA-256 checksum
How to use checksums
6fc7a203b70854f601b074cfd3d96f0d660df7fa83ebbf451ef9cee3702b141b
BLAKE2b-256 checksum
How to use checksums
7523b353f1b4ed499cc1b47c2dcbe64d74c61729f887dcb7c2ee0b69d3d340e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.22 {"installer":{"name":"uv","version":"0.12.22","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.44.0-py3-none-musllinux_1_2_aarch64.whl

Download URL shadow_hdk_linux_sandbox-0.44.0-py3-none-musllinux_1_2_aarch64.whl
Size 228.7 kB
Tags Linux musl 1.2+ ARM64 Python 3
SHA-256 checksum
How to use checksums
4621e8f16ef1784afff7409113946f3d97968d68110ade8acdb02bc14355a4af
BLAKE2b-256 checksum
How to use checksums
89cdc9772cad0f65be39d8cbe53f5d50351e63ba91ad742b90664e208beda06b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.22 {"installer":{"name":"uv","version":"0.12.22","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.44.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL shadow_hdk_linux_sandbox-0.44.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 190.3 kB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
c678ee93200a737f87a98b3d4c27c7dda0a60e354ffaf38cf69780fbfb99272f
BLAKE2b-256 checksum
How to use checksums
f37252b6e8716018d3fae5727fde392984e2251efb60e5daa742193564ef60ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.22 {"installer":{"name":"uv","version":"0.12.22","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.44.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL shadow_hdk_linux_sandbox-0.44.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 182.7 kB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
4246e2dd93890a2b5b81038a0f1b7e26e41b7d9e69d77b60af0e76d12d719e53
BLAKE2b-256 checksum
How to use checksums
89b3248c3763e942d293f7421db86db2749bcf77aac63d58a2360821a67d09a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.22 {"installer":{"name":"uv","version":"0.12.22","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.44.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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page