logoalt Hacker News

fred_tandemaiyesterday at 11:14 PM4 repliesview on HN

Anyone managed to run pi in a completely sandboxed environment? It can only access the cwd and subdirectories


Replies

ac29today at 1:07 AM

Yeah I wrote a small landlock wrapper using go-landlock to sandbox pi that works well (not public, similar projects are landrun and nono).

Note that if you sandbox to literally just the working directly, pi itself wont run since pretty much every linux application needs to be able to read from /usr and /etc

fjkyesterday at 11:27 PM

I’ve been tinkering with Gondolin, a micro-vm agent sandbox.

Here’s an example config: https://github.com/earendil-works/gondolin/blob/main/host/ex...

monkey26yesterday at 11:42 PM

I do this with an extension. I run all bash tools with bwrap and ACLs for the write and edit tools. Serves my purposes. Opens up access to other required directories, at least for git and rust.

I think I published it. Check the pi package page.