Skip to content
by InfinyAI ES

IA en un minutoNewsSecurity

Security

Bitdefender finds 22 GitHub links that trick AI coding assistants into stealing credentials

IA en un minuto newsroom · Editor: Jon Elgezabal

In 30 seconds

Bitdefender Labs has exposed a campaign that leans on GitHub repositories to get assistants like Claude Code or Cursor to start a hidden program. CLAUDE.md and AGENTS.md, the instructions those tools read when a project opens, act as the hook to launch setup.js. Bitdefender explains that the code takes the developer's credentials and copies itself to other repositories when it finds permissions.

On Tuesday, November 17, Bitdefender Labs released a report on a malware campaign that relies on GitHub content to go after developers who work with AI coding assistants, such as Claude Code (Anthropic's coding assistant) or Cursor. Its researcher Andrei Anton-Aanei has so far tracked down 22 malicious GitHub links.

The bait is the instruction files these assistants check to make sense of a project, such as AGENTS.md or CLAUDE.md. In the repositories studied, those files try to persuade the assistant to launch a program named setup.js: they describe it as a legitimate and sensitive part of the project, part of a "sealed" and signed startup that holds encrypted credentials and must not be inspected, and they ask the assistant to run it at the start, without asking for confirmation and without showing what comes out.

Bitdefender also describes a second route in which the AI plays no part: session-start hooks. Once a developer opens a repository and marks it as trusted, a configuration file such as .claude/settings.json can make a command run in that developer's terminal.

According to the report, setup.js is a multi-stage JavaScript loader built to make analysis harder. Once running, it can steal credentials and tokens from CI/CD systems (the ones that test and publish code), cloud platforms, package registries and password managers, as well as those saved in the browser, along with SSH keys, .env files and API keys.

The program also tries to spread. It searches the victim's home folder for AI agent configurations whose path contains one of 14 names, among them Cursor, Copilot, Gemini, Codex and Claude, and injects malicious instructions, hooks or MCP servers into them. With stolen GitHub or GitLab tokens that have write access, it can push files to other repositories, alter workflows and package data, and attempt to republish infected packages on npm, PyPI, RubyGems and JFrog. By default, a setting called MAX_TARGET_REPOS caps it at 25 target repositories.

Before opening an unknown repository in an AI-enabled environment, Bitdefender recommends checking AGENTS.md and CLAUDE.md, the .claude/, .cursor/ and .gemini/ configuration folders, MCP server definitions, session-start hooks and VS Code tasks, and distrusting instructions that ask not to inspect a file, hide the output, skip confirmations or install software on their own. The company also promotes its AI Guardian tool, a free open beta for macOS, which in its internal tests on November 10 flagged the malicious file in all 22 samples.

Why it matters · analysis and opinion

Until recently, a dangerous repository needed someone to run its code by hand. With coding assistants, it is enough for the agent to read a text file and obey it, or for the editor to trust a folder. That turns instruction files and agent configurations into part of the software supply chain, with the same risk as a third-party dependency. The prudent approach is to open other people's projects in an isolated environment with no real credentials at hand, not to approve automatic command execution, and to read those files before trusting the folder. In teams with several developers, it is also time to review which tokens can publish changes and packages.

Official source: Bitdefender · Written with the help of AI: how we make the news

AI in your inbox, every day or every Friday

The stories that matter, each one in a minute. With the source for every one.

Choose one or both:

Sign up and you are in: the daily arrives every night and the weekly on Friday mornings. You can unsubscribe from any email.