Live data from Hacker News

Unauthenticated remote code execution in OpenCode

cy.md

141–150 of 155 posts

Re: Unauthenticated remote code execution in OpenCode

#141
post #72

Earlier quoted context omitted.

Hi. > Please run at least a dev-container or a VM for the tools. I would like to know how to do this. Could you share your favorite how-to?

>> Please run at least a dev-container or a VM for the tools. > I would like to know how to do this. Could you share your favorite how-to? See: https://www.docker.com/get-started/ EDIT: Perhaps you are more interested in various sandboxing options. If so, the following may be of interest: https://news.ycombinator.com/item?id=46595393

Note that while containers can be leveraged to run processes at lower privilege levels, they are not secure by default, and actually run at elevated privileges compared to normal processes.

Make sure the agent cannot launch containers and that you are switching users and dropping privileges.

On a Mac you are running a VM machine that helps, but on Linux it is the user that is responsible for constraints, and by default it is trivial to bypass.

Containers have been fairly successful for security because the most popular images have been leveraging traditional co-hosting methods, like nginx dropping root etc…

By themselves without actively doing the same they are not a security feature.

While there are some reactive defaults, Docker places the responsibility for dropping privileges on the user and image. Just launching a container is security through obscurity.

It can be a powerful tool to improve security posture, but don’t expect it by default.

Re: Unauthenticated remote code execution in OpenCode

#142
post #4

hey maintainer here we've done a poor job handling these security reports, usage has grown rapidly and we're overwhelmed with issues we're meeting with some people this week to advise us on how to handle this better, get a bug bounty program funded and have some audits done

I don't know much about your product, but I have to say that hearing this kind of blunt communication is really refreshing

Re: Unauthenticated remote code execution in OpenCode

#143
Running a non deterministic model in your terminal, allowing it to run whatever commands it wants always seemed like such a fucking stupid thing to do to me. How can people just wing it, let alone when production code is involved is just baffling to me. 0 concern about security.

Re: Unauthenticated remote code execution in OpenCode

#145
post #103

Earlier quoted context omitted.

would an LLM have a favourite tool? I'm sure it'll answer, but would it be from personal experience?

I checked with Gemini 3 Fast and it provided instructions on how to set up a Dev Container or VM. It recommended a Dev Container and gave step-by-step instructions. It also mentioned VMs like VirtualBox and VMWare and recommended best practices. This is exactly what I would have expected from an expert. Is this not what you are getting? My broader question is: if someone is asking for instructions for setting up a lo…

the llm will comment on the average case. when we ask a person for a favourite tool, we expect anecdotes about their own experience - I liked x, but when I tried to do y, it gave me z issues because y is an unusual requirement.

when the question is asked on an open forum, we expect to get n such answers and sometimes we'll recognise our own needs in one or two of them that wouldn't be covered by the median case.

does that make sense?

Re: Unauthenticated remote code execution in OpenCode

#146
post #4

hey maintainer here we've done a poor job handling these security reports, usage has grown rapidly and we're overwhelmed with issues we're meeting with some people this week to advise us on how to handle this better, get a bug bounty program funded and have some audits done

My original message was more positive but after more looking into context, I am a bit more pessimistic. Now I must admit though that I am little concerned by the fact that the vulnerability reporters tried multiple times to contact you but till no avail. This is not a good look at all and I hope you can fix it asap as you mention I respect dax from the days of SST framework but this is genuinely such a bad look espec…

They are a small team and tool has gotten wildly popular. Which is not to say that slowing down and addressing quality and security issues would not be a bad idea.

I’ve been an active user of opencode for 7-8 months now, really like the tool, but beginning to get a feeling that the core team’s idea of keeping the core development to themselves is not going to scale any longer.

Really loving opencode though!

Re: Unauthenticated remote code execution in OpenCode

#147
post #110

Earlier quoted context omitted.

I don't understand what is being encouraged here. Something is seriously wrong when we say "hey, respect!" to a company who develops an unauthenticated RCE feature that should glaringly shine [0] during any internal security analysis, on software that they are licensing in exchange for money [1], and then fumble and drop the ball on security reports when someone does their due diligence for them. If this company want…

I’ve noticed this a lot with startup culture. It’s like an unwritten rule to only praise each other because to give honest criticism invites people to do the same to you and too much criticism will halt the gravy train.

I've struggled a bit on this: LinkedIn's positivity echo chamber vs. the negativity-rewarding dunk culture here. No greater power exists on HN than critical thinking using techno-logic in a negative direction, revenue and growth be damned.

Opencode don't have to maintain Zen for so cheaply. I don't have to say anything positive nor encouraging, just like I don't have to sh!t on youtuber 'maintainers' to promise incredible open source efforts which do more to prove they should stick to videos rather than dev. Idk. Not exactly encouraging me to comment at effing all if any positivity or encouragement is responded with the usual "hm idk coach better check yoself" ya honestly I think i know exactly what to do

Re: Unauthenticated remote code execution in OpenCode

#148
post #145

Earlier quoted context omitted.

I checked with Gemini 3 Fast and it provided instructions on how to set up a Dev Container or VM. It recommended a Dev Container and gave step-by-step instructions. It also mentioned VMs like VirtualBox and VMWare and recommended best practices. This is exactly what I would have expected from an expert. Is this not what you are getting? My broader question is: if someone is asking for instructions for setting up a lo…

the llm will comment on the average case. when we ask a person for a favourite tool, we expect anecdotes about their own experience - I liked x, but when I tried to do y, it gave me z issues because y is an unusual requirement. when the question is asked on an open forum, we expect to get n such answers and sometimes we'll recognise our own needs in one or two of them that wouldn't be covered by the median case. does…

> when we ask a person for a favourite tool

I think you're focusing too much on the word 'favourite' and not enough on the fact that they didn't actually ask for a favourite tool. They asked for a favourite how-to for using the suggested options, a Dev Container or a VM. I think before asking this question, if a person is (demonstrably in this case) into LLMs, it should be reasonable for them to ask an LLM first. The options are already given. It's not difficult to form a prompt that can make a reasonable LLM give a reasonable answer.

There aren't that many ways to run a Dev Container or VM. Everyone is not special and different, just follow the recommended and common security best practices.

Re: Unauthenticated remote code execution in OpenCode

#150
post #70

This doesn't actually seem that bad to me? Browsers don't let random pages on the internet hit localhost without prompting you anymore so it's not like a random website could RCE you unless you're running an old browser—and at that point that's the browser's fault for letting web pages out of the sandbox. You shouldn't have to protect localhost from getting hit with random public websites. The rest is just code runni…

> Browsers don't let random pages on the internet hit localhost without prompting you anymore No, that's a Chrome-specific feature that Google added. It is not part of any standard, and does not exist in other browsers (e.g. Safari and Firefox). > The rest is just code running as your user can talk to code running as your user No, that assumes that there is only a single user on the machine, and there are either no f…

Huh? I have this permission in Firefox right now. It looks like Safari handles this with the OS local network permission.

True I did assume machines are single user, I haven't seen a shared computer in ages. Doing local development I have insecure/incomplete software listening on localhost all the time while developing it. And lots of people have passwordless sudo, or unprivileged access to the docker socket so protection against local processes running as me is not part of my threat model. And I know this is pretty dev centric but OpenCode is dev centric as well.

Post reply on HN