Top
Best
New

Posted by pranshuchittora 4 hours ago

OpenCode Hacked: User credentials leaked(twitter.com)
548 points | 91 comments
pranshuchittora 3 hours ago|
I am the author of this post. Looks like OpenCode fans / team is not happy with this post coming on the first page of HN. It has already been flagged by many. I never ask for upvotes, but would be great if you can upvote it. Thanks!
ShowalkKama 3 hours ago||
The title should say "OpenCode Console" not "OpenCode".
an0malous 22 minutes ago|||
Oh they’re a YC company: https://www.ycombinator.com/companies/opencode
yorwba 2 hours ago|||
How did you determine that it has been "flagged by many"?
pranshuchittora 2 hours ago|||
The post was visible when I am logged in. But when I opened the /newest page on incognito the post wasn't there.
senordevnyc 2 hours ago||
It’s #14 on homepage when not logged in, same as when logged in.
pranshuchittora 2 hours ago||
Now it is
xendo 1 hour ago|||
It's clearly heavily down voted, just look at when it was added, how many points it has and its relative position.
throwoutway 29 minutes ago||
You cant downvote HN posts (comments you can)
an0malous 17 minutes ago|||
They presumably meant that it’s been downranked relative to what you’d expect from a post with that many upvotes in that short of a time frame. Hundreds of upvotes in a few hours is usually a top 5 post
_fw 17 minutes ago|||
Afaik flagging acts like a super-downvote as far as the algorithm is concerned
trollbridge 2 hours ago||
Then next time do a less clickbait-y title: OpenCode had a leak of API keys for their service that is similar to OpenRouter; this does not affect most users.
tekacs 1 hour ago||
It's a little more than that. It seems that keys for OpenAI / Anthropic APIs that were STORED on OpenCode's OpenRouter-like backend got leaked – which additionally means that OpenCode has no ability to refund people for their losses.
Ciantic 3 hours ago||
I think every API key system should have endpoint "invalidate_api_key" this way whitehat hackers or the party who stored them could invalidate all keys in the case they leak. Now it is race against the time, and everybody got email, and everyone must act themselves.
Tiberium 3 hours ago||
It actually is a thing, although indirectly in a hacky way! If you push keys from GitHub secret scanning partners to a public repo or a gist, they get sent to the partner who (usually) instantly revoke them. So if you want to help someone, just make a public gist with the key and delete it like 15 seconds later, it'll be enough.

https://docs.github.com/en/code-security/reference/secret-se... has a table with the active partners

Ciantic 3 hours ago||
Only responsible thing in this case would have been for OpenCode people to invalidate all keys. But I guess it is not that straightforward if Anthropic/OpenAI etc don't have endpoint for it.
ameliaquining 2 hours ago||
There's no self-serve endpoint, but OpenCode could send the inference providers the leaked keys and ask for them to be revoked, which is a thing the inference providers can do. It's possible that this'll happen, apparently remediation is still in progress.
orf 1 hour ago||
That just turns a credential leak into a denial of service - one that can be triggered from anywhere.
shepherdjerred 45 minutes ago|||
In this case you'd probably prefer your key to be disabled rather than spending $$$ on tokens for everyone else
orf 42 minutes ago||
Think that through - the person who stole the key has the decision to use it or revoke it through this hypothetical system.

If they are acting maliciously, they will take the choice that most hurts you and/or benefits them.

If the key is useless to them and revoking it hurts you, then they would do that.

If the key wasn’t useless to them, then… they would just use it and not revoke it?

