Hi,
We identified unauthorized access to a legacy system that we were in the process of decommissioning. Third party provider keys (eg OpenAI, Anthropic) saved in your workspace may have been exposed. Please revoke and replace those keys through the relevant provider’s dashboard, update any applications using them, and review recent usage for unexpected activity.
We’re sorry this happened and will follow up with any updates.
it’s funny how no one ever announces their critical vulns with “we have been hacked, you should uninstall our software and use something else”, at some point in the severity of the vuln that should be the conclusion, but no one ever says it
> Beware of the author of tweet, who happens to be author of OpenCode - OpenCode will leak all your data to themselves and to shady 3rd parties. Author feigned ignorance and never fixed the issue. OpenCode among other harnesses is the shadiest of all.
This is one of the reasons I don't trust opencode. It looked very nice on paper when it first came out and there were no alternatives. However, today I'd probably stick with simple pi setup (not sure how much better than opencode, but it looks like they don't have all this cloud stuff) or just use one of the big tech agents and call it a day.
"when challenged about sending data to openrouter without listing it as a 3rd party processor they offered a dismissive response. the same with running prompts through cloudflare. seems trivial, but signifies general disinterest in security."
I did have an account but moved off for security reasons.
Why are the comments pointing out there were warning signs early on being downvoted/flagged?
I looked at the linked comments, and they seem valid. I mean I dont want to go full tinfoil hat here, but what's the deal? Some people just really like opencode or something?
Indeed. I've seen it happen before and it appears that they have automatic downvoting based on some criteria, possibly just some classifier. I've attributed it to some bot attack before, but it's a bit too common now.
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.
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.
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!
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
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.
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.
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!
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.
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.
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.
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.
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.
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.
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.
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
They might have spent next to 0 time actually 'hacking' - they may have just told Opencode to hack Opencode website and let it run for hours or days till it succeeded.
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?
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.
what’s interesting is that all those efforts that go into sandboxing through virtualization wouldn’t have helped here. But the solutions that proxy the api keys and hide them from agents might have worked as a defense in depth.
of course any sensible engineer that uninstalled this 6 months ago and used codex and claude code directly also avoided this, gg
What the the purpose of this comment? Neither of those "red flags" you linked to are related (one is about config loading precedence, and the other is about Codex CLI, which is completely a completely different product and development team.
Exterior-compliance proxies, yes, are a good thing; but are also completely unrelated to the fact that OpenCode's hosted solution, that requires having credentials in some fashion, was popped.
Shitting on anyone who uses OpenCode (rather than your preferred vendor-specific product) as not being "sensible" is also completely out of hand and unnecessary.
you login to their website, and you are presented with a list of providers where you can click and add your provider api key.
how the key is stored on the backend isn't clear, but it is akin to handing your password or if you know crypto, your private key, to someone and letting them store it for you.
from what i can tell, there are no links within the console to a ToS, Privacy policy or anything else. there are no warnings or documentation about how they store your keys.
someone else in this thread linked to this issue, but this comment is especially insane given that i can't find any privacy policy or tos for the console.
[OP] pranshuchittora | 4 hours ago
---
Hi, We identified unauthorized access to a legacy system that we were in the process of decommissioning. Third party provider keys (eg OpenAI, Anthropic) saved in your workspace may have been exposed. Please revoke and replace those keys through the relevant provider’s dashboard, update any applications using them, and review recent usage for unexpected activity.
We’re sorry this happened and will follow up with any updates.
sebastiansm7 | 3 hours ago
TZubiri | 2 hours ago
qlte | 57 minutes ago
This was a leak of keys added in a web UI
bewareofscams | 4 hours ago
Me, 68 days ago:
> Beware of the author of tweet, who happens to be author of OpenCode - OpenCode will leak all your data to themselves and to shady 3rd parties. Author feigned ignorance and never fixed the issue. OpenCode among other harnesses is the shadiest of all.
> https://github.com/anomalyco/opencode/issues/10416
lousken | 3 hours ago
neya | 3 hours ago
tadasv | 2 hours ago
lukewarm707 | 2 hours ago
I did have an account but moved off for security reasons.
fleshers | 4 hours ago
odo1242 | 3 hours ago
[OP] pranshuchittora | 3 hours ago
ipsum2 | 3 hours ago
vdfs | 3 hours ago
DavCreator | 4 hours ago
vinni2 | 4 hours ago
progval | 3 hours ago
dist-epoch | 3 hours ago
himata4113 | 3 hours ago
trollbridge | 2 hours ago
kelvinjps10 | 3 hours ago
preommr | 3 hours ago
I looked at the linked comments, and they seem valid. I mean I dont want to go full tinfoil hat here, but what's the deal? Some people just really like opencode or something?
jchw | 3 hours ago
himata4113 | 3 hours ago
dylan604 | 3 hours ago
himata4113 | 3 hours ago
c-hendricks | an hour ago
InsideOutSanta | an hour ago
jchw | 3 hours ago
hahajk | 3 hours ago
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 | 3 hours ago
[OP] pranshuchittora | 3 hours ago
ShowalkKama | 3 hours ago
yorwba | 3 hours ago
[OP] pranshuchittora | 3 hours ago
senordevnyc | 3 hours ago
[OP] pranshuchittora | 2 hours ago
xendo | 2 hours ago
throwoutway | 54 minutes ago
_fw | 42 minutes ago
an0malous | 42 minutes ago
Barbing | 10 minutes ago
trollbridge | 2 hours ago
tekacs | an hour ago
an0malous | 46 minutes ago
verbo_villain | 3 hours ago
[OP] pranshuchittora | 2 hours ago
jprokay13 | 2 hours ago
oldfuture | 3 hours ago
that's why virustotal was flagging it then
ameliaquining | 3 hours ago
Ciantic | 3 hours ago
Tiberium | 3 hours ago
https://docs.github.com/en/code-security/reference/secret-se... has a table with the active partners
Ciantic | 3 hours ago
ameliaquining | 3 hours ago
orf | an hour ago
flaunf221 | an hour ago
orf | an hour ago
flaunf221 | an hour ago
max__dev | an hour ago
orf | an hour ago
shepherdjerred | an hour ago
orf | an hour ago
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?
djchen | 3 hours ago
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
MisterMunchkin | 3 hours ago
nacs | 3 hours ago
[OP] pranshuchittora | 2 hours ago
qlte | 53 minutes ago
computerex | 3 hours ago
[OP] pranshuchittora | 3 hours ago
ameliaquining | 3 hours ago
InsideOutSanta | 2 hours ago
rvz | 3 hours ago
[OP] pranshuchittora | 2 hours ago
monster_truck | 3 hours ago
The way some of this place's employees post and act online, can't say I feel all that bad.
searealist | 3 hours ago
> related to a large scale distillation attack
I'm not sure how this adds up. I could understand if this impacted their uptime, but not security.
Are they actually saying a bunch of credentials were stolen and are being used for distillation?
[OP] pranshuchittora | 2 hours ago
thway15269037 | 2 hours ago
bakugo | 2 hours ago
9021007 | 2 hours ago
yipinwong | 2 hours ago
[OP] pranshuchittora | 2 hours ago
TZubiri | 2 hours ago
https://news.ycombinator.com/item?id=50075319
https://news.ycombinator.com/item?id=50060694
what’s interesting is that all those efforts that go into sandboxing through virtualization wouldn’t have helped here. But the solutions that proxy the api keys and hide them from agents might have worked as a defense in depth.
of course any sensible engineer that uninstalled this 6 months ago and used codex and claude code directly also avoided this, gg
nrmitchi | an hour ago
Exterior-compliance proxies, yes, are a good thing; but are also completely unrelated to the fact that OpenCode's hosted solution, that requires having credentials in some fashion, was popped.
Shitting on anyone who uses OpenCode (rather than your preferred vendor-specific product) as not being "sensible" is also completely out of hand and unnecessary.
latchkey | 2 hours ago
you login to their website, and you are presented with a list of providers where you can click and add your provider api key.
how the key is stored on the backend isn't clear, but it is akin to handing your password or if you know crypto, your private key, to someone and letting them store it for you.
from what i can tell, there are no links within the console to a ToS, Privacy policy or anything else. there are no warnings or documentation about how they store your keys.
someone else in this thread linked to this issue, but this comment is especially insane given that i can't find any privacy policy or tos for the console.
https://github.com/anomalyco/opencode/issues/10416#issuecomm...
InsideOutSanta | an hour ago
latchkey | an hour ago
rozenmd | an hour ago
The opencode CLI has no impact.
Rapzid | an hour ago
qlte | an hour ago
hypfer | 59 minutes ago
It's not like there wouldn't be any other harnesses either. Just switch to literally anything else please.
ssernikk | 55 minutes ago
zephiel7 | 9 minutes ago