by sburud · 1w ago · 0 comments
I think you're looking at it wrong. I run opencode itself inside bwrap (atop other layers) so anything it runs it's already sandboxed.
So I figured it’d make sense to lock down code execution within each Location (the internal name for worktree-like things) and rely on the permission system to ask me when the LLM wants to do stuff outside the Location through other channels than the shell tool.
Locking down the shell tool correctly only took a moment, but I really wasn’t prepared for the whack-a-mole exercise of stamping out all the other ways an LLM can execute arbitrary code without confirmation through other opencode features. And I don’t trust the next update not to introduce new ones.