BubbleWrap your dev env and agents

14 points by dpc_pw


altano

This is baked into Claude Code fwiw: https://code.claude.com/docs/en/sandboxing#os-level-enforcement (Seatbelt on macOS and BubbleWrap on Linux).

I've been playing with the sandboxing and it sort of works. The network isolation is too restrictive, since it works by domain. I can't allow ssh to hit an IP, for example. But you can add escape hatches for some commands, and then those don't go through the sandbox.

I used to carefully read every single command before executing and now I can be a little more cavalier. Not a lot more cavalier, mind you, since there are still lots of dangerous network operations claude could execute to mess up my remote systems. But if something is just reading or writing to my local system I can blindly accept with confidence knowing that it can only do so within the parameters of my sandbox.

vbernat

I am using something similar: https://github.com/vincentbernat/zshrc/blob/master/rc/alias.zsh#L182. I am still wondering if there is something less "opt-in" for isolation, maybe SELinux, but with less hassle.

MatheusRich

Related: ai-jail

ashishb

bubblewrap does not work on Mac OS. sandbox-exec has been deprecated

$ man sandbox-exec
SANDBOX-EXEC(1)                                   General Commands Manual                                   SANDBOX-EXEC(1)

NAME
     sandbox-exec – execute within a sandbox (DEPRECATED)