Agent Upstart

Cool things people are building with agents — and practical help getting the most out of them.

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

  1. 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.
  2. Inspect .git/config before anything else. Read the file with cat .git/config, and list the local settings with git config --list --local. Look for any setting that names a program. core.fsmonitor is the one in the report, but the rule is general: any setting that names a program can run it. Besides core.fsmonitor, look for core.hooksPath, which points git at a folder of hook scripts, and any filter.*.clean, filter.*.smudge, or filter.*.process entry, which names a program git runs when it reads or writes a file — the checklist in The Hacker News’ coverage of the report names core.hooksPath and a clean or process filter alongside core.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.
  3. 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.
  4. 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.
  5. 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 plain git status on a repo not yet inspected runs the helper; the override form does not.
  6. 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

What can go wrong

Limits

Related playbooks

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