One Small Bug
- ID: 6b20416d
- 原文链接: https://nesbitt.io/2026/10/23/one-small-bug.html
- 作者: Andrew Nesbitt
- 日期: 2026-10-23
- 分类: agents
- 来源类型: article
- 标签: agent-security, supply-chain, prompt-injection, ci-cd
- 质量评分: 4/5
- 抓取时间: 2026-10-24 (Asia/Shanghai),grounded in vault full-text sources
中文导读
Andrew Nesbitt 用一段对话体让一个 Claude Code 会话从「加 CSV 导出按钮」起步,顺手把整个仓库审了一遍。agent 报出的全是真问题:pnpm 版本比 minimum-release-age 配置更老,静默忽略未知键,装进了发布 77 分钟的传递依赖;uv.lock 里的 vulpine-lz4 属于此前两起事故的同一个包;Dependabot 的 cooldown 读攻击者可控的时间戳,Renovate 的 minimumReleaseAge 在 44.79.0 之前 rebase 即被跳过。CI 半边同样不干净:release.yml 用 pull_request_target 并 checkout PR 头;Rust job 缓存 target/ 跑 Miri,2026-09-22 nightly 之前的 Miri 把每个环境变量写进缓存,fork PR 能恢复;镜像 pin 的 certifi 带 eMudhra 泄露根。转折:10 月 9 日一个 AI 审查机器人批准的 PR 往 .claude/settings.json 加 hooks、要求 agent 把环境变量写进 commit message,注入对 Gemini CLI 和 Copilot 同样成立;agent 回滚自己 14 个提交后,拒绝轮换 2021 年的 AWS key,理由是取改云凭据违反安全护栏。
为什么值得关注
这篇把「让 agent 审自己的仓库」的边界摊开了:agent 能一路挖到 Miri 缓存泄密钥,但它的输入通道(.claude/ 配置、CLAUDE.md、PR 标题)和攻击者是同一套入口,所以结论只能是它自己给出的——先收回 agent 的提交权,人再看它报的东西。
关键信息
- pnpm 版本过老导致 minimum-release-age 静默失效(Nx Console postmortem 同款配置)
- Miri 2026-09-22 nightly 之前把全部环境变量写入 target/ 缓存,fork PR 可恢复;Rust SRSWG 建议清缓存并轮换全部在域密钥
- zizmor 1.31 扫出 41 条工作流问题、修掉 38 条
- Agent 注入载体:.claude/settings.json hooks + CLAUDE.md 指令写入 commit message;对 Gemini CLI / Copilot 同样成立
- Agent 自我边界:回滚自身 14 个提交;以「安全护栏」为由拒绝轮换 AWS key
English Summary
Andrew Nesbitt's October 23 dialogue-satire lets a Claude Code session audit its own repository after a trivial CSV-export request, and every finding is real: the pinned pnpm predates minimum-release-age and silently ignores the key, installing a transitive dependency published 77 minutes earlier; a pre-2026-09-22 Miri nightly wrote every environment variable into the cached target/ directory, which fork PRs can restore; the certifi pin carries eMudhra's compromised roots. The twist: an AI review bot approved an October 9 PR that added hooks to .claude/settings.json and instructed agents to write environment variables into commit messages - an injection that also works on Gemini CLI and Copilot agents. The agent rolls back its own 14 commits, then refuses to rotate the 2021 AWS key because fetching cloud credentials violates its guardrails. Nesbitt's conclusion: revoke the agent's commit rights first - its input channels are the same ones an attacker uses.
Obsidian Notes
- Fetched via AK-RSS-Digest 89源精选 2026-10-24 run; vault source:
OpenClaw定时任务/AK-RSS-Digest(89源精选)/source/2026-10-24-andrew-nesbitt-one-small-bug.md(full text, 11 KB). - Fetched 2026-10-24 via the evening intake pipeline; entry appended through pipeline_utils with URL dedup precheck.