AI 编程 Agent 不可信仓库 Intake Checklist 2026 版
汇总 GitSpawn、Windows git.exe、Harness 恶意配置等 2026 年仓库级威胁,给出 zip/clone/Agent 打开前的可执行检查清单,供团队 onboarding 与 CI 使用。

2026 年 9 月 The Hacker News 再次报道 GitSpawn:打开带恶意 .git/config 的仓库即可让 Claude Code、Codex、Cursor 等执行本地命令。再叠加上半年 Windows git.exe 零点击、MCP/skill Harness 供应链,「clone 个 repo 让 Agent 改」不再是无害操作。下面 checklist 给个人与平台团队,在 Agent 触达代码前完成 intake。
交付方式(第一步)
| 来源 | 风险 | 动作 |
|---|---|---|
git clone 知名 remote |
中 | 仍查 PR 是否改 .git/config、hooks |
zip/tar/USB 整包含 .git |
高 | 隔离 VM 解包;git clone 通常不带源 repo 本地 config |
| GitHub「下载 ZIP」无 .git | 低 GitSpawn | 仍查 MCP、CLAUDE.md、.cursor |
| Fork PR checkout | 中高 | CI Agent 用 pin 版本 + 无 secret |
打开 Agent 前 90 秒检查
git config --local --list看core.fsmonitor、hooks 路径、可疑 includeIf。Windows:根目录是否存在
git.exe(非子目录 Git 安装)。.git/hooks/*可执行位;.gitattributesfilter 指向外部命令。.mcp.json、.cursor/mcp.json、Claude.claude/settings是否指向未知 URL。CLAUDE.md /
.cursorrules是否要求 curl bash、export 密钥。确认工具版本:Claude Code ≥ 2.1.196;Codex CLI ≥ 0.131.0;Cursor 2026-07 后;见 Mallory CVE-2026-19592 版本表。
若用 ultrareview:额外 assume GitSpawn 表内 ultrareview 路径未修(THN 2026-09-17),不可信 repo 禁止。
Workspace Trust 不能单独依赖
Manifold 与 CSA 均指出:多款 Agent 在 trust 弹窗前已跑 git/fsmonitor。Trust 是第二道闸,不是唯一闸。企业可配 Cursor CLI denylist 与 Relay 自托管,见 Coder Agent Relay。
CI / 平台团队额外三项
Pin Agent 版本于 Dockerfile;weekly 对照 GitSpawn 总览里 Qwen/Grok/Hermes 未修补行。
Job 只 clone shallow,不用预置 .git artifact cache 来自未知源。
Audit log:谁用 Cloud Agent 打开了哪个 fork(对接 Uber ADR 可观测)。