r/opencodeCLI • • Oct 13 '26

Security: OpenCode does not ask for file exploration by default anymore

I only noticed when I realized the agent looking at files it didn't ask to have access.
As far as I could tell that changes came with 2.0.25 but no one bothered warning users it seems.

There has been a bug opened for days already: https://github.com/anomalyco/opencode/issues/54524

This is a good reminder to not trust any of these companies writing harnesses and add your own security on top of whatever they might offer.

26 Upvotes

6 comments sorted by

3

u/qqYn7PIE57zkf6kn Oct 13 '26

add your own security on top of whatever they might offer.

do you have suggestions for that

3

u/geearf Oct 13 '26

Here are some ideas, but you'll have to look into it and decide what's appropriate for you:

AppArmor, bwrap, different user for OpenCode, systemd hardening, containers like Docker, a full VM, etc.

Certain things I don't know how to tighten outside of OpenCode though, like OpenCode needs access to the providers keys to access models, but the models themselves should never access those keys. You can try to block that with permissions in OpenCode but that means trusting OpenCode on this... Alas if there's no other way, a janky one is still better than none.

1

u/neerps Oct 18 '26

Docker with Kata container's backend at least if you want more isolation. Because there are runnc related vulnerabilities.

9

u/szxdfgzxcv Oct 13 '26

What the fuck, whats the use of even having permissions at that point then. Also completely silently changing permissions to opt-in from opt-out seems insane.

3

u/geearf Oct 13 '26

Absolutely agreed!

Personally I lost trust in the platform, but to be fair, I was a fool to trust the opt-out when I could have made it clear in the config.

1

u/batmanButthole Oct 17 '26

What alternatives are there to opencode TUI?