AI 编程 4.0 · 优秀 2026-10-18 · 文章

OpenCode Hacked: User credentials leaked

OpenCode 安全事件的 HN 讨论帖(官方公告发于 X):失守的是 OpenCode Console一个类似 OpenRouter代管用户 BYOK API key 的托管服务,而非开源的 OpenCode CLI/agent 本体;评论澄清只影响 Console 用户,受影响者已收到官方邮件,有人报告 Anthropic/OpenAI 账户额度被盗用OpenCode 称泄露的凭据与一场大规模 distillation 攻击有关,帖子对此争议很大:尚无详细 RCA,有人要求公开攻击者查询数据集以便独立验证;讨论还暴露了 Console/CLI/Zen/Go 的产品命名混乱,并讨论了 invalidate_api_key 一键作废接口GitHub secret scanning 自动吊销等缓解思路

打开原文回到归档

OpenCode Hacked: User credentials leaked

  • ID: 9453b739
  • 原文链接: https://news.ycombinator.com/item?id=50133401
  • 作者: OpenCode announcement via HN (submitted by pranshuchittora)
  • 日期: 2026-10-18
  • 分类: coding
  • 来源类型: article
  • 标签: security-incident, api-keys, distillation, ai-coding-tools, opencode
  • 质量评分: 4/5
  • 抓取时间: 2026-10-19T04:24:55Z

中文导读

OpenCode 安全事件的 HN 讨论帖(官方公告发于 X):失守的是 OpenCode Console——一个类似 OpenRouter、代管用户 BYOK API key 的托管服务,而非开源的 OpenCode CLI/agent 本体;评论澄清只影响 Console 用户,受影响者已收到官方邮件,有人报告 Anthropic/OpenAI 账户额度被盗用。OpenCode 称泄露的凭据与一场大规模 distillation 攻击有关,帖子对此争议很大:尚无详细 RCA,有人要求公开攻击者查询数据集以便独立验证;讨论还暴露了 Console/CLI/Zen/Go 的产品命名混乱,并讨论了 invalidate_api_key 一键作废接口、GitHub secret scanning 自动吊销等缓解思路。

为什么值得关注

OpenCode Console 被入侵:BYOK API key 泄露并称用于大规模 distillation,CLI 本体不受影响,RCA 未出

关键信息

  • HN 帖子:https://news.ycombinator.com/item?id=50133401(提交人 pranshuchittora,943 分)
  • 官方公告:X 帖 https://twitter.com/opencode/status/2111516673953935833(帖子正文仅给链接)
  • 影响范围:OpenCode Console(类 OpenRouter 的托管推理网关,存用户 BYOK API key)被入侵;开源 CLI/agent 本体不受影响,无供应链攻击
  • 产品线辨析(评论区梳理):Console(网关,被入侵)/ Zen(托管 API)/ Go(订阅)/ Desktop / Black,命名混淆是本轮沟通事故的主要槽点,标题被要求改为 "OpenCode Console hacked"
  • 用户影响:受影响用户收到官方邮件;有用户同日收到 Anthropic 邮件称 $20 API credits 已用完
  • 官方归因:公告称事件与 "large scale distillation attack" 相关;评论区指出无公开证据,要求详细 RCA 与攻击者查询的开放数据集以便独立验证
  • 缓解讨论:invalidate_api_key 一键作废接口;GitHub secret scanning 合作方自动吊销(异议:会把泄露变成可远程触发的拒绝服务)
  • 关联标签:security-incident, api-keys, distillation, ai-coding-tools, opencode

English Source

Selected quotes from the HN thread (fetched via opencli hackernews read 50133401 -f json):

  • redsymbol: "The leak was for something called 'OpenCode Console', which is distinct and separate from the OpenCode coding agent. If you're just using the coding agent, you're not affected. 'OpenCode Console' is a service that is similar to OpenRouter, but is much less widely used."
  • jerieljan: "OpenCode Console - Basically the serving platform for both Zen and Go, and has expanded to a hosted inference gateway and somewhat similar to OpenRouter or a managed LiteLLM. Has the option to BYOK ... and that's what got compromised."
  • jprokay13: "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."
  • searealist (quoting the announcement): "> security breach > related to a large scale distillation attack — I'm not sure how this adds up."
  • ipsum2: "'mass distillation campaign' there's no public evidence of this. I wonder what OpenCode/Anomaly has, would be an interesting postmortem."
  • verdverm: "We do not know if that is what the hacked API keys were used for. Could be distillation, could be API reselling. We will need more transparency into the nature of the requests made by the attacker."
  • Ciantic: "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."
  • rozenmd: "@dang this title needs updating: 'OpenCode Console hacked: User credentials leaked'. The opencode CLI has no impact."

English Summary

HN discussion (943 points, submitted 2026-10-18) of the OpenCode security incident announced on X. The breach hit OpenCode Console — a hosted, OpenRouter-like inference gateway where users store bring-your-own API keys — not the open-source OpenCode CLI/agent. Commenters clarify only Console users were affected, OpenCode emailed affected users, and some report drained Anthropic/OpenAI credits. OpenCode attributed the incident to a large-scale distillation attack; the thread debates that claim heavily, notes no detailed RCA exists yet, and asks for an open dataset of attacker queries for independent verification. The discussion also surfaces product-naming confusion (Console vs CLI vs Zen vs Go vs Black) and mitigation ideas such as an invalidate_api_key endpoint and GitHub secret-scanning auto-revocation.

Obsidian Notes

  • 内容由 opencli hackernews read 50133401 -f json 拉取的 HN 帖子与评论树生成。
  • 官方公告原文仅以 X 链接形式出现在帖子内,未单独抓取;官方说法(影响范围、邮件通知、distillation 归因)均转引自帖子文本与评论区转述。