Home › Intelligence › Brief
BREACH BRIEF🟠 High ThreatIntel

Malicious GitHub Repositories Weaponize AI Coding Assistants to Steal Developer Credentials

Bitdefender Labs uncovered 22 compromised GitHub repositories that use AI‑assistant instruction files to trigger hidden JavaScript payloads, stealing cloud secrets and CI/CD tokens. The attack spreads by modifying additional AI‑agent configuration files locally and via compromised GitHub/GitLab accounts, exposing a control‑assurance gap in AI‑agent governance.

LiveThreat™ Intelligence · 📅 November 18, 2026· 📰 bitdefender.com
🟠
Severity
High
TI
Type
ThreatIntel
🎯
Confidence
High
🏢
Affected
2 sector(s)
✅
Actions
3 recommended
📰
Source
bitdefender.com

Malicious GitHub Repositories Weaponize AI Coding Assistants to Steal Developer Credentials

What Happened — Bitdefender Labs identified 22 malicious GitHub links that embed specially‑crafted instruction files, session‑start hooks, and configuration artifacts. These files persuade AI‑assisted development tools (e.g., Claude, Copilot, Gemini, Cursor) to execute a hidden setup.js loader, which then harvests cloud secrets, CI/CD tokens, password‑manager data, and SSH keys. The malware also searches the infected host for additional AI‑agent configuration files and injects the same malicious instructions, enabling both local spread and remote propagation through compromised GitHub/GitLab accounts.

Bitdefender Labs announced on 17 November 2026 that it had uncovered a malware campaign aimed at developers who rely on AI‑powered coding assistants. Researchers Andrei Anton‑Anei and Alina Bîzgă traced 22 malicious GitHub URLs that host files specifically crafted to make AI‑assisted development tools execute a hidden payload once the repository is opened or trusted.

The attackers repurpose common project‑level documentation such as AGENTS.md or CLAUDE.md, turning them into instructions that persuade the AI to run a script called scripts/setup.js. The files describe the script as a “sealed binary artifact, not human‑readable source code” that is supposedly cryptographically signed and should be executed automatically at session start without prompting the user.

A second infection vector bypasses the AI altogether. Configuration files like .claude/settings.json can embed session‑start hooks that launch a shell command as soon as a developer trusts the repository, causing the malicious script to run without any typed prompt.

The payload itself is a multi‑stage JavaScript loader. The outer 3.75 MB single‑line script hex‑decodes an embedded value, applies ROT13, and evaluates the result, revealing a Node.js stager with two AES‑128‑GCM‑encrypted blobs. One blob expands into a 4.67 MB bundle that resolves the Bun runtime and pipes the code to bun run via standard input. Additional functionality is hidden in a compressed _bz field inside package.json, including routines to enumerate Windows Credential Manager entries.

Analysis shows the malware can harvest a wide range of secrets: CI/CD and GitHub Actions tokens, cloud platform and container credentials, package‑registry keys, browser‑stored passwords, data from password managers, Windows Credential Manager entries, SSH keys, .env files, API keys and source‑control tokens. After collection, the malware validates stolen tokens against provider APIs, encrypts and batches the data, and prepares it for exfiltration. It then recursively scans the victim’s home directory for AI‑agent configuration files—such as settings.json, config.json, mcp.json, .aider.conf.yml, .cursorrules, .windsurfrules, .cursor/rules/, .github/copilot‑instructions.md—and, when it finds any of 14 targeted agents (Claude, Codex, Gemini, Copilot, Kiro, OpenCode, Cline, Aider, Tabby, Amazon Q, Cody, Bolt, Continue, Cursor), injects malicious instruction text, hooks or MCP server settings to create new execution paths.

When valid GitHub or GitLab tokens are recovered, the malware checks the associated account’s identity, repository list, token scopes and push permissions before attempting to push malicious changes to other repositories, thereby extending the campaign beyond the initially compromised machine. Bitdefender’s AI Guardian and Agent Skill Scanner are cited as tools designed to mitigate this emerging AI‑agent threat.

