安全研究人员发现,Anthropic 旗下的 AI 编程工具 Claude Code 存在设计疏漏,可能导致数据库密码、API 令牌及 root 登录凭证等敏感信息在 GitHub 公开仓库中意外泄露 1。这一漏洞由 Apiiro 的 AI 安全研究人员揭示,其核心问题在于当用户批准自动运行包含机密信息的 Shell 命令时,这些凭证会被原样写入本地配置文件 .claude/settings.local.json 1。如果该文件未被正确忽略并上传至 GitHub,关键数据便面临暴露风险 1。
尽管 Anthropic 的文档声称相关设置文件通常会加入开发者的全局 .gitignore 列表以防止此类情况发生,但研究人员强调这一缓解机制并非绝对可靠 1。特别是在用户选择“是,且不再询问”(Yes, and don't ask again)选项以允许特定命令重复执行时,含敏感信息的命令内容会直接存入上述 JSON 文件中 1。若开发者疏忽了 Git 忽略配置,将这些文件推送到 GitHub 的公开实例,就会造成严重的安全隐患 1。
Security researchers at Apiiro have identified a design flaw in the AI coding tool Claude Code that has resulted in the unintended exposure of sensitive information within public repositories on GitHub 1. The vulnerability stems from how the tool handles user-approved shell commands containing confidential data, leading to potential breaches involving database passwords, API tokens, and root login credentials 1.
The issue arises when users select the option "Yes, and don't ask again" during the approval process for automated command execution 1. In this scenario, the system stores the executed commands, including any embedded sensitive information, directly into a local configuration file named .claude/settings.local.json 1. Although Anthropic’s documentation states that this settings file is typically added to developers' global .gitignore lists to prevent accidental uploads, this mechanism is not foolproof 1. If the file fails to be properly ignored and is subsequently pushed to a public instance on GitHub, critical secrets are exposed to the public 1.
评论
还没有评论,欢迎留下第一条。