Claude Code leaked: is it still safe to use at work, and what should security teams check?
Updated
Short answer
Yes, if you put controls around it. "Claude Code leak" covers three separate events: Anthropic's own source code shipped in an npm package, developers' secrets saved by "don't ask again" and committed to public repos, and about 100 corporate Claude accounts exposed at the vendor. Each one needs its own check. This week, scan your repos for Claude Code settings files, rotate any secret you find, take an inventory of installed versions, and add a check that runs outside the agent.
Three leaks, three different owners#
Search "Claude Code leak" and you get three unrelated stories. Handle them separately. Fixing one does nothing for the other two.
| Event | What leaked | Whose problem |
|---|---|---|
| Source map in the npm package (reported Mar 31, 2026) | The tool's own code | Mostly Anthropic's, though attackers learn how the tool works |
| "Don't ask again" settings files (reported Nov 7, 2026) | Your developers' passwords and keys | Yours |
| Korean corporate account exposure (reported to the regulator Oct 31) | Account details held by the vendor | The vendor's, plus the affected customers |
The source code leak#
Version 2.1.88 of the @anthropic-ai/claude-code npm package shipped with a 59.8 MB source map "intended for internal debugging", per VentureBeat. Anthropic called it "a release packaging issue caused by human error, not a security breach" and said no sensitive customer data or credentials were involved or exposed.
Your data didn't leak in this one. What leaked is a detailed picture of how the tool works, and an attacker can use it to build a malicious repo aimed at the agent. See opening untrusted repos with an agent.
What to check: which Claude Code versions are on your laptops, and whether they came from npm or another installer.
The "don't ask again" secrets#
This one is on you. When a developer picks "Yes, and don't ask again" on a Bash command, Claude Code saves that approval as an allow rule in a settings file, per Anthropic's docs. If a password was typed into that command, it gets saved too. Then the file gets committed.
The Hacker News reported 104,185 copies of the file across 103,617 public repositories. 1,122 of them held at least one secret, for 1,379 distinct secrets in total.
Our post on the don't-ask-again leak walks through it step by step, with exact file paths. The short checklist:
- Rotate first. Change every password, token and key those files ever held. Deleting the file doesn't remove it from git history.
- Search every repo in your org, including history, for committed Claude Code settings files.
- Untrack committed copies with
git rm --cachedand add the files to your repo.gitignoretemplates. - Make sure secret scanning catches passwords inside commands, not just known key formats.
- Have developers pull credentials from a secrets manager as variables instead of typing them into commands.
The account exposure#
Anthropic reported a leak to South Korea's Personal Information Protection Commission on October 31, covering about 100 corporate accounts in Korea, per Maeil Business. Anthropic's statement says the intruder "did not access prompts, outputs, or payment information." As of November 9, the commission's review was still preliminary.
If you aren't one of those accounts, read the vendor's notice and move on. If you are, ask for the scope in writing and handle it like any other AI vendor breach.
What the built-in controls do and don't cover#
Anthropic's controls do real work. A developer's own settings files can't override managed settings, so a policy you push stays in force. Deny rules and a sandbox limit how far a bad command can reach.
What they don't do is look at what a specific command does. An allow rule matches the command's text. It can't tell what the command touches on this particular run. That's the gap between a permission rule and a hook.
Why an outside check still holds when the internals are public#
A public source map shows an attacker how the agent's own guardrails work. A check built into the agent is only as strong as those guardrails and their bugs.
A check that runs outside the agent doesn't depend on any of that. It looks at the pending action itself, not at the agent's reasoning, so knowing the agent's internals doesn't hand an attacker a way around it. The harness never grades its own homework.
This week's checklist#
- List the Claude Code versions and install methods across your laptops, then set a minimum version. See patching when fixes ship silently.
- Scan every org repo and its history for Claude Code settings files. Rotate whatever you find.
- Push managed settings through MDM so developers' local files can't override them.
- Get secrets out of commands.
- Add a check that doesn't rely on developers clicking the right button. Anthropic reports that people approve 93% of permission prompts.
Where Harden fits#
Harden Agentic Integrity Foundation (AIF) runs on the developer's laptop, outside the agent, at the agent's pre-execution hook. Before any command, file edit or push runs, AIF checks it against the session's intent. Decisions are made locally, verdicts take about 28 ms, and nothing leaves the machine.
For this week's problem, a secret typed into a command or headed to a network call gets judged by what the action does, whether or not someone clicked "don't ask again" last Tuesday. AIF starts in watch-only mode, is pushed by the MDM you already run, and applies one policy across your agents. It adds a layer. Keep scoped credentials and rotation in place. See how to secure Claude Code.
FAQ
Related questions
Did the Claude Code source leak expose my company's data?
No. Anthropic said no sensitive customer data or credentials were involved or exposed. What leaked was the tool's own code. That helps attackers understand how the agent works, so the indirect risk is a better-built malicious repo.
How do I check if my developers leaked secrets through Claude Code?
Search every repo in your GitHub org, including history, for committed Claude Code settings files. Rotate every password or key you find before you delete anything, because deleting the file leaves the secret in git history.
Is the npm version of Claude Code safe to keep using?
The source map shipped in npm version 2.1.88 and exposed Anthropic's code, not yours. Whichever install method you use, list the versions across your laptops and set a minimum.
Do managed settings fix the don't-ask-again problem?
They help. A developer's own settings files can't override managed settings. But allow rules still match command text, so you still need scanning and a check on the action itself to catch secrets typed into commands.