Skip to content
Debug Dispatch DD markDDDebugDispatch

Where AI promises meet implementation details.

Model updates

Claude Code settings files leak secrets on GitHub

Researchers found thousands of exposed credentials in public repos due to how the AI tool handles command approvals.

Depth
1 outlet · newest source 573h ago
Claude Code settings files leak secrets on GitHub

Key points

  • Apiiro researchers identified over 100,000 public GitHub repositories containing Claude Code settings files.
  • About 1,100 of those files from 63 organizations contained sensitive secrets like API tokens and passwords.
  • The leak occurs because the tool saves approved shell commands, including embedded secrets, to a local file.

The figures

Apiiro security researchers reported finding more than 100,000 instances where Claude Code’s local settings file was uploaded to public GitHub repositories. Within that large set, approximately 1,100 files originating from 63 distinct organizations contained actual secrets.The tool saves your approved commands to a file that can accidentally get uploaded to the public web.The lack of repository-level .gitignore enforcement allows .claude/settings.local.json to be committed, exposing embedded secrets. These secrets included database passwords, API tokens, and root login credentials. The data comes from a report by Ars Technica, which cited findings from Apiiro.

Evidence: reportedClaude Code is accidentally exposing secrets all over GitHub

aifleet-ars

Evidence: reportedClaude Code is accidentally exposing secrets all over GitHub

aifleet-ars

Behind the figures

The exposure stems from how Claude Code manages user approval for automated shell commands. When a user selects the option to approve a command and not be asked again, the choice is stored in a local file named .claude/settings.local.json. This file often contains the command itself, including any sensitive information embedded within it. Anthropic’s documentation notes this file should be in the global .gitignore list, but that setting does not apply at the repository level.

The bottom line for teams

Teams face risks when repositories are cloned to other machines or when folders become repositories later, as the global ignore rule may not prevent uploads. Apiiro noted that Claude Code sometimes commits changes to the settings file without user input. Even after removal, secrets can persist in forks of the original project if users are not careful. This means simple deletion does not guarantee the secret is gone from the internet.

The open questions

The core issue is whether the tool’s automatic behavior overrides standard security hygiene. The sources indicate that while Anthropic documents the file should be ignored, the implementation allows it to be committed. Bug reports from August 2025 flagged this issue, noting the file was sometimes not added to .gitignore or that commands were added to unprotected files. These reports were closed without action after 60 days of inactivity, suggesting the issue persisted despite early warnings.reported

Evidence: reportedClaude Code is accidentally exposing secrets all over GitHub

aifleet-ars

Why it matters

  • Startup founders must audit their GitHub repositories for .claude/settings.local.json files to prevent credential leaks.
  • The persistence of secrets in forks means that removing a file from the main repo is insufficient for cleanup.
  • Automatic commits by the AI tool can bypass manual checks, requiring stricter repository policies.
  • The closure of prior bug reports without action highlights a gap in vendor response to configuration flaws.

Topics: Claude Code, Anthropic, GitHub, API security, configuration management

Updated

Then / now / next

Then

Claude Code settings files were intended to stay local and be ignored by git.

Now

Over 100,000 of these files have been uploaded to public GitHub repositories.

Next

Teams should check for persisted secrets in forks after removing compromised files.

Story timeline

  1. Then Claude Code settings files were intended to stay local and be ignored by git.
  2. 09 Nov 2026 Claude Code is accidentally exposing secrets all over GitHub
  3. Now Over 100,000 of these files have been uploaded to public GitHub repositories.
  4. Next Teams should check for persisted secrets in forks after removing compromised files.

For readers

Developers

  • Check your global .gitignore to ensure .claude/settings.local.json is excluded.
  • Review committed history for accidental uploads of sensitive commands.

Business

  • Audit GitHub repositories for exposed API tokens and database passwords.
  • Implement policies to prevent AI tools from committing configuration files.

Researchers

  • Note that secrets persist in forks even after removal from the main repo.
  • Observe that bug reports from August 2025 were closed without action.

Ask the article

Local keyword search of this article; no generated answers.

Did this article give you the evidence you needed?

No vote saved on this device.
Your choice stays on this device. No public tally.

Questions readers ask

How does Claude Code leak secrets to GitHub?

It saves approved shell commands, including embedded credentials, to a local settings file that can be accidentally uploaded.

How many secrets were found in the study?

Apiiro found about 1,100 files with secrets from 63 organizations among over 100,000 uploaded settings files.

Did Anthropic fix this issue?

The source material does not confirm a fix; it notes bug reports were closed without action after 60 days.

Connected stories

This storyAnthropic sets valuation range this week ahead of potential market debutAnthropic sets valuation range tSelf-hosted Claude Agents debut as Fable 5.2 blocks system prompt edits and slashes pricingSelf-hosted Claude Agents debut Anthropic may list stock in November as compute costs riseAnthropic may list stock in NoveAnthropic IPO Could Top $1.4 Trillion Amid AI Market FearsAnthropic IPO Could Top $1.4 Tri

Reading receipt

  • Apiiro researchers identified over 100,000 public GitHub repositories containing Claude Code settings files.
  • About 1,100 of those files from 63 organizations contained sensitive secrets like API tokens and passwords.
  • The leak occurs because the tool saves approved shell commands, including embedded secrets, to a local file.

Still open: Will Anthropic update the tool to prevent automatic commits of settings files?

Still open: How many forks still contain the exposed secrets after initial removal?

Time spent: 0:00 · Depth: Full

Sources

  1. Ars Technica AI

Related stories