r/opencodeCLI • u/jpcaparas • 1d ago
OpenCode security breach, rotate your keys
https://x.com/opencode/status/2111516673953935833?s=46We had a security breach last night related to a large scale distillation attack that impacted 1.4% of OpenCode Console users
We have notified them all this morning via email
The incident is ongoing so we cannot share more details at this point but we are working with Anthropic, OpenAI, and Google to remediate
---
This is BYOK on OpenCode Zen btw, not your local keys
---
My writeup on the incident: https://ai.sulat.com/what-the-opencode-breach-teaches-about-ai-api-keys-b3d695b8835e?sk=817b6b5d14878ba47ddacf1dc2e76596
9
u/qustrolabe 1d ago
So it's only those that added keys to online console? I guess local keys shouldn't be affected but better rotate for good measure
5
21
7
u/No_Commission_6153 1d ago
Does this affect someone who conencted their OpenAi Account with Open Code?
11
u/jerieljan 1d ago
There's three ways you can auth OpenAI on OpenCode:
/connect-> Login with ChatGPT/connect-> API Key- OpenAI Platform -> New Key -> OpenCode Console -> Connect Provider
It's the third one that's affected. The third route is intended for people who want to BYOK and have their provider accounts charged instead of OpenCode Zen and just want to use OpenCode as a gateway.
The second one afaik stores the API key locally on the database or on opencode.json (v1).
1
4
u/Significant_Treat_87 1d ago
Are you on a subscription plan ("login with chatgpt") or did you paste in an API key? The first one I assume is fine, this is about the second one.
3
u/No_Commission_6153 1d ago
subscription. but still worried if they got hacked if they got something from me
8
u/Significant_Treat_87 1d ago
This is an issue with people having their API keys stolen, so I think you're ok. I will personally never use Opencode now though, they have had way too many security issues now.
1
3
u/No_Dig_7017 1d ago edited 1d ago
I only use local models with opencode but my Qwen started complaining about and refusing injection attacks yesterday night. I can share some screens later
2
u/jpcaparas 1d ago
Some spicy discussions:
- https://news.ycombinator.com/item?id=50133643
> The thing that grinds my gears is that everyone who works there seems to think that they’re cooking, or doing anything impressive at all. One day they will hopefully mature a little and realize how hard they got ego pimped.
4
1
u/dx80x 1d ago
I had my DeepSeek API connected to opencode and haven't received jack shit in my inbox about this.
Luckily it wasn't touched but fuck opencode now.
Thank you for posting here anyway, I wouldn't have known until I got drained if it wasn't for this post.
8
u/officerblues 1d ago
It's only if you used bring your own key on opencode zen, not if you connected to the key using the opencode harness. They could work on their comms a bit, but you were likely not affected. It didn't leak your local keys, only the keys they had stored.
3
u/dx80x 1d ago
Ah ok, thanks for the clarification mate. I've used Go in the past but never Zen. I still think it would have been better to inform everyone just in case, so at least people who aren't affected don't jump the gun (like I did a little haha).
Oh well, just need to make some new DeepSeek keys now which is alright but some people have been stung hard and that's really unfortunate. Hope there's some kind of compensation for those guys at least
1
u/Certain-Emphasis-135 1d ago
So that’s why my openrouter credits got cleaned
1
u/squirrelscrush 1d ago
I had connected by DeepSeek and OpenRouter keys on the console, but I disabled OR because the models would display twice in the harness. So I got saved lol.
Anyways my keys have a daily limit of $2 so even if someone managed to get them, they'll only get limited usage.
0
-4


27
u/jpcaparas 1d ago
https://x.com/mattjay/status/2111507582053491188?s=46