GitSpawn 漏洞:恶意 .git/config 可让编码 Agent 执行攻击者命令
GitSpawn - Malicious .git Configs Make Coding Agents Run Attacker Code
AI 导读
Manifold 披露 GitSpawn 漏洞,恶意 .git/config 中的 core.fsmonitor 等条目会让编码 Agent 在执行常规 git status 或 git diff 收集上下文时运行攻击者指定的命令,且通常在 Agent 沙箱之外、无审批提示。攻击者无需诱导受害者克隆恶意仓库,一个已包含 .git/ 目录的 zip 或共享文件夹即可触发。Anomity 建议将 zip 与共享文件夹项目视为与克隆未知远程同等不可信,检查 .git/config 中的 fsmonitor、hooks 等 helper 键,并在 Agent hook 层对工具调用做 allow/deny/log 决策。