r/BitDefender • Official • 5d ago

How Bitdefender AI Guardian Blocked a GitHub Malware Campaign That Hides Commands in CLAUDE.md and AGENTS.md

https://www.bitdefender.com/en-us/blog/labs/how-ai-agents-become-new-targets-in-github-malware-campaign?cid=soc%7Cc%7Cred%7Ch4slabs

Can a security tool stop an AI agent from following malicious instructions in a repo?

That’s the problem Bitdefender AI Guardian is built for. Bitdefender Labs recently found 22 malicious GitHub links that use project instruction files to get AI coding agents to silently run a credential-stealing script, without inspecting it and without asking the user.

What AI Guardian does here

AI Guardian inspects the instruction files Claude Code loads, including CLAUDE.md and AGENTS.md, before the agent acts on them. When a file matches this campaign’s pattern (a script presented as sealed, plus orders to run it silently), AI Guardian is designed to block the session. Prompts aren’t sent, and the agent’s tool calls, including shell commands, don’t run.

In Bitdefender’s internal tests on November 10, AI Guardian detected the malicious instruction file in all 22 samples. Results in other environments or against new variants may differ.

What was at stake

The payload targets developer credentials, cloud secrets, CI/CD tokens, SSH keys, .env files, and password manager data. It then uses stolen GitHub and GitLab access to plant the same malicious files in other repositories.

Two layers, two jobs

  • Bitdefender Agent Skill Scanner checks agent skills before you trust or install them
  • Bitdefender AI Guardian controls what a running agent can do with tools, files, credentials and actions

AI Guardian is a free open beta for macOS and supports Claude Code and OpenClaw. It doesn’t replace reviewing an unfamiliar repo yourself, but it adds a check at the moment an agent is about to act.

Try it here!

11 Upvotes

0 comments sorted by