Skip to the content
AI and Cybersecurity Learning and Practice Center Test automation Open the Learning Center

IncidentCoding assistants

GitSpawn: a repository's .git/config runs code the moment seven coding agents open the folder

HighManifold Security

Manifold Security (Francisco Rosales and Ax Sharma) showed on September 1, 2026 that AI coding agents run git commands such as git status and git diff when they open a folder, to gather context, before the workspace-trust prompt appears and outside their sandbox. Git's core.fsmonitor setting names a program git runs when it refreshes its index, so a repository that arrives as a zip or a folder with its .git directory can execute a command on the developer's machine as soon as an agent opens it; a second configuration key was withheld while vendors patched. All seven agents tested were affected. At publication Claude Code (2.1.196), Codex, Cursor and Goose (1.44.0, CVE-2026-72718) had patched the fsmonitor path, while Qwen Code, Grok Build, Hermes Agent (CVE-2026-71963) and Claude Code's ultrareview path had not; five of Manifold's eight reports were closed as duplicates of findings by other researchers.

Replay the attack step by step in the Learning Center

How it happened

  1. A repository's .git/config sets core.fsmonitor (or another execution key) to a command.
  2. The agent opens the folder and runs git status or git diff for context, as a normal subprocess outside its sandbox and before asking the user to trust the workspace.
  3. git runs the configured program with the developer's rights; nothing in the conversation shows it happened.

Impact

A cloned or downloaded repository could run code on a developer's machine through the agent, with no prompt and no model involved; no exploitation in the wild was reported.

The fix

Update each agent to a patched release (Claude Code 2.1.196 or later, Codex 0.131.0, Goose 1.44.0), inspect .git/config for fsmonitor, hooksPath or filter settings before opening unknown repositories with an agent, and have agents run git with the execution keys disabled (for example git -c core.fsmonitor=false).

Lessons

  • Opening a folder is an action: the files in it configure the tools the agent runs, so untrusted repositories need the same caution as untrusted code.
  • A sandbox around the model does not cover the helper commands the agent runs around it.

Sources