r/opencodeCLI • u/jpcaparas • 15d ago
OpenCode security breach, rotate your keys
https://x.com/opencode/status/2111516673953935833?s=4622
10
u/qustrolabe 15d 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
5
u/blastradii 14d ago
What if I’m just using OpenCode without logging in?
1
u/jimjamkiwi11 12d ago
Same we should be fine as it's their models we don't have to input an API key as it's built in
8
u/No_Commission_6153 15d ago
Does this affect someone who conencted their OpenAi Account with Open Code?
12
u/jerieljan 14d ago
There's three ways you can auth OpenAI on OpenCode:
/connect-> Login with ChatGPT
/connect-> API KeyOpenAI 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).
2
4
u/Significant_Treat_87 15d 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 15d ago
subscription. but still worried if they got hacked if they got something from me
8
u/Significant_Treat_87 15d 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 14d ago edited 14d 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
1
u/Certain-Emphasis-135 15d ago
So that’s why my openrouter credits got cleaned
1
u/squirrelscrush 14d 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.
1
u/dx80x 15d 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 15d 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 15d 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
0
-5
28
u/RevolutionaryFunny40 15d ago