AI 编程 5.0 · 必读 2026-11-05 · 文章

Coding Agents Are Leaking Your Secrets to GitHub

Apiiro研究:Claude Code的Yes, and don't ask again会把批准的命令原文(含密码)存为.claude/settings.local.json里的允许规则,而这个文件会像普通项目文件一样被提交GitHub上104,185份公开副本中1,122份含真实密钥,包括379个数据库密码122个Supabase service-role key43条SSH登录23个AWS key;累计git历史与共享settings共2,539个密钥1,994个仓库63家组织,一家已确认密钥有效gitleaks与TruffleHog有215份两边都漏建议:先轮换再清理,把agent目录当.env对待

打开原文回到归档

Coding Agents Are Leaking Your Secrets to GitHub

中文导读

Apiiro研究:Claude Code的Yes, and don't ask again会把批准的命令原文(含密码)存为.claude/settings.local.json里的允许规则,而这个文件会像普通项目文件一样被提交GitHub上104,185份公开副本中1,122份含真实密钥,包括379个数据库密码122个Supabase service-role key43条SSH登录23个AWS key;累计git历史与共享settings共2,539个密钥1,994个仓库63家组织,一家已确认密钥有效gitleaks与TruffleHog有215份两边都漏建议:先轮换再清理,把agent目录当.env对待

为什么值得关注

'Don't ask again' persists secret-bearing commands; 2,539 secrets exposed across 1,994 public repos

104,185 份公开副本里 1,122 份含真实密钥,口径透明、规模够大;「先轮换凭证再清理 git」是当天就能执行的行动清单,把 agent 目录按 .env 同级敏感纳入扫描与 git 历史审查,是团队推广编码代理前该做的检查。

关键信息

  • 来源标题:Coding Agents Are Leaking Your Secrets to GitHub
  • 作者:Shmulik Cohen and Matan Giladi (Apiiro)
  • 原文链接:https://apiiro.com/blog/coding-agents-leaking-secrets-github-dont-ask-again
  • 发布时间:2026-11-05
  • 关联标签:claude-code, secrets, agent-security, github, supply-chain
  • 正文来源:原文被反爬拦截,正文未取回;依据条目元数据与搜索佐证

English Summary

Apiiro research: Claude Code's 'Yes, and don't ask again' saves the exact approved command, secrets included, as an allow rule in .claude/settings.local.json, which then gets committed like any project file. Of 104,185 public copies on GitHub, 1,122 (1.1%) hold real secrets - 1,379 distinct, including 379 database passwords, 122 Supabase service-role keys, 43 SSH logins, 23 AWS keys; counting git history, shared settings, and agent transcripts, 2,539 secrets across 1,994 repositories at 63 organizations, one key confirmed live. gitleaks flagged 564 of the 1,122 files, TruffleHog 643, leaving 215 missed by both - typically passwords typed inside commands. Guidance: rotate before cleanup, untrack the file, treat agent folders like .env, approve patterns not literal commands.

搜索佐证(检索快照,2026-11-08)

  • The Hacker News (2026-11-07): 104,185 public copies found across 103,617 repositories; 1,122 hold at least one secret (1,379 distinct); counting older versions, shared settings and agent chat logs the total reaches 2,539 secrets in 1,994 repositories. Of 16 coding agents whose documentation was compared, Claude Code is the only one confirmed to save the full approved command in a project file by default. https://thehackernews.com/2026/11/claude-codes-dont-ask-again-file.html

Obsidian Notes

  • 原文页面有 Cloudflare 拦截(opencli、Wayback、wp-json API、真实浏览器均未能取回正文);本页以条目录入时记录的摘要/要点(来源即该文章)加搜索佐证为依据生成,未引用未经验证的正文内容。
  • 中文导读与价值判断锚定在条目已有摘要、作者、日期与标签信息上。