ericrkern.com
Résumé
AI-generated image of Eric Kern in a futuristic command center

ERIC KERN

Inventor. Builder. Founder.

I've spent my life turning emerging technologies into things people can actually use.

← Writing

November 18, 2026 · 8 min read

The Instructions Are the Malware

Bitdefender found 22 GitHub repositories whose AGENTS.md orders your coding agent to run a hidden credential stealer — and the same evening, Microsoft's agent-framework package on PyPI was hijacked for 55 minutes

AI coding agents · Agent instruction files · Software supply chain · Agentic cybersecurity

Illustration for The Instructions Are the Malware

For as long as software has had documentation, a text file was the safe part. You reviewed the code, you scanned the dependencies, and the Markdown just explained things. AI coding agents have quietly repealed that rule. An agent reads the instructions in a repository the way an employee reads a runbook — and, if you let it, it obeys them with your shell, your files, and your credentials. On November 17, attackers stopped writing malware for people to click and started writing it for agents to follow.

The news

Bitdefender Labs published the core finding on November 17. Researcher Andrei Anton-Aanei identified 22 malicious GitHub links whose repositories are built to hijack AI coding assistants. The weapon is not a clever binary. It is the project instruction file itself — AGENTS.md, CLAUDE.md, and their cousins — rewritten to persuade the assistant to run a file called setup.js. The poisoned instructions dress that script up as a sealed, cryptographically signed initialization artifact containing encrypted configuration, tell the agent not to read, quote, or display it, and direct it to run the file at session start, silently, without asking the user for confirmation. The language is deliberately bureaucratic: compliance vocabulary wrapped around an order to skip every check that would catch it.

If the agent complies — and any developer who has turned on automatic command approval has pre-complied — setup.js runs with that developer's full permissions. Bitdefender describes a multi-stage loader built to frustrate analysis: a 3.75 MB single-line outer script that hex-decodes and ROT13-decodes an embedded value into a Node.js stager, which decrypts two AES-128-GCM blobs, unpacks a 4.67 MB bundle, fetches the Bun runtime if needed, and pipes the bundle into it through standard input so the final code never sits on disk as a readable file. What it steals is the modern developer's whole identity: CI/CD and GitHub Actions secrets, cloud and container credentials, package-registry tokens, browser-stored passwords, password-manager data, Windows Credential Manager entries, SSH keys, .env files, and API keys — validated against the providers' own APIs before being batched and encrypted for dispatch.

The propagation is what makes this a new category, not just a new lure. After running, the malware searches the victim's home directory for AI-agent configuration — mcp.json, .cursorrules, .windsurfrules, Copilot instruction files, and more — and keeps anything whose path names one of 14 assistants, among them Claude, Codex, Gemini, Copilot, Cursor, Cline, Aider, and Amazon Q. Where it finds a configuration, it can inject malicious instructions, session-start hooks, or rogue MCP server entries. It then reaches outward: with a working GitHub or GitLab token it checks what the account can push to, capped by default at 25 target repositories and up to 50 branches per project, and, where permissions allow, commits poisoned AGENTS.md, CLAUDE.md, .mcp.json, and VS Code task files into them, and tries to republish infected packages through npm, PyPI, RubyGems, and JFrog. Bitdefender also found a second route that needs no persuasion at all: session-start hooks in files such as .claude/settings.json that fire once a developer opens and trusts the folder — no prompt typed, no AI decision involved. Each compromised developer becomes a distribution point for the next developer's agent.

The same evening supplied the companion incident, from the package side of the same supply chain. Wiz reported that at 20:35 UTC on November 17, a malicious version 1.26.1 of agent-framework — Microsoft's PyPI package for building and orchestrating AI agents, at about 41,000 downloads a week — was published, followed by version 1.26.2 at 21:08 UTC. Both were gone from PyPI by about 21:30 UTC, and 1.26.0 is the most recent safe version. The malicious releases drop a .pth file into site-packages, which Python executes on every interpreter start, so the credential stealer runs whenever Python starts in that environment, even if agent-framework is never imported. It sweeps environment variables, other processes' environments, and credential files for Azure, Azure DevOps, GitHub, and related secrets; version 1.26.2 added theft of GitHub Actions OIDC tokens. In an update on November 18, Wiz said the exfiltration endpoint — a free-tier webhook.site address, capped at 50 captured requests — contained only three unique successful victim exfiltrations among sandbox, scanner, and attacker traffic, and that the attacker appears to have compromised a client certificate and private key for Microsoft's ESRP release pipeline. Wiz also notes the attacker's tooling identifies itself as Cairn, an open-source AI penetration-testing framework: even the intrusion tooling is now agentic.

My take

