Practical Runtime Safety in Rye: Unshare, Landlock, and Intents
I didn’t set out to build a security framework for a scripting language; I just wanted to stop shooting myself in the foot. When running random scripts locally or in CI, safety comes down to three basic mechanisms: Namespaces (unshare) — A kernel wrapper that strips network access and hides the rest of your filesystem. Landlock — An unprivileged, process-level allowlist that restricts filesystem writes to specific directories. Intents (dry-run) — An application-level pattern to declare and rehearse side effects without executing them. These tools aren’t a grand manifesto. They are small habits that turn risky local scripts into safe defaults. Here is how they work in Rye, how they compose, and where they save you. ...