Skip to content
Thought Tribune TT markTTThoughtTribune
Model watch

Did embedded credentials in Claude Code approval rules expose 63 organizations' secrets on GitHub?

Researchers found that approval rules in local configuration files often contain embedded credentials that get pushed to public repositories.

Depth
1 outlet · newest source 350h ago
Did embedded credentials in Claude Code approval rules expose 63 organizations' secrets on GitHub?

Key points

  • Apiiro researchers identified over 100,000 instances of Claude Code settings files on public GitHub repositories.
  • Approximately 1,100 of these files from 63 organizations contained sensitive data like database passwords and API tokens.
  • The issue arises because the "do not ask again" option stores commands with embedded secrets in a local JSON file.

AI security researchers at Apiiro reported that thousands of secrets are exposed on public GitHub repositories through Claude Code settings files. Their analysis revealed that user approvals for automated shell commands often result in sensitive data being written to local configuration files that are subsequently uploaded online.Researchers found that Claude Code saves approved commands with secrets in a local file that often ends up on public GitHub.

Evidence: reportedClaude Code is accidentally exposing secrets all over GitHub

aifleet-ars

The claim

When users select the option to approve a command and suppress future prompts, Claude Code saves this preference in a local file named settings.local.json. According to Apiiro, this file frequently contains the exact command string, including any embedded passwords, API keys, or root logins. Although Anthropic’s documentation states that this file is added to the global gitignore list, Apiiro noted that this setting is not reflected at the repository level. Consequently, the file can be accidentally committed if a folder becomes a repository later or is cloned to another machine. Apiiro also reported that Claude Code itself sometimes commits changes to this settings file without user input.

Evidence: reportedClaude Code is accidentally exposing secrets all over GitHub

aifleet-ars

Evidence: reportedClaude Code is accidentally exposing secrets all over GitHub

aifleet-ars

The response

Anthropic’s documentation indicates that the settings.local.json file is intended to be ignored by git globally. However, Apiiro pointed out that this protection fails in many practical scenarios, leading to accidental exposure. The researchers emphasized that the primary risk emerges when the local file leaves the user’s machine and enters a public repository, where it remains accessible even after removal from the original project due to forks.

What changes, what does not

Apiiro found that while over 100,000 settings files were uploaded to GitHub, only about 1,100 contained actual secrets. These leaked credentials came from 63 different organizations. The researchers highlighted that previous bug reports flagged this issue in August 2025, noting that the file was sometimes missing from gitignore lists or that sensitive commands were added to unprotected files.reported These reports were closed without action after 60 days of inactivity.reported

Evidence: reportedClaude Code is accidentally exposing secrets all over GitHub

aifleet-ars

Building on this

Developers can build local audit tools that scan for the presence of settings.local.json in git history before committing changes. Since the file format is a predictable JSON structure, scripts can parse it to detect embedded secrets like API tokens. Teams can also implement pre-commit hooks that explicitly block this specific file from being staged, overriding any global gitignore settings that might fail at the repository level.

Why it matters

  • Policy makers need to understand that global gitignore settings do not guarantee protection against accidental secret leakage in collaborative environments.
  • Organizations should audit their GitHub repositories for the presence of settings.local.json files, as over 100,000 such files are already public.
  • Developers must recognize that suppressing security prompts can lead to persistent credential storage in files that are vulnerable to accidental exposure.
  • The closure of previous bug reports without action suggests that vendor-side fixes may not be imminent, placing the burden on users.

Topics: Claude Code, Apiiro, GitHub, secret management, gitignore

Updated

Then / now / next

Then

Bug reports from August 2025 flagged that Claude Code settings files could contain sensitive data and were not always ignored by git.

Now

Apiiro researchers have quantified the exposure, finding over 100,000 settings files on public GitHub, with about 1,100 containing secrets.

Next

Organizations should monitor for new commits of settings.local.json files, as the issue persists and previous reports were closed without resolution.

Story timeline

  1. Then Bug reports from August 2025 flagged that Claude Code settings files could contain sensitive data and were not always ignored by git.
  2. 09 Nov 2026 Claude Code is accidentally exposing secrets all over GitHub
  3. Now Apiiro researchers have quantified the exposure, finding over 100,000 settings files on public GitHub, with about 1,100 containing secrets.
  4. Next Organizations should monitor for new commits of settings.local.json files, as the issue persists and previous reports were closed without resolution.

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.

Terms in this story

gitignore

A file that specifies intentionally untracked files that git should ignore, preventing them from being committed.

settings.local.json

A local configuration file used by Claude Code to store user preferences, including approved commands and their arguments.

Apiiro

An AI security research firm that analyzed the exposure of secrets in Claude Code settings files on GitHub.

Questions readers ask

How many secrets were found in Claude Code settings files on GitHub?

Apiiro researchers found approximately 1,100 files containing secrets such as API tokens and passwords among over 100,000 uploaded settings files.

Why are these files being uploaded to GitHub?

The files are uploaded because the global gitignore setting for the settings file is not reflected at the repository level, allowing accidental commits.

Did Anthropic address the bug reports about this issue?

Previous bug reports from August 2025 were closed without action after 60 days of inactivity, according to the published report

Connected stories

This storyDevelopers collapse AI PR descriptions to restore human editorial judgmentDevelopers collapse AI PR descriOpenAI Codex Rust client hits version 0.167.2 in latest releaseOpenAI Codex Rust client hits ve

Reading receipt

  • Apiiro researchers identified over 100,000 instances of Claude Code settings files on public GitHub repositories.
  • Approximately 1,100 of these files from 63 organizations contained sensitive data like database passwords and API tokens.
  • The issue arises because the "do not ask again" option stores commands with embedded secrets in a local JSON file.
Time spent: 0:00 · Depth: Full

Sources

  1. Ars Technica AI

Related stories

Background reading