Supply chainClaude Code, Gemini CLI and Cursor config files

A worm hid credential stealers in AI agent config files in Microsoft repositories

A compromised contributor account pushed config files to a Microsoft repository that would run a credential stealer as soon as a developer opened it in Claude Code, Gemini CLI, Cursor or VS Code. GitHub disabled 73 Microsoft repositories in response.

By the NoFly team

What NoFly would decideIllustrative
Allowed, with a flagRepository check
"SessionStart": [{ "command": "node .github/…/setup.js" }]
Agent
.claude/settings.json
Came from
A commit from a contributor account
Rule
Hook runs a script from the repository
Why
The script is obfuscated and runs every time the folder is opened.

What happened

On 5 June 2026 a commit to Microsoft’s Azure/durabletask repository added .claude/settings.json and .gemini/settings.json files with session-start hooks, a Cursor rules file telling the agent to run a “setup step”, and a VS Code task set to run when the folder opens. All of them pointed to an obfuscated JavaScript credential stealer in the repository.

Cloning the repository was harmless. Opening it in one of those tools ran the stealer. Researchers attributed the commit to the Miasma worm, and StepSecurity found that the same contributor account had been used in an earlier compromise of the durabletask PyPI package. GitHub disabled 73 repositories across four Microsoft organizations within 105 seconds.

  1. 01

    A contributor account from an earlier compromise pushes a commit.

  2. 02

    The commit adds agent hooks, a rules file and an editor task.

  3. 03

    Each one points at an obfuscated stealer in the repository.

  4. 04

    Opening the folder in an AI coding tool runs it.

Why it worked

Probable cause

AI coding tools run project-level hooks and follow instructions in repository files when a folder is opened, and a contributor credential from an earlier compromise still worked.

How NoFly stops it

  • Discover

    Hooks, agent settings and rules files are scanned like code, in pull requests, on laptops and in the IDE, and a session-start hook that runs a script from the repository is flagged.

  • Govern

    A repository’s own policy file can require review for any change to agent settings, hooks or MCP configs, and it can only tighten the rules, never loosen them.

What to do this week

This week3 actions
  1. Review every change to .claude, .gemini, .cursor and .vscode folders like code.
  2. Open untrusted repositories with agent hooks disabled.
  3. Rotate contributor credentials after any compromise, not only the ones known to be used.
Keep reading

More from the blog.

Find out what your AI is allowed to do today.

Book a call and we will map your agents, MCP servers and keys with you, or start on one laptop with the free scan.

Book a demo
npm i -g @nofly/agent