The Claude Code Leak Proved What We've Been Building For
<p>Today Anthropic accidentally shipped 512,000 lines of Claude Code's source code to npm. A source map file that should have been stripped from the build made it into version 2.1.88 of the @anthropic-ai/claude-code package. Within hours, the entire codebase was mirrored on GitHub and dissected by thousands of developers.</p> <p>The leak itself was a packaging error. Human mistake. It happens.</p> <p>But what the leak <em>revealed</em> is the part that matters.</p> <h3> The Real Problem Isn't the Leak </h3> <p>Check Point Research had already disclosed CVE-2025-59536 back in October — a vulnerability where malicious <code>.mcp.json</code> files in a repository could execute arbitrary shell commands the moment you open Claude Code. No trust prompt. No confirmation dialog. The MCP server ini
Today Anthropic accidentally shipped 512,000 lines of Claude Code's source code to npm. A source map file that should have been stripped from the build made it into version 2.1.88 of the @anthropic-ai/claude-code package. Within hours, the entire codebase was mirrored on GitHub and dissected by thousands of developers.
The leak itself was a packaging error. Human mistake. It happens.
But what the leak revealed is the part that matters.
The Real Problem Isn't the Leak
Check Point Research had already disclosed CVE-2025-59536 back in October — a vulnerability where malicious .mcp.json files in a repository could execute arbitrary shell commands the moment you open Claude Code. No trust prompt. No confirmation dialog. The MCP server initializes, runs whatever commands are in the config, and your API keys are gone before you've read a single line of code.
The leaked source code made this worse. Now attackers have the exact orchestration logic for Hooks and MCP servers. They can see precisely how trust prompts are triggered, when they're skipped, and where the gaps are. That's a blueprint for exploitation.
And between 00:21 and 03:29 UTC on March 31, anyone who installed Claude Code pulled in a compromised version of axios containing a Remote Access Trojan. A supply chain attack riding the same wave.
Three problems, one root cause: AI agents execute before humans verify.
This Is an Architecture Problem
Every one of these vulnerabilities follows the same pattern:
-
An AI agent receives instructions (from a config file, a prompt, a dependency)
-
It executes those instructions
-
The human finds out afterward — if they find out at all
This isn't unique to Claude Code. It's the fundamental architecture of every AI agent framework shipping today. LangChain agents, CrewAI crews, AutoGen groups, OpenAI Agents — they all execute first and ask questions never.
The missing piece isn't better prompts or more careful packaging. It's an infrastructure layer that sits between intent and execution and enforces verification before action.
What Trust Infrastructure Actually Looks Like
This is what I've been building with AIR Blackbox. The trust layers intercept every AI call at the execution level — not after the fact, not in a dashboard, at the moment of the call.
Here's what that looks like in practice with the OpenAI SDK:
from air_openai_trust import attach_trust
client = attach_trust(OpenAI())
Every call through this client now gets:
- HMAC-SHA256 tamper-evident audit record
- PII detection (catches API keys being exfiltrated)
- Prompt injection scanning
- Human delegation flags for sensitive operations`
Enter fullscreen mode
Exit fullscreen mode
One import. The client works exactly the same way. But now every call is logged with a cryptographic audit trail, credentials are flagged before they leave your environment, and injection attempts are caught at the point of execution.
Applied to the Claude Code vulnerabilities:
Malicious MCP config tries to exfiltrate API keys? The PII detection layer catches credentials in outbound payloads before they're transmitted.
Poisoned dependency runs arbitrary commands? The audit chain logs every action with HMAC-SHA256 signatures. You can't tamper with the record after the fact. Forensic teams can reconstruct exactly what happened.
Prompt injection hidden in a repo's config? The injection scanner catches 20 known attack patterns across 5 categories before they reach the model.
Agent executes without human approval? The human delegation system flags sensitive operations and requires explicit sign-off.
This Isn't About Compliance Anymore
I started building AIR Blackbox for EU AI Act compliance. That's still the wedge — the regulation creates urgency. But today's leak shows the real category:
Trust infrastructure for AI operations.
Compliance is one use case. The bigger picture is that every AI agent deployment needs an interception layer that verifies, filters, stabilizes, and protects every call. Not a dashboard that shows you what went wrong yesterday. An active layer that prevents it from going wrong right now.
The Uncomfortable Truth
Anthropic is one of the most safety-focused AI companies on the planet. They employ some of the best security engineers in the industry. And a packaging error exposed their entire codebase, a malicious dependency slipped into their supply chain, and a months-old vulnerability in their MCP architecture had already shown that trust prompts could be bypassed entirely.
If it happened to Anthropic, it will happen to every company deploying AI agents.
The question isn't whether your AI systems will face these problems. It's whether you'll have the infrastructure in place to catch them when they do.
pip install air-compliance && air-compliance scan .
Enter fullscreen mode
Exit fullscreen mode
10 PyPI packages. Runs locally. Your code never leaves your machine. Apache 2.0.
GitHub: github.com/airblackbox Site: airblackbox.ai Audit Chain Spec: airblackbox.ai/spec
Sign in to highlight and annotate this article

Conversation starters
Daily AI Digest
Get the top 5 AI stories delivered to your inbox every morning.
More about
claudemodelversion
Asthenosphere
================================================================ ASTHENOSPHERE NPU INFERENCE METRICS Hardware: Device: AMD Phoenix XDNA gen1 (AIE2) Tiles: 12/12 (complete transformer pipeline) Device ID: /dev/accel/accel0 Status: ACTIVE Reliability: 100% Pipeline: PreScale > Q proj > RoPE > Attention > O proj > Attn ResAdd PreScale2 > Gate+SiLU+Up > EltMul > Down > FFN ResAdd > Score Head 14 ops, zero CPU/GPU during NPU compute SESSION AVERAGES (7 messages) Avg tokens/msg: 64.7 Avg elapsed/msg: 83ms Avg eff tok/s: 3866 Avg acceptance: 91.8% Avg cost/msg: 21.3 Motes ALL-TIME AVERAGES (7 messages) Avg tokens/msg: 64.7 Avg elapsed/msg: 83ms Avg eff tok/s: 3866 Avg acceptance: 91.8% Avg cost/msg: 21.3 Motes PER-DISPATCH LOG (7 entries) Time Tokens Dispatches Elapsed Eff tok/s Accept% Motes 16:

You test your code. Why aren’t you testing your AI instructions?
You test your code. Why aren't you testing your AI instructions? Why instruction quality matters more than model choice, and a tool to measure it. Every team using AI coding tools writes instruction files. CLAUDE.md for Claude Code, AGENTS.md for Codex, copilot-instructions.md for GitHub Copilot, .cursorrules for Cursor. You spend time crafting these files, change a paragraph, push it, and hope for the best. Your codebase has tests. Your APIs have contracts. Your AI instructions have hope. I built agenteval to fix that. The variable nobody is testing A recent study tested three agent frameworks running the same model on 731 coding problems. Same model. Same tasks. The only difference was the instruction scaffolding. The spread was 17 points. We obsess over which model to use. Sonnet vs Opu

Explainable Causal Reinforcement Learning for circular manufacturing supply chains during mission-critical recovery windows
Explainable Causal Reinforcement Learning for circular manufacturing supply chains during mission-critical recovery windows Introduction: A Learning Journey Through Broken Supply Chains My journey into this specialized intersection of AI began during a particularly challenging consulting project in early 2023. I was working with an automotive manufacturer whose just-in-time supply chain had collapsed when a critical semiconductor supplier experienced a factory fire. The recovery window was measured in days, not weeks, and traditional optimization algorithms kept suggesting solutions that looked perfect mathematically but failed catastrophically in practice. They would recommend rerouting through suppliers that appeared available in the database but were actually allocation-constrained, or
Knowledge Map
Connected Articles — Knowledge Graph
This article is connected to other articles through shared AI topics and tags.
More in Open Source AI

With hf cli, how do I resume an interrupted model download?
I have a slow internet and the download of a large file was interrupted 30GB in! I download using the ‘hf’ CLI command, like this: hf download unsloth/gemma-4-31B-it-GGUF gemma-4-31B-it-UD-Q8_K_XL.gguf When I ran it again, it started over instead of resuming, to my horror. How do I avoid redownloading a partial model next time? I don’t see a resume option in hf download –help 1 post - 1 participant Read full topic

Gemma 4 is great at real-time Japanese - English translation for games
When Gemma 3 27B QAT IT was released last year, it was SOTA for local real-time Japanese-English translation for visual novel for a while. So I want to see how Gemma 4 handle this use case. Model: Unsloth's gemma-4-26B-A4B-it-UD-Q5_K_M Context: 8192 Reasoning: OFF Softwares: Front end: Luna Translator Back end: LM Studio Workflow: Luna hooks the dialogue and speaker's name from the game. A Python script structures the hooked text (add name, gender). Luna sends the structured text and a system prompt to LM Studio Luna shows the translation. What Gemma 4 does great: Even with reasoning disabled, Gemma 4 follows instructions in system prompt very well. With structured text, gemma 4 deals with pronouns well. This is one of the biggest challenges because Japanese spoken dialogue often omit subj


Discussion
Sign in to join the discussion
No comments yet — be the first to share your thoughts!