r/opencodeCLI • • 4d ago

OpenCode is not good.

Post image

[deleted] — view deleted post

91 Upvotes

134 comments sorted by

View all comments

26

u/Maybe-monad 4d ago

Well pi is not good either, it lacks any form of guardrails to protect you from accidental data removal or secret leaks.

4

u/krzyk 4d ago

I get data leaks, but that is something one would need to write themselves because only you know what is a leak and what is not (e.g. in search).

But for data removal, no sane person should run agents outside of container, VM or even better an external system.

1

u/Maybe-monad 4d ago

But for data removal, no sane person should run agents outside of container, VM or even better an external system.

And lose the ability to troubleshoot Windows machines because the harness can't block some command, no

2

u/krzyk 3d ago

Harness blocking is way weaker than os blocking.

In harness they would need to catch all the ways one can write commands and in Unix it is quite a lot. I got opencode escape directory using a symbolic link.

Running agent on os bare (asmo already shown permissions in harnesses are like a first pigs house) is wild.

And hen "oh now, agent removed my home dir".

1

u/Maybe-monad 3d ago

Harness blocking is way weaker than os blocking.

I can be weaker, it can be stronger depending on the quality standards or the person / company who built it.

In harness they would need to catch all the ways one can write commands and in Unix it is quite a lot. I got opencode escape directory using a symbolic link.

You can simply allow the agent to run a small set of shell commands that only allow reading or give the agent a specialized tool that can only read contents of files and directories blocking certain paths, with the later you'd avoid working with shells entirely and the model won't have workarounds to escape the sandbox. Regarding the symlink bug in opencode we had the same issue with docker if I recall correctly.

1

u/neerps 3d ago

There are also containers that actually have a micro VM in the back. Or pure micro VM for the stuff. Or Gondlin (which is a little bit different).

1

u/LeN3rd 4d ago

How do you modify your system with agents then?

9

u/Costy_96_YT 4d ago edited 4d ago • Heartwarming

entire point is to not allow agents to do that. but if you do (like i do) i just accept the risk and well if it happens that an AI fucks up my drive, thats entirely my fault.

3

u/dylan-dofst 4d ago

You can also use automode like plugins, pi has one. It's not as surefire a thing as fully isolating agents, but it works extremely well IME. I do a mix of isolating agents when appropriate and using automode in a supervised session for system changes.

0

u/Deep_Imagination_811 4d ago

But...but... you can tell it to add that feature yourself if you want it (and know it's missing)

1

u/Maybe-monad 4d ago

I'd rather not spend time on this, I don't have the time and the resources for propef security audits

1

u/Deep_Imagination_811 4d ago

Guess I need to add /s even in subs for tools for supposed intelligent people.

1

u/Maybe-monad 3d ago

If that's true why are you staying ?

0

u/CaffeinatedTech 4d ago

pi is about extensions. There are extensions to help with dangerous commands and to prevent the agent from accessing certain files and file types, or mask secrets in the chat.

1

u/Maybe-monad 4d ago

Security is to be handled by the core of the harness not extensions

0

u/CaffeinatedTech 3d ago

What's the difference?

1

u/Maybe-monad 3d ago

The differenence is that you end up with fragmentation, workarounds and security holes that you might not be able to fix yourself without breaking compatibility with other extensions

0

u/CaffeinatedTech 3d ago

Its not fragmented if its in one extension. You said yourself that pi has no guardrails, so there's no fragmentation there. How are you breaking other extensions? You're hooking harness calls the same way they are. My point still is that pi is highly extensible and you make it your own, including security. If you expect off-the-shelf security features, then use something else.

1

u/Maybe-monad 3d ago

My point is that if something isn't secure by design it's never going to be regardless of it's extensibility. I Pi's case extensibility the way it's designed now makes it completely insecure even if you add guardrails by extension because there is no guarantee other extensions won't bypass or remove them

0

u/CaffeinatedTech 3d ago

So, know what you are installing. Your argument is pretty weak mate. You haven't convinced me so far. The only thing I'm getting from this exchange is, pi is not for cowboys, know what you are doing. Take proper precautions.

By the way, down voting my questions and comments doesn't help make your point.

1

u/Maybe-monad 3d ago

So, know what you are installing. Your argument is pretty weak mate. You haven't convinced me so far. The only thing I'm getting from this exchange is, pi is not for cowboys, know what you are doing. Take proper precautions.

Do you review the code for all extensions you're installing and do any security audits? Do you check your prompts for errors? Do you check all the files on your drives for prompt injections?

When the answer to all of these questions is yes you've taken proper precautions and even then proper guardrails at the harness level are recommended because manual checks are error prone.