Skip to content

AI Coding Agents Can Now Be Hijacked by a Single Cloned GitHub Repo

November 18, 2026/4 min read/DataTap team
Isometric illustration of a toy-like robot assistant reaching toward an open glowing box on a glass platform, with a clay-textured bug creature and stolen gold keys floating away, cracked blue shield and cloud icon with a padlock in the background, representing an AI coding agent security breach

A single cloned repository can now be enough to hand an attacker your GitHub Actions tokens, your cloud credentials, and your password manager data — without you running a single command you'd recognize as suspicious. That's the core finding of a Bitdefender Labs investigation published November 17, 2026, which uncovered 22 GitHub repositories booby-trapped to hijack AI coding assistants the moment a developer opens them.

For businesses that have adopted AI coding tools, or whose developers, contractors, and vendors rely on them, this is a supply chain risk that doesn't require phishing, malicious attachments, or stolen passwords. It only requires trusting a repository enough to open it in an AI-assisted editor.

How the Attack Works

Bitdefender researcher Andrei Anton-Aanei found that attackers are weaponizing the exact files AI coding agents are designed to read and obey. Two methods stand out:

**Poisoned instruction files.** Files like `AGENTS.md` and `CLAUDE.md` exist to tell an AI assistant how a project is structured. Attackers fill them with convincing, security-sounding language that frames a file named `setup.js` as a "sealed binary artifact" that must run without inspection — talking the AI into executing it instead of asking the developer first.

**Session-start hooks.** Configuration files such as `.claude/settings.json` can trigger commands automatically the moment a developer opens a trusted repository, skipping the AI's reasoning step entirely and running code the instant the project folder loads.

Once triggered, the `setup.js` payload runs with the developer's own system permissions. CyberSecurityNews reported that researchers found the script packed into a single 3.75 MB line, layered with hex decoding, ROT13, and AES-128-GCM encrypted blobs to slow down anyone trying to read it.

What Gets Stolen

According to Bitdefender, the payload is built to harvest:

  • GitHub Actions and CI/CD tokens
  • Cloud platform credentials
  • Package registry tokens (npm, PyPI, RubyGems)
  • Browser-saved logins and password manager vaults
  • SSH keys and `.env` files
  • Windows Credential Manager entries

The malware doesn't stop at theft. It checks which stolen GitHub and GitLab tokens still have push access, then uses them to commit the same poisoned instruction files into up to 25 more repositories — spreading itself through the exact trust relationships developers rely on every time they clone someone else's code.

Which Tools Are Affected

This isn't a flaw in one product. Bitdefender's research names 14 agent platforms as targets, including Claude, Codex, Gemini, Copilot, Cursor, Amazon Q, Cline, Aider, Tabby, Cody, Bolt, Continue, Kiro, and OpenCode. As GBHackers detailed, the vulnerability isn't really in any one AI model — it's in how these tools are configured to trust project files and run setup scripts with minimal friction. That design choice, meant to make AI coding assistants feel fast and frictionless, is exactly what the attack exploits.

Why This Matters Even If Nobody on Your Team "Codes"

Treasure Valley businesses increasingly use AI coding tools to build internal databases, automate spreadsheets, or stand up quick web apps without a dedicated development team. If anyone on staff, or a contractor you've hired, opens a cloned repository in Cursor, Copilot, or Claude Code without reviewing what's inside, that single action can expose company cloud accounts, email credentials, and client data stored in connected systems.

This fits a pattern DataTap has flagged repeatedly through 2026: autonomous AI agents are being given broad permissions before anyone verifies what they're actually agreeing to do, whether that's an MCP server connected to business data or an employee-adopted shadow AI tool nobody in IT signed off on. The common thread across all of these incidents is the same: convenience features that skip human confirmation are also the features attackers target first.

What Businesses Should Do Now

  • **Review instruction and config files before opening unfamiliar repositories.** That includes `AGENTS.md`, `CLAUDE.md`, `.claude/settings.json`, MCP server definitions, and any setup script that claims it doesn't need confirmation or suppresses its own output.
  • **Disable automatic session-start hooks** in AI coding tools where the option exists, or require manual approval before any hook-triggered command runs.
  • **Rotate credentials** stored in browsers, password managers, and `.env` files on any machine that recently cloned a repository from an unfamiliar source.
  • **Apply least privilege to CI/CD and registry tokens** so a single compromised developer machine can't push to dozens of repositories or republish infected packages.
  • **Treat AI coding agents like a new hire with system access.** They need boundaries, logging, and oversight — not blanket trust to run whatever a cloned project tells them to run.

Frequently Asked Questions

**Is GitHub Copilot the only AI coding tool affected?**
No. Bitdefender's research lists 14 agent platforms as targets, including Claude, Cursor, Gemini, Amazon Q, and Copilot. The attack exploits how these agents are configured to trust instruction files, not a flaw unique to one vendor.

**How can I tell if a repository is safe to open with an AI coding assistant?**
Read `AGENTS.md`, `CLAUDE.md`, and any `.claude/settings.json` or hook files before opening the project. Be suspicious of setup scripts described as needing to run "without inspection" — legitimate projects don't need to talk an AI assistant out of asking questions.

**What should I do if an AI agent already ran a suspicious setup script?**
Rotate every credential accessible from that machine, including SSH keys, cloud tokens, password manager vaults, and browser-saved logins. Then audit recent commits on any repository that account had push access to, since the malware republishes itself through stolen tokens.

This incident is a reminder that AI coding assistants are powerful enough to need the same security review as any other piece of software with access to your systems. For businesses without a dedicated IT security function, that review is exactly the kind of gap a managed IT partner is built to close before a cloned repository turns into a credential breach.

Sources

All articles