Playbooks · Coding tasks
Open an untrusted repo without running code
Written October 29, 2026
For a developer × opening a repo you do not trust without running anything in it × Goose, Qwen Code, Grok Build, Hermes Agent, Codex, and Claude Code, ending with the repo inspected and safe to open, or left unopened.
Before you start
The danger is a git setting, not a file you open. core.fsmonitor is a performance setting for large repositories: instead of checking every file on disk, git asks a helper program what changed, and runs it during an index refresh. Git reads that setting from the repository's own .git/config file. Manifold Security's report on the issue found that AI coding agents run git commands in the background to gather context, on some agents before you type a prompt, before the workspace-trust prompt, and before you have even authenticated — so the helper can run before any approval layer gets a say. The report covers eight findings across seven agents, with four remaining unpatched at publication.
How the repo arrives decides the risk. Cloning a hostile URL does nothing, and neither does fetch or pull. The repository has to arrive as files with its .git directory already inside, so the vector is anything that moves a directory instead of cloning it: a shared zip file, a shared drive, a sync folder, a USB stick. A fresh clone from the remote is the safe form; a folder handed to you is the form to inspect.
Patch status in this page is dated to the report. Goose was affected in 1.41.0 and fixed in 1.44.0 (CVE-2026-72718). The report lists Codex as patched without naming a version; coverage of the report names 0.131.0 as the fixed version. Claude Code's core.fsmonitor issue was confirmed on 2.1.193 and fixed by 2.1.196, while a separate issue in the same report remained unpatched on 2.1.252 at the report's 1 September check. Qwen Code, Grok Build, and Hermes Agent remained unpatched at that same 1 September check. This page does not state their current patch status: check the version installed against the vendor's current release notes before relying on a fix.
What "done" looks like
At the end of one pass the repo is either cleared — its git config inspected, any program-naming setting removed or neutralized, and the agent tool's version checked — or it stays unopened and the sender is asked for a fresh clone from the remote instead.
Steps
- Do not open the folder with an agent first. Keep the agent closed until the config is inspected. Opening the directory with the agent is the step that gathers context, and context gathering is what runs the git commands. Inspect first, in a plain terminal, with no agent running.
- Inspect
.git/configbefore anything else. Read the file withcat .git/config, and list the local settings withgit config --list --local. Look for any setting that names a program.core.fsmonitoris the one in the report, but the rule is general: any setting that names a program can run it. Besidescore.fsmonitor, look forcore.hooksPath, which points git at a folder of hook scripts, and anyfilter.*.clean,filter.*.smudge, orfilter.*.processentry, which names a program git runs when it reads or writes a file — the checklist in The Hacker News’ coverage of the report namescore.hooksPathand a clean or process filter alongsidecore.fsmonitor. A clean config has no such entry. If the file names a program you did not put there, stop: the repo is not safe to open as it stands. - Prefer a fresh clone when a remote exists. If the repo has a remote you trust, clone it into a new folder instead of using the handed-over copy. Cloning does not run the config helper. Work in the clone, and treat the handed-over folder as untrusted material to delete, not as a second copy to keep in sync.
- If there is no remote, neutralize the setting before opening. Remove the entry with
git config --local --unset core.fsmonitor, then re-read the config to confirm it is gone. Do not ask the agent to fix the config: the agent's first commands are the ones that would run the helper. Only after the re-read shows a clean config should the folder be opened with an agent. - When a git command must run first, run it with the setting overridden. If you need a status or diff before neutralizing, override the setting on that one command:
git -c core.fsmonitor=false status. The override applies to that command only and does not change the config file. A plaingit statuson a repo not yet inspected runs the helper; the override form does not. - Check the agent tool's version. Run the version command for the tool you use and compare it with the fixed versions above: Goose 1.44.0 or later for the reported issue. For Qwen Code, Grok Build, and Hermes Agent, the version check is against the vendor's current release notes, since the report's unpatched finding is dated to 1 September. A patched tool is a second layer, not a replacement for the inspection: the inspection protects against settings the patch does not cover.
Check the agent's work
- Check that no agent was opened in the folder before the config was read. If one was, the inspection is already too late for that session.
- Check that the config was read as text, not through the agent. An agent summary of the config is not an inspection.
- Check that every setting naming a program was found, not just
core.fsmonitor. A second program-naming setting is the same hole under another name. - Check that the neutralized config was re-read after the unset. An unset that did not take is the same as no unset.
- Check that the tool version was compared with the fixed version for that tool, not assumed current because it was installed recently.
What can go wrong
- Opening the repo to "just look". Looking is what gathers context, and gathering context runs git. The inspection happens in a plain terminal, with the agent closed.
- Trusting a clone's safety for a copied folder. Clone, fetch, and pull do not run the helper. A copied folder with a
.gitdirectory inside is a different arrival, and it is the risky one. - Fixing the config with the agent. Asking the agent to remove the setting sends the agent into the folder first. The terminal commands above run outside the agent, before it opens.
- Reading "patched" as "all issues fixed". The report covers several findings per agent. A fix for the
core.fsmonitorissue does not settle a separate finding, as the Claude Code case shows.
Limits
- This page covers the
core.fsmonitorvector in the Manifold report. It does not cover other ways a repo can carry executable content, such as hooks that run on agent commands or install scripts a skill ships with. Those need their own inspection. - Patch status is dated to the report's publication and its 1 September re-check. Vendors may have shipped fixes since; the version check in step 6 is against current release notes, not against this page.
- The fixed-version figures for Codex come from coverage of the report, not from the report itself, which names no Codex version. Treat 0.131.0 as reported, and confirm it against OpenAI's release notes for the version installed.
Related playbooks
- Kimi Code 2.5.3: steer a running session
- Judge Muse Spark Open before you download it: 816B weights, a custom license, and a cluster-sized hardware bar
- Mistral Large 4 Le Chonk: a trillion parameters, open
- Open WebUI 0.13.3 puts agents in automations
Sources
Sources: AI coding agents git hijack — Manifold Security, Malicious git configs — The Hacker News.
Back to: Coding playbooks hub · Also: Vet a skill before you install it · Security-review your own code with Claude Code