Security Researchers Identify Thousands of Exposed Credentials in Public GitHub Repositories Linked to Claude Code
AI-generated from multiple sources. Verify before acting on this reporting.
SAN FRANCISCO — Security researchers from Apiiro and Anthropic disclosed on Friday that thousands of sensitive credentials have been exposed in public GitHub repositories due to a configuration flaw in the Claude Code tool. The incident stems from the software's default setting, which saves approved commands containing secrets into a local settings file that was not automatically excluded from version control.
The vulnerability allows users who commit their project files to inadvertently publish API keys, database passwords, and other critical security tokens on public code hosting platforms. Because the settings file storing these secrets was missing from the standard .gitignore list, it was treated as a regular project asset and pushed to remote repositories alongside source code.
Anthropic, the developer of the Claude AI model family, acknowledged the issue following the discovery by Apiiro researchers. The two organizations are currently working to address the exposure. Anthropic stated that the default behavior of saving command history with embedded secrets was an oversight in the tool's initial release configuration. The company has since updated the software to ensure that settings files containing sensitive data are excluded from version control by default.
The scope of the leak remains under assessment, though early scans indicate a significant number of compromised accounts across various industries. Developers who have used Claude Code in recent months are urged to audit their repositories for exposed secrets immediately. Standard security protocols recommend rotating any credentials that may have been written to the affected settings files to prevent unauthorized access.
GitHub, the platform hosting the exposed repositories, has not issued a specific advisory regarding this batch of leaks but continues to offer automated scanning tools to detect and alert users to potential credential exposure in their codebases. The incident highlights the growing complexity of securing AI-assisted development workflows, where automated tools may inadvertently create new attack vectors if not properly configured.
While Anthropic has patched the software, the question remains how many of the exposed credentials have already been exploited by malicious actors. Researchers note that once secrets are published on public repositories, they can be indexed and harvested by automated bots within minutes. The timeline for when the initial exposure occurred is unclear, as the flaw existed in the default configuration since the tool's recent deployment.
Developers are advised to review their commit history for any files named settings.json or similar configurations generated by Claude Code. Anthropic has released a guide detailing steps to revoke compromised tokens and secure affected accounts. The company emphasized that no user data was accessed through this vulnerability directly, but the exposure of credentials poses a risk to third-party services linked to those accounts.
As the investigation continues, security experts are calling for stricter default configurations in AI development tools to prevent similar incidents. The incident serves as a reminder that the integration of generative AI into software pipelines requires rigorous security auditing to ensure that automation does not compromise organizational defenses.