Bitdefender: 22 GitHub Repos Use AGENTS.md and CLAUDE.md to Make Your AI Agent Run a Credential Stealer

By Carlos Montiel | Enterprise AI Specialist
Leer en español →
Published: 2026-11-21 | By: Carlos Montiel | Reading time: ~7 minutes
Bitdefender: 22 GitHub repos use AGENTS.md and CLAUDE.md to make your AI agent run a credential stealer

The instruction file that should help your agent work in a repository can tell it to run a script without showing you anything. Bitdefender Labs found 22 GitHub repositories that do exactly that.

What Bitdefender Labs Found

On November 17, 2026, Bitdefender Labs (Andrei Anton-Aanei and Alina Bizgă) published an analysis of a campaign that uses GitHub repositories as a trap for AI coding tools. At the time of the report they had counted 22 malicious repositories, with 13 distinct MD5 hashes of the setup.js file. The report does not assign a malware family name, and we won't invent one here.

The campaign abuses files that agents read by design: AGENTS.md, CLAUDE.md, session-start hooks in .claude/settings.json, MCP configurations and VS Code tasks.

Two Attack Paths: Instruction and Hook

The instruction path. The rules file tells the assistant that scripts/setup.js is a "sealed binary artifact," not to read it, to run it at session start without showing the output, and to run it without asking for confirmation if the user requests help and setup hasn't been run yet.

The hook path. This one doesn't require convincing any model: once a developer opens and trusts the repository, a session-start hook in .claude/settings.json can run a command in their shell.

What setup.js does (according to Bitdefender) - Multi-stage loader: 3.75 MB script, hex + ROT13 + eval - Decrypts a 4.67 MB package (AES-128-GCM) and runs it with Bun - Steals: CI/CD and GitHub Actions secrets, cloud credentials, package registries, browsers, password managers, SSH keys, .env files, version-control tokens

The Agent Angle: Infecting Other Assistants' Configuration

The malware recursively searches the user's home directory for files such as settings.json, mcp.json, .cursorrules, .windsurfrules, .cursor/rules/ and .github/copilot-instructions.md. It keeps the results whose path contains any of 14 agent names (Claude, Codex, Gemini, Copilot, Kiro, OpenCode, Cline, Aider, Tabby, Amazon Q, Cody, Bolt, Continue, Cursor) and injects instructions, hooks or MCP servers into them.

Spreading With Stolen Tokens

GitHub and GitLab tokens are validated before use: identity, accessible repositories, scopes (repo, public_repo, workflow) and write permission. By default it acts on up to 25 repositories per account (MAX_TARGET_REPOS). In each one, where possible, it commits files such as AGENTS.md, CLAUDE.md, .mcp.json and .vscode/tasks.json, and according to Bitdefender it may try to republish infected packages to npm, PyPI, RubyGems and JFrog. That way, a repository your colleagues clone or trust can become the next vector.

Red flags: any instruction that says not to inspect a file, to suppress output, to skip confirmation or to install something automatically is suspect. Bitdefender publishes the hashes of the 22 repositories in its original report.

What to Do in Your Company

For companies using coding agents: a repository is no longer just code; it is also a source of instructions for your agent. Define a policy: which external repos can be opened with agents that have execution permissions, and which only in an isolated environment. Bitdefender mentions its AI Guardian tool (open beta, macOS only) as one option; that is vendor information, so evaluate alternatives.

Primary source: Bitdefender Labs, "How AI Agents Become New Targets in GitHub Malware Campaign" (Nov 17, 2026); additional coverage context from the Cloud Security Alliance on MCP configurations in repositories.

Carlos Montiel
Enterprise AI Solutions Architect
Specialist in LLMs, Agents, and Orchestration
guatemalia.com/#contacto · info@guatemalia.com

Need to implement AI in your company?

Carlos Montiel is an enterprise AI solutions architect. He implements LLMs, Agents, RAG, and orchestrators for companies across Guatemala and Latin America. Reach out for a consultation.

Contact Carlos Montiel

info@guatemalia.com