r/PiCodingAgent • u/wooptoo • Oct 10 '26
Resource Sandboxing Pi: Bubblewrap vs Podman - quick tutorial
Hey everyone, I put together a quick tutorial on sandboxing Pi using Bubblewrap vs Podman.
It includes a few sample scripts and a comparison between the two approaches.
https://wooptoo.com/blog/pi-sandbox-bubblewrap-podman/
Hopefully somebody here will find it useful.
All the best!
34
Upvotes
3
u/riversiderain Oct 16 '26
I've been thinking about this topic lately, but as I understand, bwrap and Podman (even rootless) do not properly sandbox to the extent that, say, would protect against untrusted arbitrary code, because it still shares the same kernels. I think that's a big reason why a lot of people are aiming for ephemeral vms like Firecracker. Of course that comes with higher RAM overhead, but also with the benefit of RAM snapshots, where as containers must always coldstart.
6
u/pilibitti Oct 10 '26 edited Oct 11 '26
on mac agent-safehouse works very well. you just run pi with `safehouse pi` and it has a preset for pi already that it autodetects with sensible defaults (current directory allowed, pi code, docs allowed, temp folders allowed etc.) and works without hassle. many other services (like maybe you need agent-browser?) is just one --enable away. it is os level sandboxing (so things executed through pi can't bypass it, there is no trivial bypass) as well so for mac highly recommended.
2
u/Obvious-Variation-38 Oct 11 '26
I use Sandbox-exec it a native mac sandbox
2
u/Murky-Abalone-9090 Oct 11 '26
I use Nvidia openshell for this
-2
u/Prior-Excitement-147 Oct 11 '26
Tu devrais probablement lancer bwrap avec env -i, sinon, les variables d'env de ta session courante sont visibles dans /proc/1/environ.