Create

Sign in to ReadmeX

or

How we handle your data: Privacy Policy

ReadmeX

Your AI reading companion

What would you like to catch up on?

Pick a briefing, or ask your own question.

Your community and people briefings stay personal to you.

Story

Claude Code approvals exposed credentials in public GitHub files

AI summary

Apiiro researchers found apparent credentials in 1,122 current Claude Code settings files among 104,185 public copies on GitHub; including shared settings, agent transcripts and Git history, they identified 2,539 distinct secrets across 1,994 repositories. Claude Code can save a shell command verbatim in .claude/settings.local.json when a user selects “Yes, and don’t ask again,” potentially preserving embedded passwords or tokens, although Anthropic says the file is normally added to the global Git ignore list. Claude Code head Boris Cherny said the team is exploring automatic-mode protections and basic secret scanning, while Apiiro cautioned that it did not test the credentials or contact any hosts.

In-depth insight

The findings show how a coding agent’s persistent permission records can expose credentials beyond the developer’s machine, making repository ignore rules and secret scanning important safeguards.

Update, November 8: Anthropic’s Head of Claude Code responds. Boris Cherny responded on Hacker News on November 7 and took part in the discussion through the weekend. He said the team is “looking into what we can do to prevent this,” named approaches it plans to prototype, “making sure auto mode catches this, building in basic secret scanning,” and, when a reader noted the same can happen in auto mode when it asks about a sensitive command, answered “good catch.” Full response below.

Apiiro research found 2,539 real secrets in 1,994 public GitHub repositories: database passwords, cloud keys, API tokens, SSH root logins. Among them: a database vendor's own admin-level cloud key, a production Azure Postgres password, a Square production token, and the owner password of a medical-records database. Most belong to individual developers. 63 organizations are affected, from student groups to startups, software agencies and established vendors. One confirmed its key had been live.

Ask Claude Code to check a database or call an API, and the command it proposes carries the secret from your config file. It asks before running it. Pick "Yes, and don't ask again" and it saves that exact command, secret included, to .claude/settings.local.json inside the project folder. Nothing in the repo marks that file as private, so it gets committed with the rest of the code.

#Claude Code#Anthropic#Apiiro#GitHub

Original · 11 min readRead the original
Group chat

No comments yet. Start the conversation.