Press enter or click to view image in full size
I genuinely thought this was an April Fool’s prank. Every year, companies like Google pull some elaborate stunt, so when I saw the “Claude Code leak” trending on April 1st, I kept scrolling.
But out of curiosity, I checked the npm registry for @anthropic-ai/claude-code. The version everyone was talking about (v2.1.88)?
Gone. Not deprecated. Not hidden. Just scrubbed from existence.
That’s when it stopped looking like a joke.
Press enter or click to view image in full size
This wasn’t a sophisticated zero-day or a database breach. It is just a bad release.
It was a perfect example of how modern software supply chains fail fast and fail publicly:
.map file (cli.js.map) that didn't just map code—it contained the sourcesContent for the entire project.Press enter or click to view image in full size
A source map is a JSON file that acts as a bridge between your “ Production Code” and your “Development Code.”
Press enter or click to view image in full size
Why this exists:
Modern web development is a series of transformations:
The final code is a single-line mess. If an error happens in production, your stack trace looks like this: Error at a.js:1:98432. You are effectively blind.
Join Medium for free to get updates from this writer.
The Fix:
A source map tells the browser: “Line 1, column 98432 in bundle.js actually maps to line 42 in AuthService.ts."
If you’re a dev and you see a .map file in the wild, here is how you "reverse" it.
webpack:// or file://.sourcesContent is a Security NightmareIf you open that .map file in a text editor instead of a browser, you’ll see why DevTools is able to show you the original code.
Most people don’t realize there are two ways a source map handles your files:
"sources": ["src/main.ts"]). If a hacker downloads this, they get a list of your filenames, but the files are empty because they don't have access to your local machine's file system.sourcesContent field. This is a massive array of strings containing the actual raw source code of every single file in your project.This is what Anthropic did. They didn’t just point to the code; they bundled the entire repository inside the map file. When you have sourcesContent, DevTools doesn't need to look for your files on a server—it already has the full text sitting right there in the JSON. What We Learned (The “Undercover Mode” and more)
The leak revealed more than just code; it revealed Anthropic’s roadmap:
.npmignore or a missing files field in package.json can bypass all your firewalls.Pro-tip: Use a tool like source-map-explorer As part of your CI/CD, visualize what you're actually shipping before it hits the registry.