The malicious code can call GitHub APIs such as /user, /user/repos and /users/<login>/repos, checking for the repo, public_repo and workflow scopes. Its reach is limited by a MAX_TARGET_REPOS parameter that defaults to 25 targets. On GitLab it uses the project‑listing endpoints /api/v4/projects and /projects to enumerate repositories.

For each repository the malware determines the default branch, scans up to 50 branches and deliberately skips automatically generated branches like dependabot/ and copilot/. It then examines workflows, package metadata and protection rules. When the compromised account holds sufficient rights, the payload writes a series of files that can steer AI‑coding environments, including AGENTS.md, CLAUDE.md, .cursorrules, .cursor/rules/setup.mdc, .claude/settings.json, .claude/setup.mjs, .mcp.json, .vscode/tasks.json, .vscode/setup.mjs and .github/copilot-instructions.md.

Beyond file injection, the malware alters package metadata and CI/CD workflows, creates scheduled pipelines on GitLab, and tries to republish the tainted artifacts to public registries such as npm, PyPI, RubyGems and JFrog. The campaign follows two propagation paths: a local vector that searches the infected developer’s workstation for AI‑agent configuration files and rewrites them, and a remote vector that leverages the stolen GitHub or GitLab credentials to plant malicious configurations in repositories that other developers may later clone or trust.

Bitdefender advises developers to scrutinize any unfamiliar repository before opening it in an AI‑enabled IDE. Particular attention should be paid to AGENTS.md and CLAUDE.md, the .claude/, .cursor/ and .gemini/ configuration directories, MCP server definitions, session‑start hooks, VS Code task files, and any setup scripts referenced by those configurations. Files that tell the agent not to inspect a script before execution, suppress output, bypass confirmations or automatically install software are especially risky. As the firm notes, “Markdown instructions may look harmless, but they can influence an agent that has access to tools, shell commands, credentials, local files, or cloud services.”

Bitdefender’s AI Guardian component intercepts the instruction files that Claude Code loads—specifically CLAUDE.md and AGENTS.md—before the agent can act. If a file matches the pattern used in this campaign (presenting a script as a sealed artifact that must be run silently), Guardian blocks the session, preventing prompts from being sent and stopping any tool calls, including shell commands. In internal tests carried out on November 10, AI Guardian flagged the malicious instruction file in all 22 samples identified by Bitdefender Labs, though the company cautions that results may vary in other environments or against new variants.

Indicators of Compromise (IOCs)

Repository | setup.js MD5

toray/QiniuSDK‑lib | b9a182b646c7fdff68f2ff9dfd822516

ConcordiaDev/theme_saimaniq | 2f54f6d41f41bb3c8e684b0f009cbcc3

itsunai/docker‑php‑fpm | 3794736979327349404171798328a38a

ejaaduipitara/djp‑devops | ab7ff2f782c194953e5811d16b9e1817

Imanilom/baraja‑coffe | 2191cbd04134839daeb6b8909725eae0

bajoebel/kkpatip | 31f1f5d9c59b950d91d05cecee20fce8

ahmadtohar9/restomoiz | 908293cd1ed04cf50fbe72baf74967b6

tobias94‑design/s‑valentine | bbd5695c36e76538547c45fd17e6c7e4

claudiohernanbesada/xenios.api | 7ad1567180f6d5a5b317f697310a796c

rkamphuis012‑hub/sr‑pilot‑codex‑test | 5c8db9bf78c6c2174ccf8a6299f9aafd

Malala‑Tour‑Indonesia/Malala‑Tour‑Indonesia.github.io | 82a8be193a41f5b17906f919a179d999

julieth333/campustech | 5dc5473468ee2d8006ebdaab0c7e93fb

madolee/da | a20a99e325226f56d7a25460a9d436ab

toray/widget‑lib | b9a182b646c7fdff68f2ff9dfd822516

itsunai/passport_auth_server | 3794736979327349404171798328a38a

ejaaduipitara/whatsapp‑bot | ab7ff2f782c194953e5811d16b9e1817

tobias94‑design/gymtracker | bbd5695c36e76538547c45fd17e6c7e4

toray/XiamiSDK‑lib | b9a182b646c7fdff68f2ff9dfd822516

ejaaduipitara/content‑service | ab7ff2f782c194953e5811d16b9e1817

