跳到正文
实时
Ars Technica · AI· Kyle Orland·· 5 天前63

Claude Code 因设置文件处理疏忽意外泄露 GitHub 秘密

Claude Code is accidentally exposing secrets all over GitHub

要点速览

Apiiro 的 AI 安全研究人员发现,Claude Code 在处理用户自动 Shell 命令的用户批准设置时存在疏忽,导致其设置文件(.claude/settings.local.)可能包含数据库密码、API 令牌和 root 登录等敏感信息,并在 GitHub 仓库中意外暴露。

同一件事另外 1 家也报道了

  1. Ars Technica · AI··首发·当前阅读

    Claude Code 因设置文件处理疏忽意外泄露 GitHub 秘密

  2. IT之家 · AI··+15 小时 21 分

    Claude Code 被爆泄露凭据,GitHub 上发现 2539 个真实凭据

按发布时间排列 · 事件后续出现时自动追加

正文

Claude Code is leaking sensitive information on public GitHub instances thanks to a partial oversight in the way its settings files are handled. That's the finding of AI security researchers at Apiiro, who discovered thousands of secrets, including database passwords, API tokens, and root logins, amid Claude Code settings files embedded in GitHub repositories.

The leak stems from the way Claude Code handles user approval for automated shell commands. When a user chooses the "Yes, and don't ask again" option to approve running a command, that choice gets stored as part of a rule in the local ".claude/settings.local.json" file on the user's computer. That rule is sometimes coded as a pattern, but the command itself is often written to that settings file as is, including any sensitive information that may be embedded within it.

This isn't really a significant security issue if the settings file stays on the user's local machine (assuming that machine doesn't become compromised itself, of course). And Anthropic notes in its Claude Code documentation that this particular settings file gets added to the developer's global .gitignore list, which usually prevents it from being shared publicly.

Read full article

Comments

来源: Ars Technica · AI · arstechnica.com