Passwords Saved on Your PC End Up Exposed on Public Sites
A flaw in Claude Code caused local files storing passwords and credentials to be uploaded to public GitHub repos; Apiiro reports over 100k public documents, 1k with credentials.

Meta description: A flaw in Claude Code caused local files storing passwords and credentials to be uploaded to GitHub; Apiiro's investigation found 100,000 public documents, 1,000 with credentials.
A flaw related to the programmer assistant Claude Code, from Anthropic, caused passwords and credentials to be saved in local files that ended up exposed in public GitHub repositories, according to an investigation released by the security company Apiiro and reported by ANSA.
What happened: Claude Code flaw and password exposure
Apiiro identified that a function of the Claude Code assistant, designed to streamline developers' workflow, stored the user authorization locally to avoid repeated confirmations. According to ANSA, this mechanism saved the user's decision in a file on the computer. If the programmer's command contained passwords, tokens, or service codes, these elements were also written in the same file, turning sensitive credentials into persistent local data.
The discovery was publicly disclosed after Apiiro's analysis, which located thousands of files containing sensitive information that had ended up in visible GitHub repositories, as reported by ANSA.
How the exposure occurred: local workflow that turned into public uploads
The problem stems from the following flow:
- Claude Code has a function to remember authorizations to avoid repeated prompts.
- This memory is written to local files in the developer's environment.
- When projects are moved, copied, or synced — for example when cloning a repository to another device or reconfiguring a project — these files can be included in the upload.
- If the repository is public, the files become accessible to anyone on GitHub.
Apiiro explained that the presence of credentials in commands or configuration files caused passwords and tokens to be saved alongside authorization, increasing the risk of leakage as they became part of the content submitted to public repositories.
Impact and scope: more than 100k documents, 1k with credentials
The investigation identified that more than 100,000 documents derived from this behavior were publicly uploaded to GitHub. In more than 1,000 of these cases, the files actually contained passwords, tokens, or corporate credentials, according to data gathered by Apiiro and reported by ANSA.
Experts consulted by the report highlight that once public, these data can persist in forks and copies made by other users, remaining accessible even if the original file is later removed from the original repository. This dynamic widens the risk window and complicates full remediation of the leak.
Relevance for Brazilians and descendants: risks for developers and companies
Brazilian developers using programming assistants like Claude Code and code hosting platforms like GitHub may be exposed if they adopt workflows that save authorizations and commands locally. Collaborative projects, especially those with a history of forks and clones, raise the likelihood of credential exposure inadvertently.
Brazilian companies with public repositories or practices of sharing project work should review:
- Policies for storing tokens and passwords;
- Use of configuration files that should never be versioned;
- Tools for scanning and preventing secret leaks before pushing to GitHub.
Routine checks of public and private repositories, along with educating developers not to embed secrets in commands and configurations, are recommended measures to mitigate risk. For content on technologies and life in Italy, readers can follow Raízes Italianas sections on Notícias da Itália and Vida na Itália.
What security vendors and platforms should do
Security experts suggest that providers of programming assistants and hosting platforms implement:
- Encrypted and secure storage of authorizations, never in plain text;
- Automatic alerts before including local files in commits;
- Pre-push scans that detect tokens and passwords;
- Tools for automatic credential rotation when a leak is identified.
Anthropic, the developer of Claude Code, and GitHub were not cited with direct statements in the Apiiro report referenced by ANSA; the report mainly highlighted the identification of public files and the need for corrections in the storage workflow.
Conclusion
The Claude Code flaw demonstrates how design decisions in development tools can lead to data leaks when local artifacts are inadvertently included in public repositories. Apiiro's investigation, reported by ANSA, found over 100k public files, including more than 1k with actual credentials, underscoring the need for stringent security practices by developers and companies.
Source: ANSA





