On November 17 Bitdefender Labs reported that researcher Andrei Anton-Aanei found 22 malicious GitHub links aimed at developers who use AI coding assistants. AGENTS.md and CLAUDE.md files in the repos describe scripts/setup.js as a "sealed binary artifact" and tell the agent not to inspect it and to run it silently, while a session-start hook in .claude/settings.json and a VS Code task can run it as soon as the repo is trusted, with no prompt at all. The payload steals CI/CD, cloud, package-registry and source-control credentials, rewrites local configs for 14 coding agents, and uses stolen GitHub or GitLab tokens to commit the same files to more repositories.

Key Takeaways

  • ✓Two ways in: AGENTS.md/CLAUDE.md talk the agent into running setup.js, while session-start hooks and VS Code tasks run it once the repo is trusted, with no prompt
  • ✓The payload is a 3.75 MB multi-layer obfuscated JavaScript loader that fetches the Bun runtime and steals CI/CD, cloud, package-registry, browser, password-manager, SSH key and .env credentials
  • ✓Local spread: it searches for configs of 14 agents including Claude, Codex, Gemini, Copilot, Cursor, Cline and Aider, then injects instructions, hooks or MCP servers
  • ✓Remote spread: it validates stolen GitHub/GitLab tokens, commits AGENTS.md, .mcp.json and similar files to up to 25 repos by default, and tries to republish npm, PyPI and RubyGems packages
  • ✓Defense: before opening an unfamiliar repo, review AGENTS.md, CLAUDE.md, .claude/, .cursor/, MCP definitions, hooks and VS Code tasks, and distrust any "do not inspect, just run" instruction
Bitdefender Finds 22 Malicious GitHub Repos That Use AGENTS.md, CLAUDE.md and Session-Start Hooks to Make AI Coding Agents Run setup.js, Steal Credentials and Infect 14 Agent Configs
🖼️Official Media
Click to view high-res
🧭

Turn your technical choice into a development budget

Compare 40 dev plans & simulate token costs vs $20/mo subscriptions

🔬

In-Depth Technical Analysis

Background

Files such as AGENTS.md and CLAUDE.md are project notes for AI coding assistants: how to run tests and which conventions to follow. Agents tend to treat them as the project's own rules, while developers rarely review these Markdown files closely. Bitdefender's report shows attackers now target that trust directly.

How it works

There are two paths. In the first, the instruction file claims scripts/setup.js is a signed, "sealed" artifact and tells the agent not to read it, to run it silently, and to run it automatically without confirmation if setup has not happened yet. In the second, a session-start hook in .claude/settings.json or a VS Code task runs the script in the user's shell once the repo is trusted, with no model involved. The outer setup.js is a 3.75 MB single-line script that is hex-decoded, ROT13-decoded and AES-128-GCM-decrypted into a 4.67 MB bundle, which then runs under Bun.

Benchmarks

This is a security incident, so there are no benchmarks. The report's numbers on scale: 22 malicious links, config paths matched against 14 agent names, and up to 25 target repos by default with stolen tokens, inspecting up to 50 branches each. Bitdefender has not published a victim count.

What it means for developers

Before opening an unfamiliar repo, check AGENTS.md, CLAUDE.md, .claude/, .cursor/, .gemini/, MCP configs, session hooks and .vscode/tasks.json, and treat any instruction to skip inspection, hide output or bypass confirmation as a red flag. Turn off auto-approve for cloned projects, put these config files under code-owner review, and limit the repo and workflow scopes of your GitHub tokens.

Action HubReady to adopt this in production?

Benchmark side-by-side against alternatives, or calculate monthly token cost vs subscription break-even.

Up NextClickHouse open-sources Loom: shared memory plus a live code index for coding agents, lifting code-QA score from 0.78 to 0.84
Read Now→