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. ...

September 18, 2026 · Janko

Sandbox your scripts without Docker: Rye’s zero-root unshare guardrails

When you paste a snippet or refactor a build script, you’re holding a sharp knife. In 2026 that knife is sometimes AI-sharpened. This post is about putting a guard on it—without paying the container tax. Rye now ships a lightweight sandbox based on Linux namespaces (aka “unshare”). It’s one flag, zero root, and integrates with Rye’s standard library so your script can detect and adapt to isolation. ...

September 18, 2026 · Janko

Some odd runtime safety features of Rye language

I didn’t set out to add “security features” to a scripting language. I wanted to stop shooting myself in the foot. These are the three levers I actually use on my laptop: Unshare — a quick shell over your script so it can’t see or phone the whole world Landlock — a polite wall that says “only touch these paths, please” Intents — a way to say “this is what I’m about to do” and then, in dry‑run, just rehearse it This isn’t a manifesto. It’s a couple of small habits that saved me from dumb mistakes. Here’s exactly how they work in Rye, and a few little stories of when they helped. ...

September 18, 2026 · Janko