← All notes

Claude Code Exposes Thousands of Secrets on GitHub

A security investigation by Apiiro has uncovered thousands of exposed credentials linked to Anthropic’s Claude Code.

The issue stems from the “Yes, and don’t ask again” permission feature, which can store complete shell commands in .claude/settings.local.json. When these commands contain hardcoded passwords, API keys, or database credentials, sensitive data may end up in public GitHub repositories.

Apiiro identified 1,122 files containing 1,379 secrets, with broader analysis uncovering 2,539 exposed credentials across 1,994 public repositories.

The findings highlight a growing security risk in AI-powered development tools: agent configuration files, command histories, and memory stores can become unexpected repositories of sensitive credentials.

AI-generated files need the same security scrutiny as source code and environment configurations.

Source: The Hacker News | Apiiro