创建

登录 ReadmeX

或

了解我们如何处理你的信息: 隐私政策

ReadmeX

陪你读懂 AI 动态

今天,想先了解什么?

选一份动态总结,或直接聊聊你的问题。

社区和关注动态总结只属于你自己。

资讯

Claude Code 授权记录在 GitHub 暴露凭据

AI 总结

Apiiro 研究人员在 GitHub 上 104,185 份 Claude Code 公共设置文件中发现 1,122 份含有疑似凭据;结合共享设置、智能体聊天记录和 Git 历史,研究团队在 1,994 个仓库中识别出 2,539 个不同秘密。用户选择“是,且不再询问”时,Claude Code 可能把 Shell 命令原文写入 .claude/settings.local.json,从而保留其中嵌入的密码或令牌,但 Anthropic 称该文件通常会被加入全局 Git 忽略列表。Claude Code 负责人 Boris Cherny 表示,团队正在研究自动模式保护和基础秘密扫描;Apiiro 则强调,其没有测试凭据或连接任何主机。

深度见解

这些结果表明,编程智能体持久保存的授权记录可能让凭据离开开发者本机,因此仓库忽略规则和秘密扫描仍是重要防护措施。

Update, November 8: Anthropic’s Head of Claude Code responds. Boris Cherny responded on Hacker News on November 7 and took part in the discussion through the weekend. He said the team is “looking into what we can do to prevent this,” named approaches it plans to prototype, “making sure auto mode catches this, building in basic secret scanning,” and, when a reader noted the same can happen in auto mode when it asks about a sensitive command, answered “good catch.” Full response below.

Apiiro research found 2,539 real secrets in 1,994 public GitHub repositories: database passwords, cloud keys, API tokens, SSH root logins. Among them: a database vendor's own admin-level cloud key, a production Azure Postgres password, a Square production token, and the owner password of a medical-records database. Most belong to individual developers. 63 organizations are affected, from student groups to startups, software agencies and established vendors. One confirmed its key had been live.

Ask Claude Code to check a database or call an API, and the command it proposes carries the secret from your config file. It asks before running it. Pick "Yes, and don't ask again" and it saves that exact command, secret included, to .claude/settings.local.json inside the project folder. Nothing in the repo marks that file as private, so it gets committed with the rest of the code.

#Claude Code#Anthropic#Apiiro#GitHub

原文约 11 分钟读完阅读原文
群聊

还没有评论,来说说你的看法。