flaunf221 1 hour ago||||
Not any more than any other public endpoint service exposes. This revocation endpoint can be protected by auth too. Use API key that you're revoking in auth.
orf 57 minutes ago||
How does that make any sense?
flaunf221 49 minutes ago||
I see now from another comment you thought about denial of service for service that leaked key. And I thought about mass leak resulting in DDOS onto API provider. Wrong guess from me.
max__dev 1 hour ago|||
Yes. Is this a bad thing?
orf 58 minutes ago||
Of course it is? A key for some weather API getting leaked isn’t the end of the world, but having it revoked and breaking your weather app is.
computerex 2 hours ago||
Why are my API keys in the workspace exposed? Does OpenCode send my API keys to their backend servers??? Was this a supply chain attack that infected the opencode program itself? What is going on?
ameliaquining 2 hours ago||
If you use the hosted OpenCode Console and bring your own API keys, then they'd have your keys on their backend servers.
InsideOutSanta 1 hour ago|||
The announcement is needlessly confusing, but if you only use the CLI, you're not affected. There is no supply chain attack.
pranshuchittora 2 hours ago||
They need to explain this, by releasing a detailed RCA.
djchen 3 hours ago||
Is my understanding correct that this only affected some OpenCode Zen users who stored their (BYOK) API keys from Anthropic/Google/OpenAI?

In essence they used OpenCode Zen similar to OpenRouter, where you can BYOK or use theirs and be charged token rates.

nightpool 3 hours ago|
That's the only known impact so far. But we don't know the details of how these keys were exposed, so it's not entirely clear why or how "only keys" might have been affected
jchw 3 hours ago||
I don't use OpenCode but I would like to know who this impacts. Surely people who are just using OpenCode locally with their own credentials wouldn't be impacted, right? This sounds like something where you have a hosted service and you put your keys into that. Not saying this isn't bad, but it isn't clear and they're not sharing any information.
hahajk 3 hours ago||
This appears to affect users of Opencode Console, which appears to be an Openrouter-type thing?

https://dev.opencode.ai/console/

It's actually kinda hard to figure out what it is. But it does appear to be different that the CLI

From https://opencode.ai/v2/docs#connect :

> If you’d like easy access to all the best coding models you can try out OpenCode Console.

neya 2 hours ago||
Turns out even if you used credentials locally, you could've have been impacted as the .env files were also consumed by the agents. This is from some comments on Reddit / Google, so take it with a grain of salt.
oldfuture 3 hours ago||
https://news.ycombinator.com/item?id=50108261

that's why virustotal was flagging it then

ameliaquining 2 hours ago|
It sounds like only a hosted service was compromised, not the open source OpenCode binary that users run on their own machines. So this wouldn't explain that.
monster_truck 2 hours ago||
Wait, is the openchode hack the cause of all the people complaining about their OAI usage getting drained/vanishing at alarming rates? That's pretty funny ngl.

The way some of this place's employees post and act online, can't say I feel all that bad.

fleshers 3 hours ago||
I’m a bit confused by the wording here, does it mean the credentials were hacked and then used to perform a mass distillation campaign?
pranshuchittora 3 hours ago||
It triggers me when these companies think that users are fool. I would have appreciated them, if they have disclosed things more transparently.
ipsum2 3 hours ago|||
"mass distillation campaign" there's no public evidence of this. I wonder what OpenCode/Anomaly has, would be an interesting postmortem.
vdfs 2 hours ago|||
Obviously they don't want to share details because it's ongoing
odo1242 3 hours ago|||
Yes
pranshuchittora 3 hours ago||
[dead]
rozenmd 59 minutes ago||
@dang this title needs updating: "OpenCode Console hacked: User credentials leaked"

The opencode CLI has no impact.

Rapzid 57 minutes ago|
It doesn't say the CLI was hacked does it?
qlte 39 minutes ago|||
OpenCode = OpenCode CLI to most people (as seen in the dozens of comments making that assumption in this thread)
verbo_villain 3 hours ago|
So are people going to wake up and see their Anthropic, openAI, etc accounts drained?
jprokay13 1 hour ago||
I saw the email this morning from OpenCode about my key being compromised alongside an email from Anthropic stating that I used up my $20 in API credits for the month. I hope they built something cool with those tokens!
pranshuchittora 2 hours ago||
Yes
More comments...