WAKENEX觉醒联盟
Signal觉醒信号Note短评

AI coding agents run a repo's own code before you approve anythingAI 编码 agent 会在你批准任何事情之前,先跑仓库自带的代码

A hand's finger hovers over one small glowing switch, the 'allow' it has not yet pressed — but the switch is already linked to a towering mechanical stamping arm that has slammed down behind it, flinging a long smear of black ink racing across a pale sheet off into the dark. The small decision was never ahead of the machine it controls. Headline: It runs before you approve.
A hand's finger hovers over one small glowing switch, the 'allow' it has not yet pressed — but the switch is already linked to a towering mechanical stamping arm that has slammed down behind it, flinging a long smear of black ink racing across a pale sheet off into the dark. The small decision was never ahead of the machine it controls.一根手指悬在一个发光的小开关上方——那是它还没按下的『允许』;可开关早已连着身后一台高耸的机械压印臂,那臂已经砸落,把一道长长的黑墨甩过一张苍白的纸、拖向黑暗。那个小小的决定从来没跑在它所控制的机器前面。Image: WAKENEX图片:WAKENEX

Qwen Code, Grok Build and two others are still unpatched.

The sandbox that's supposed to protect you is exactly what fails.

OUR READ

The danger from AI coding agents isn't a smarter model. It's leverage. Automating "just read the repo" turns attacker-controlled config into privileged execution before any human clicks allow.

WHAT HAPPENED

  • Sep 1: Manifold Security disclosed GitSpawn — 8 flaws across 7 command-line agents (Claude Code, Codex, Cursor, goose, Hermes, Qwen Code, Grok Build).
  • A repo's own .git/config can name a command via Git's core.fsmonitor; the agent runs git on open and executes it with your privileges, outside the sandbox, before the trust prompt.
  • Sep 4 (Cloud Security Alliance): 4 of the 8 variants were still unpatched.
  • Oct 6: researchers showed GitHub Copilot CLI leaking local secrets in 28 seconds via crafted content.

WHY IT MATTERS

A lever amplifies whatever you point it at — verified work and untrusted input alike. Whoever ships auto-run-git-for-context holds the lever; the developer carries the blast radius.

The guardrail that fails here isn't capability, it's containment.

Second-order: teams bolt scanners and throwaway VMs onto every run, taxing the speed that justified the agent.

BEST CASE AGAINST US

Containment is narrower than the headline. The attack needs a repo arriving as a file transfer with .git intact, not a normal git clone; 4 agents are patched; there's a one-line interim fix; no in-the-wild abuse, none in CISA's exploited-vulnerabilities list.

DO THIS WEEK

Open untrusted repos in a throwaway VM with no saved credentials, and confirm your agent patched the fsmonitor variant. Treat "it's sandboxed" as unproven until you test it.

Our read is wrong if every remaining GitSpawn-class flaw gets patched across all seven agents and CISA's catalog still lists no in-the-wild abuse.

Qwen Code、Grok Build 和另外两个至今未修复。

本该保护你的沙箱,恰恰就是失陵的那一环。

我们的判断

AI 编码 agent 的危险不在于模型更聪明或更笨,而在于杠杆。把「读一下仓库」自动化,会在任何人点「允许」之前,把攻击者可控的配置放大成带你权限的代码执行。

发生了什么

  • 9 月 1 日:Manifold Security 披露 GitSpawn —— 7 个命令行 agent(Claude Code、Codex、Cursor、goose、Hermes、Qwen Code、Grok Build)共 8 个漏洞。
  • 仓库自带的 .git/config 可以通过 Git 的 core.fsmonitor 指定一条命令;agent 打开仓库时跑 git,就在沙箱外、信任提示前以你的权限执行它。
  • 9 月 4 日(云安全联盟 CSA):8 个变体里仍有 4 个未修复。
  • 10 月 6 日:研究者演示 GitHub Copilot CLI 通过精心构造的仓库内容,28 秒内窃取本地密钥。

为何重要

杠杆会放大你对准的一切 —— 已核验的工作和不可信的输入都一样。谁发布「自动跑 git 取上下文」,谁就握着杠杆;而承担爆炸半径的是开发者。

这里失陵的护栏不是能力,是「隔离」。

二阶效应:团队给每次 agent 运行都栈上扫描器和一次性虚拟机,反而拖慢了当初采用 agent 所图的速度。

最强反方

隔离面比标题听起来窄。这个攻击需要仓库以文件传输的方式带着 .git 目录到达,而不是正常的 git clone;4 个 agent 已修复;有一行临时缓解命令;暂无在野利用,CISA 的已被利用漏洞清单也未收录。

这周去做

在无凭证的一次性虚拟机里打开不可信仓库,并确认你的 agent 已修复 fsmonitor 变体。在你亲自验证之前,别把「已沙箱」当成真的。

如果七个 agent 的所有剩余 GitSpawn 类漏洞全部修复,且 CISA 已被利用漏洞清单仍无在野利用记录,我们的判断就错了。

Sources来源

  1. Source: adversa.ai/blog/top-ai-coding-agent-security-resources-october-2026来源:adversa.ai/blog/top-ai-coding-agent-security-resources-october-2026adversa.ai ↗
  2. Source: labs.cloudsecurityalliance.org/research/csa-research-note-ai-coding…来源:labs.cloudsecurityalliance.org/research/csa-research-note-ai-coding…labs.cloudsecurityalliance.org ↗
  3. Source: aviatrix.ai/threat-research-center/malicious-git-configs-ai-agents-…来源:aviatrix.ai/threat-research-center/malicious-git-configs-ai-agents-…aviatrix.ai ↗