On September 1, Manifold Security published GitSpawn, research showing that a single class of flaw let untrusted repositories run code through several AI coding agents, including Claude Code, Codex, Cursor and Grok. The next day, The Hacker News covered the same issue under the headline malicious .git configs can make AI agents run attacker code. According to Manifold, these agents run git commands in the background to gather context, on some agents before you type a prompt or accept the workspace-trust prompt. A malicious repository could abuse that to run code as the developer, outside the sandbox, with no approval prompt.
Do not assume every vendor has patched this. At publication Manifold said several findings were still live, including Grok Build and some Claude Code paths. Codex and Cursor had been patched. The finding is still a useful lesson in AI coding agent security.
GitSpawn does not trigger on a normal clone
Git never carries this setting through a clone, fetch or pull. The .git directory, with a core.fsmonitor (or similar) command in .git/config, has to arrive as files: a zip, a USB stick, a shared drive. Don’t unzip a stranger’s project onto the laptop you use for client work. Cloning from a URL is the safer path.
Once those files are on disk and you open the folder with an agent, git commands that refresh the index can run whatever core.fsmonitor names. Manifold used a .zip for every proof of concept in the post.
What an attacker gets, per Manifold, is everything the developer’s account can reach: SSH keys, cloud credentials in the environment, tokens in shell configuration, and every repository on disk.
Why vibe coders should care
Builders who are newer to software often receive sample projects as downloads, templates and folders shared in forums or by contractors. They may also be the most likely to keep powerful credentials on the same laptop. That combination is exactly what this kind of attack targets.
AI coding agent security habits
- Keep your tools updated. Some vendors patched this class of issue, and some had not at publication. Auto-update your coding agents and IDE, and restart them after updates. An update is not proof the class of bug is gone.
- Don’t unzip a stranger’s project onto your client laptop. Prefer cloning from a URL. If you must open a received folder, do it in a container, a cloud workspace or a separate user account.
- Inspect
.git/configbefore you open. Look forcore.fsmonitorand any other setting that names a program. For anything from an unknown source, check git configuration and hooks before opening it with an agent. - Keep credentials off developer laptops where you can. Use a secret manager and short-lived tokens. Don’t store production keys in plain text files.
- Separate work by sensitivity. The machine you use to experiment with new tools and code shouldn’t be the one holding client credentials.
- Use agent sandboxing where your tools offer it, and turn on any setting that restricts actions before workspace trust is granted. See AI coding agent sandbox.
If you think you opened something malicious
If you’ve opened an untrusted folder that arrived as files, especially with an older or unpatched agent, treat that machine’s credentials as exposed. Update the tools, rotate SSH keys and API tokens that were on the machine, review recent activity in your code host and cloud accounts, and check for unfamiliar changes. It’s a few hours of work and much cheaper than finding out later.
The broader pattern
This is the third kind of agent risk I’ve written about this year. There’s what the agent can reach, covered in AI coding agent permissions. There’s what it’s told by tools, covered in prompt injection in MCP. And now there’s what it does automatically before you’ve asked for anything. The common defense is the same: limit what’s within reach, so any single flaw has a small blast radius.
For teams that ship apps
If you’re preparing an app for production, include your development environment in the security review. Where are your deploy keys? Who has access to production databases from their laptop? Could a compromised developer machine push to production? These questions are part of finishing an app properly, not an extra.
If you want help tightening the security of how your app is built and shipped, from developer machines to deployment, here’s how I approach Prototype to Production. We’ll focus on the changes that shrink your exposure most for the least effort.