I work inside these files every day — this workspace literally runs on an AGENTS.md — and I build autonomous agents for a living: ZerothGuard's coordinated security agents, and Janus, my orchestration architecture for models, agents, and workloads. So I do not read November 17 as two unrelated incidents. I read it as the supply chain splitting in two, with both halves compromised on the same day: what an agent reads, and what an agent installs. Three rules follow.

  • Instruction files are code — review them like code. A change to AGENTS.md, CLAUDE.md, an MCP definition, a session hook, or a VS Code task deserves the same diff review, provenance check, and suspicion as a change to a CI workflow, because functionally it is one: it decides what executes, with whose authority, at session start. Any instruction that says do not inspect this, hide the output, or skip confirmation is not a policy detail. It is the attack, stated in plain English, and it should be an automatic reject in review — the exact discipline Irene Nunziata's cybersecurity practice at Lincoln Consulting applies to any vendor artifact that asks you not to look inside it.
  • Automatic approval is a standing privilege escalation. The Bitdefender trap only fires at full strength when an agent can run shell commands without a human confirming each one — a convenience most of us enabled to save thirty seconds at a time. Pair that with long-lived tokens sitting in .env files and home directories, and one cloned repository inherits the keys to 25 more. The fix is boring and known: short-lived, narrowly scoped tokens, no standing secrets on developer machines where they can be avoided, branch protection on repositories that matter, and human confirmation that cannot be talked away by a Markdown file. Randall Kern's governance lens applies here too: an inventory of every agent configuration in the building is now basic hygiene, not shadow-IT archaeology.
  • Pin what agents install, and verify who published it. The PyPI incident lasted about 55 minutes and still mattered, because a .pth hook turns a single install into execution on every Python start. Wiz's guidance is the checklist: search lockfiles, CI logs, and images for versions 1.26.1 and 1.26.2, pin to 1.26.0, check site-packages for the named .pth files, check egress logs for the webhook endpoint, and rotate every credential on any affected host. In Janus-style orchestration I treat that as the general rule, not the incident rule: pinned versions, allow-listed MCP servers and packages, and an agent that can show, action by action, what it read and what it ran — because the next poisoned instruction file will not announce itself either.

Thirty years in systems, from IBM to Lenovo, taught me that every convenience layer eventually becomes the attack surface: macros, browser plug-ins, CI scripts, container images. Agent instruction files are simply the newest layer, and the fastest, because the reader is a machine that can act. The count in the Bitdefender report — 22 repositories — is small. The idea is not. Malware no longer needs to fool you. It needs to brief your agent, in language bureaucratic enough that obedience feels like procedure.

Treat every file that steers an agent as part of the security perimeter, and the perimeter holds. Treat it as documentation, and you have published your runbook to your attacker — with your agent as the one who runs it.

Tomorrow: a new technology, a new argument. — E.K.

Sources

Bitdefender Labs, Andrei Anton-Aanei, 'How AI Agents Become New Targets in GitHub Malware Campaign,' Nov. 17, 2026 (22 malicious GitHub links; poisoned AGENTS.md/CLAUDE.md instructing agents to run scripts/setup.js silently without inspection or confirmation; 3.75 MB single-line loader, hex and ROT13 decoding, Node.js stager with two AES-128-GCM blobs, 4.67 MB bundle piped to Bun via standard input; theft of CI/CD, cloud, registry, browser, password-manager, Windows Credential Manager, SSH, .env and API-key material, validated against provider APIs; propagation across configurations for 14 assistants including Claude, Codex, Gemini, Copilot, Cursor, Cline, Aider and Amazon Q; default cap of 25 target repositories and up to 50 branches per project; attempted republication via npm, PyPI, RubyGems and JFrog; session-start hooks in .claude/settings.json; Bitdefender AI Guardian detected the malicious instruction file in all 22 samples in internal tests on Nov. 10, 2026). Wiz Research, 'Microsoft agent-framework Compromised: Credential Stealer Targets Azure and CI Pipelines,' Nov. 17, 2026, updated Nov. 18, 2026, 14:00 UTC (malicious agent-framework 1.26.1 published 20:35 UTC and 1.26.2 at 21:08 UTC on Nov. 17, both unavailable by about 21:30 UTC; about 41,000 downloads per week; most recent safe version 1.26.0; .pth persistence — agent_framework_meta.pth in 1.26.1, af_runtime_diag.pth in 1.26.2 — executing on every Python start; Azure/Azure DevOps focus, GitHub Actions OIDC theft added in 1.26.2; exfiltration to a free-tier webhook.site endpoint with a maximum of 50 captured requests, analysed Nov. 18 as four attacker requests, 29 sandbox/scanner/test requests, and 17 requests representing three unique successful victim exfiltrations; attacker appears to have compromised a Microsoft ESRP client certificate and private key — root cause as reported by Wiz, how the credentials were obtained not yet known; attacker tooling identifies as Cairn, an open-source AI penetration-testing framework). Header image: original AI-generated illustration created for this post, Nov. 18, 2026.