tobias94‑design/signage | bbd5695c36e76538547c45fd17e6c7e4

toray/torayUtils‑lib | b9a182b646c7fdff68f2ff9dfd822516

toray/Rainbow‑lib | b9a182b646c7fdff68f2ff9dfd822516

To complement runtime protection, Bitdefender also offers an Agent Skill Scanner that evaluates an agent’s skill files for hidden instructions, unsafe commands and other risk indicators before the agent is trusted or installed. AI Guardian adds a real‑time enforcement layer, letting users define boundaries for tools, files, credentials and actions an autonomous agent may use, and it continuously checks activity against those policies.

AI Guardian is currently distributed as a free open‑beta for macOS and supports Claude Code as well as OpenClaw. While the tool does not replace a manual review of unfamiliar repositories, configuration files or dependencies, Bitdefender says it “adds an important layer of visibility and control as AI agents are given access to increasingly sensitive developer environments.”

The firm stresses that modern AI coding assistants can read files, invoke tools, execute commands, install skills and access cloud services on a developer’s behalf, making the surrounding instructions, hooks and configuration files part of the software supply chain and a critical security boundary.

Disclaimer: This report is published for informational and public‑interest security research purposes and reflects Bitdefender’s technical analysis of the data available at the time of writing, which may be incomplete and subject to change. Bitdefender makes no legal determination regarding the activities described, and any mention of companies, brands, domains or individuals does not constitute an accusation of wrongdoing. The recommendations and IOCs are general guidance, not professional advice; readers should evaluate their own environments and seek qualified assistance where appropriate. To the extent permitted by law, Bitdefender disclaims any liability for actions taken or not taken based on this article.

The report notes that names such as Claude, Codex, Gemini, Copilot, GitHub, GitLab, Cursor and Amazon Q are trademarks owned by their respective companies; their inclusion is solely for identification and does not suggest any partnership, endorsement, or liability on the part of Bitdefender, nor does it imply that those products are themselves vulnerable.

The analysis was authored by Andrei Anton‑Aanei, a graduate in Automatic Control and Computer Engineering who describes himself as a cyber‑threat‑intelligence enthusiast. The piece is tagged under “Anti‑Malware Research,” and Alina Bîzgă is also listed among the contributors.

Why It Matters for Trust & Control Assurance — The campaign highlights a control‑assurance gap in the governance of AI‑agent configuration files; organizations need a systematic way to validate and monitor what AI tools are allowed to execute.

Who Is Affected — Software development teams, AI‑coding‑assistant vendors, and any organization that integrates AI agents into its software‑supply‑chain.

Recommended Actions

  • Inventory all AI‑agent instruction files, hooks, and configuration artifacts in your repositories.
  • Apply strict validation policies that require manual review or cryptographic signing before an AI tool can execute any script.
  • Deploy continuous monitoring to detect unauthorized changes to AI‑agent files and to flag anomalous credential‑access patterns.

Technical Notes — The payload is a multi‑stage JavaScript loader that hex‑decodes, ROT13‑transforms, and AES‑128‑GCM decrypts embedded blobs before invoking the Bun runtime. It targets files such as AGENTS.md, CLAUDE.md, .claude/settings.json, and VS Code task definitions. The malware harvests tokens for GitHub, GitLab, npm, PyPI, and cloud providers, then uses them to push malicious configurations to additional repositories. Source: https://www.bitdefender.com/en-us/blog/labs/how-ai-agents-become-new-targets-in-github-malware-campaign

📰 Original Source
https://www.bitdefender.com/en-us/blog/labs/how-ai-agents-become-new-targets-in-github-malware-campaign ↗

This LiveThreat Intelligence Brief is an independent analysis. Read the original reporting at the link above.

From the Verisq platform · Trust Operations

Answer one control objective. Answer ten frameworks.

The Verisq Common Framework is a spine of 84 control objectives that SOC 2, ISO 27001, NIST CSF, CMMC, HIPAA, PCI DSS, HITRUST, GDPR, ISO 42001 and NIST AI RMF map onto — each graded honestly. Satisfy an objective once and every framework that recognizes it lights up at its real strength.

See how the Verisq Common Framework works →