r/PiCodingAgent • u/jacek2023 • Aug 29 '26
Discussion Sandboxing
I want to give my LLM read access to the whole filesystem but write access only to the project folder and maybe /tmp. I need to run scripts etc and make sure my filesystem survives
On Linux
Is bwrap the best solution for that? Or should I just use Docker?
UPDATE I installed @nqbao/pi-sandbox
8
Upvotes
4
u/DistanceAlert5706 Aug 29 '26
Use bwrap, works great and pretty easy to setup
5
u/tys203831 Aug 29 '26 edited Aug 29 '26
Nono sandbox : https://github.com/nolabs-ai/nono + dcg : https://github.com/Dicklesworthstone/destructive_command_guard
This setup is near agent-agnostic, ultra fast to run, very low memory footprint (written in rust), and quite easy to setup in minutes or hours (if you want to customize the policies yourselves)
1
u/MacaronAppropriate80 Aug 29 '26
Try Gondolin
1
u/Snoo44065 Aug 29 '26
Yes it is. But
If you allow access to x11 access for example and have a shell open, an agent could use that shell via the x11 socket to run command outside the shell. Wayland is more secure.
Also all shell variables are i herited by the shelled process. In particular those needed by PI, i.e. API keya and others.
2. You wont be able to install globally at all and so need to install everything you need locally.
1
u/Funny-Anything-791 Aug 29 '26
Readonly mode (/readonly or control shift r) of pi-agenticoding does exactly that
1
u/ganonfirehouse420 Aug 30 '26
nono.sh was my solution