1. News
  2. Alerts
  3. Anthropic · Security
AlertAnthropic · Security2 min read

A time-saving Claude Code button can leak passwords onto public websites

Security researchers found over a thousand Claude Code settings files on GitHub holding real passwords and keys. Teams that use the tool should check now.

By the Dashline deskSource: VentureBeat
A time-saving Claude Code button can leak passwords onto public websites
Photo: Pauli Rautakorpi, CC BY 2.0
Act this week
What happenedResearchers found that Claude Code can save passwords and access keys inside a local settings file, which then ended up public on GitHub in over a thousand cases.
Who is affectedDevelopers and companies that use Anthropic's Claude Code and store their code on GitHub, including startups and technology vendors.
What to do
  1. 1Search your public GitHub repositories for the files .claude/settings.local.json and .claude/settings.json.
  2. 2Check each repository's history for those files, even if they are gone today.
  3. 3Replace every password and key those files ever held, since deleting the file is not enough.
  4. 4Add .claude/settings.local.json to your ignore list and keep credentials out of commands the AI runs.

A convenience button in Anthropic's AI coding assistant, Claude Code, has been saving passwords and access keys in a file that sometimes ends up public. Security company Apiiro found 1,122 publicly accessible settings files holding real credentials. Anyone who can see those files could read the secrets inside.

What happened

Claude Code can run commands on a developer's computer, such as connecting to a database. Those commands can contain passwords. Normally the tool asks permission first. Developers can pick "Yes, and don't ask again" to skip future prompts.

The catch is how it remembers that choice. Claude Code can save the whole command, password included, in a local file called .claude/settings.local.json. That file is meant to stay private, and Claude Code tries to keep it off GitHub, the site where developers store code. Those protections do not cover every case. If Git was already tracking the file, or a project was moved or set up differently, the file can be published with the code.

How big is it

Apiiro's researchers looked at 104,185 public copies of the file across 103,617 GitHub repositories. About 1.1% held what they judged to be real secrets, 1,379 distinct credentials in all. A wider search, including older file versions, found 2,539 credentials across 1,994 public repositories.

The exposed credentials belonged to 63 organizations, from small teams and startups to established technology vendors. They included passwords for production databases, a cloud management key from a database provider, and credentials tied to an application that handles medical records.

Who can relax, and who cannot

Apiiro did not test whether the credentials still worked, and it did not try to log in anywhere. So it is not known how many were live or whether attackers used them. One organization did confirm that an exposed key had been active. Teams that do not use Claude Code, or that keep their code private, are not in the picture described here. Anyone who uses the tool with public repositories should check.

What to do

The alert box above lists the steps. The key point is that deleting the file is not enough. Older versions can stay in a repository's history or in copies other people made, so any password or key the file ever held should be replaced.

What happens next

Boris Cherny, Anthropic's head of Claude Code, replied to the findings on Hacker News on November 7. He said the team is exploring built-in scanning for exposed credentials and extra safeguards in the tool's automated permission system. He did not give a specific fix or release date, so the risk remains for now.

The takeaway

If your team uses Claude Code with public GitHub repositories, look for its settings files and replace any password or key they ever held.

More articles

You should really read these.

Next step

Let’s talk