Introducing Process Sandboxing for mise exec and mise run #8878
jdx
announced in
Announcements
Replies: 1 comment
-
|
Cool |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
We now have process sandboxing for
mise execandmise run— a lightweight way to restrict what your tasks and scripts can access, with no Docker required and minimal overhead.This feature shipped in v2026.4.2 (with a build fix in v2026.4.3) and is available now as an experimental feature.
What is it?
Process sandboxing lets you lock down filesystem reads/writes, network access, and environment variable inheritance for any command run through
mise xormise run. It uses native OS primitives — no containers, no VMs, no extra dependencies.sandbox-exec(Seatbelt) with generated profiles, including per-host network filteringQuick Start
Enable experimental mode, then use
--deny-*and--allow-*flags:Task-Level Sandboxing
You can declare sandbox permissions directly in your
mise.tomltasks:CLI flags override task-level config, so you can tighten or loosen restrictions on the fly.
Using Sandboxing with Claude Code
Sandboxing pairs well with Claude Code for restricting what AI-generated commands can do. You can define sandboxed tasks in your
mise.tomlthat Claude Code executes, or use Claude Code's hooks to wrapmise runinvocations with sandbox flags:This gives you confidence that even if an AI agent runs a build or script, it can't make unexpected network calls or write outside designated directories.
CLI Flags
--deny-all--deny-read--deny-write/tmp)--deny-net--deny-envPATH,HOME,USER,SHELL,TERM,LANGpass through)--allow-read=<path>--allow-write=<path>--allow-net=<host>--allow-env=<var>Smart Defaults
When filesystem restrictions are active, mise automatically keeps essential paths accessible so your tools still work:
/usr,/lib,/bin, etc.) remain readable~/.local/share/mise/installs/...) remain readable/tmpremains writable--allow-writepaths are implicitly readablePlatform Support
--allow-net=<host>)On older Linux kernels without Landlock support, a warning is printed and the command runs unsandboxed. Windows is not currently supported.
Use Cases
Documentation: Sandboxing Guide
PR: #8845
This post was generated by Claude Code.
Beta Was this translation helpful? Give feedback.
All reactions