Anthropic is looking at how to stop Claude Code from keeping passwords and keys in a project settings file, Boris Cherny, the company's head of Claude Code, wrote on Hacker News on 7 November. He said the tool has not historically scrubbed secrets but that the team is "looking into what we can do to prevent this", and named options such as having auto mode catch these commands and adding basic secret scanning. Security firm Apiiro added his response on 8 November to research it first published on 5 November.

The fault Apiiro describes is narrow. When a developer approves a shell command with "Yes, and don't ask again", Claude Code stores that exact command as a permission rule in .claude/settings.local.json. Any credential typed into the command is kept in plain text, and the file can then be pushed to a public repository. Apiiro said it reproduced this with current Anthropic models and traced it to the tool rather than the model, iTnews reported. Cherny said Claude Code puts the file on the developer's global git ignore list when it creates it.

The counts are Apiiro's own and have limits. It searched public GitHub from 1 to 3 November and did not use or test any credential, so it cannot say how many still work. Of 104,185 copies of the file it found, 1,122, about 1.1%, held at least one real secret, 1,379 distinct secrets in all. Adding older versions of the file, a shared settings file and saved agent transcripts raises the total to 2,539 secrets in 1,994 repositories.

Database access dominates: Apiiro counted 379 database passwords and 122 Supabase service-role keys, plus smaller numbers of SSH logins, code-hosting and package tokens and AWS keys. Common scanners catch only part of the problem: neither gitleaks nor TruffleHog flagged 215 of the 1,122 files, mostly because passwords inside commands do not match known key formats. Most files belong to individual developers, but Apiiro counted 63 affected organisations, among them a database vendor, a payments startup and an IT services firm with a medical-records app.

Apiiro advises users to rotate every credential the file has ever held, stop tracking the file in git and refer to secrets through environment variables.

Read the source

Apiiro · Company · 8 Nov 2026. This is an original brief based on the linked publication. Company statements and forecasts are attributed to their source.

Apiiro ↗