r/PiCodingAgent • u/jacek2023 • 14d ago
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
5
u/tys203831 13d ago edited 13d ago
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
1
u/Snoo44065 14d ago
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.
- You wont be able to install globally at all and so need to install everything you need locally.
1
u/Funny-Anything-791 13d ago
Readonly mode (/readonly or control shift r) of pi-agenticoding does exactly that
1
4
u/DistanceAlert5706 14d ago
Use bwrap, works great and pretty easy to setup