Flitz.ai Flitz.ai

November 8, 2026

Claude Code Is Leaking Passwords to GitHub: Check Your Repos Today

If your development or automation team uses Anthropic's Claude Code, there is a simple click that may have already put your company's passwords on the public internet. Security researchers have found...

Claude Code Is Leaking Passwords to GitHub

If your development or automation team uses Anthropic's Claude Code, there is a simple click that may have already put your company's passwords on the public internet. Security researchers have found thousands of exposed credentials tied to a single convenience feature inside the tool, and the fix takes only a few minutes.

What actually happened

Claude Code is an AI coding assistant that can run terminal commands on a developer's behalf. Normally it asks permission each time. But when a user clicks "Yes, and don't ask again," the tool saves that approved command word-for-word, including any secret typed into it, in a project settings file called .claude/settings.local.json. That file sits inside the project folder and, unless explicitly excluded, gets committed and pushed to GitHub along with everything else (The Hacker News).

Security firm Apiiro searched public GitHub and found 104,185 copies of this file. Of those, 1,122 contained real, usable secrets: 1,379 credentials in total, including 379 database passwords, 43 SSH logins, 42 tokens for GitHub, GitLab or npm, and 23 AWS keys. Even worse, deleting the file afterward does not solve the problem: older commits in git history still expose 734 more secrets across 509 repositories, and 211 forks of 74 repositories carry the same leaked secrets as the originals (The Hacker News).

Researchers compared 16 different AI coding agents and found Claude Code is the only one confirmed to save the full approved command, including secrets, into a project file by default. That makes this a distinctly Claude Code problem rather than a general AI-assistant issue, though it is a strong reminder that any "don't ask again" style shortcut deserves scrutiny.

Why this matters for your business

Swiss SMEs increasingly rely on AI coding assistants to speed up internal tools, scripts and backoffice automation. The appeal is obvious: faster delivery, less manual work. But this incident shows how a single click meant to save time can silently publish production database passwords, SSH logins and cloud keys to a public repository, visible to anyone, including automated scanners that criminals run around the clock. A leaked AWS key or database password is not a theoretical risk, it is an open door.

And because forks and git history preserve the secrets even after the original file is deleted, a quick cleanup is not enough. Credentials need to be treated as compromised the moment they are exposed, which means they must be rotated, not just hidden.

What to do today

  • Search your GitHub organization for any files named .claude/settings.local.json or .claude/settings.json.
  • Check each repository's full git history for these files, even if they are not present in the current version, since old commits still contain secrets.
  • If secrets are found, assume they are compromised: rotate every password, token and API key involved immediately.
  • Stop tracking the local file going forward with git rm --cached .claude/settings.local.json, then add it to .gitignore so it is never committed again.
  • Check forked copies of your repositories too, since forks can carry the same exposed secrets even after the source repo is cleaned.
  • If your team uses Claude Code's "don't ask again" option, review what commands have been approved this way and treat any secret-bearing command as a candidate for rotation.

The bigger picture

This is another case in a growing pattern: AI tools built for speed and convenience quietly create new ways for credentials and data to leak, often through defaults that nobody reviewed closely. We continue to track these developments because the risk landscape for Swiss businesses changes week to week, not year to year.

If you want a second set of eyes on your GitHub setup, your credential hygiene, or your broader IT security basics, The Mejlerö Company (operating as Flitz.ai) offers IT support across Obwalden, Nidwalden, Luzern and Zürich from its base in Engelberg, including a free network analysis and a free one-hour consultation. Reach out to IT Manager Andrii Okraichenko at 044 500 99 47 if you would like help checking your exposure or automating your IT and backoffice work more safely.

Limited spots available this week

Get a FREE consultation

Get a FREE 1 hour consultation about your current application management setup, development process or any other tech setup problem.