A JOURNAL OF ARTIFICIAL INTELLIGENCE
my ai daily

Claude Code settings.local.json Secrets Audit: 1,122 Leaked Repos, Permission Overrides and Rotation Checklist

Apiiro’s security audit reveals 1,379 plaintext secrets across 1,122 public repositories due to flawed local git exclude behavior, prompting urgent developer credential rotation.

AI-generated editorial illustration of terminal configuration screens, security shield permissions, and developer seat pricing badges.
AI-generated illustration / my ai dailyIllustrative image.

THE STORY IN THREE POINTS

  • A security audit across 104,185 public repositories found 1,122 instances of .claude/settings.local.json containing 1,379 exposed credentials, including 379 database passwords, 23 AWS keys, and 43 SSH logins.
  • Claude Code appends settings.local.json to the local machine’s global git exclude, a safeguard that does not follow repository clones, leaving existing tracked files and forks vulnerable.
  • Standard secret scanners missed 215 of the exposed credentials because commands like PGPASSWORD= lack vendor prefixes, requiring manual inspection and credential rotation.

The 1,122 repository credential leak and scanner blind spots

An empirical security investigation conducted by cybersecurity firm Apiiro revealed widespread plaintext secret exposures tied to autonomous developer agents. Auditing 104,185 public repositories on GitHub containing .claude directories, researchers discovered 1,122 public settings.local.json files exposing 1,379 verified active secrets, spanning 379 database credentials, 23 AWS access keys, 43 SSH private logins, and proprietary API tokens from 63 major organizations.

Crucially, automated CI secret detection proved inadequate: popular scanners like gitleaks identified only 564 instances, while TruffleHog detected 643. Exactly 215 repositories slipped past both scanners entirely because developer approvals embedded inline commands such as PGPASSWORD=, sshpass -p, or mysql -p, which lack rigid vendor-specific string prefixes. Threat actors operating npm worms like Shai-Hulud are already targeting developer workstations scanning for these unencrypted files.

Why global git exclude fails to protect cloned repositories

The fundamental vulnerability stems from architectural friction between repository isolation and local tool approvals. When Claude Code executes in a workspace, it records standing permissions—such as bash command approvals—inside .claude/settings.local.json. To prevent accidental commits, Claude Code appends the path to the current user’s global git exclude file (~/.config/git/ignore).

However, global exclude rules are machine-local: they do not transfer when a repository is cloned by teammates, pushed to CI runners, or forked. Furthermore, if a developer runs git add . in a repository where settings.local.json was already staged prior to initialization, Git honors index tracking over the global exclude. Apiiro identified 509 repositories where secrets persisted in historical commit trees and 211 public forks carrying identical credentials.

Remediation protocol: Immediate key rotation and repo cleanup

Developers using Claude Code must immediately inspect their local workspaces: running git status --ignored verifies whether .claude/settings.local.json is properly ignored. If credentials have ever been committed, simply deleting the file is insufficient—developers must rotate all database connection strings, revoke cloud provider keys, and purge git commit histories using git-filter-repo.

Teams should explicitly add .claude/settings.local.json to the repository-root .gitignore file and migrate environment secrets to external secret vaults or OS keychain daemons, ensuring autonomous CLI agents never store plaintext authentication tokens in local approval logs.

Sources: Apiiro Research: 1,379 Secrets Exposed Across Claude Code Settings Files|Apiiro Security ↗ Claude Code Developer Guide: Configuration & Tool Permissions|Anthropic Documentation ↗

THE BROADER CONTEXT · CLAUDE DOSSIER

Explore full product specifications, pricing analysis, and continuous coverage in the Claude Desk Hub. Independent benchmarks available on the AI Intelligence Index and Coding Agents Leaderboard.

02The next story

News

How to Install Claude Code on Windows (Native & WSL2)

Anthropic has deprecated npm install for Claude Code in favor of standalone native installers—yet native Windows lacks OS command sandboxing. Here is when to choose PowerShell vs. WSL2, exact setup commands, and fixes for PATH and Git Bash errors.

Aider vs Claude Code: Git-First CLI vs Subagent Runtime

Both Aider and Claude Code live inside the terminal—yet one treats Git commits as its core contract with any cloud or local model, while the other ships hooks, MCP, and parallel subagents tuned strictly for Anthropic’s top-ranked Claude checkpoints.

Claude vs ChatGPT: Speed, Coding, Writing & Context Limits

As US search interest in Claude surged +347% YoY, Claude 5.5/Fable 5.2 and ChatGPT (GPT-6.2 Astra/Sol) have diverged cleanly: pick ChatGPT for sub-2-second everyday speed, Intelligent UI canvases, and Space collaboration; pick Claude for 1M-token coding and prose discipline.

Follow your curiosity.

EXPLORE THE ARCHIVESOURCES & CONTEXT INCLUDED