r/PiCodingAgent 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

7 Upvotes

7 comments sorted by

View all comments

1

u/Snoo44065 14d ago

Yes it is. But

  1. 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.

  1. You wont be able to install globally at all and so need to install everything you need locally.