# Coding agents leak secrets on GitHub

> GitHub secrets leak from AI tools as developers click 'don't ask again'.
- Title: Coding agents leak secrets on GitHub · Apiiro | Shortify
- Summary: GitHub secrets leak from AI tools as developers click 'don't ask again'. 2,539 real secrets were found in 1,994 public GitHub repositories after developers…
- Keywords: github, claude code, secrets, api tokens, ssh logins, database passwords, public repositories, git history, security risks, developer tools, ai agents, configuration files
- Source: Apiiro — https://apiiro.com/blog/coding-agents-leaking-secrets-github-dont-ask-again
- Read time: 1 min
- Topics: github, claude code, secrets, api tokens, ssh logins, database passwords, public repositories, git history, security risks, developer tools, ai agents, configuration files
## Secrets found in GitHub
Apiiro research found 2,539 real secrets in 1,994 public GitHub repositories.

> database passwords, cloud keys, api tokens, ssh root logins
## How secrets leak
Claude Code saves secrets to .claude/settings.local.json when users click 'don't ask again'.

> yes and don't ask again
## Public files with secrets
1,122 out of 104,185 public .claude/settings.local.json files hold real secrets.

> one in ten files over eight kilobytes holds a real secret
## Secrets in git history
1,160 more secrets found in git history across shared settings files and agent transcripts.

> the file was committed with everything else
## Who is affected
63 organizations including software companies and medical records systems have exposed secrets.

> a database vendor's own admin-level cloud key
## Real secret examples
Production Azure Postgres passwords and Square tokens were found in allowlists.

> production azure postgres password
## How many secrets
1,379 distinct secrets across 636 provider keys and 743 passwords or tokens.

> three hundred seventy-nine database passwords
## Scanners miss secrets
gitleaks and TruffleHog miss 215 files with passwords in commands.

> passwords inside commands are missed by scanners
## Other files with secrets
Agent chat transcripts and memory files also carry secrets in 87 repositories.

> one hundred twenty files in eighty-seven repos
## Malware collects secrets
Malware already collects credentials from developer machines in bulk.

> the shai-hulud npm worm ran trufflehog
## What to do
Untrack the file and rotate credentials to fix leaks.

> rotate every credential the file has ever held
## Security teams
Add agent folders to pre-commit and CI secret scanning.

> treat agent folders as secret-bearing
## Disclosure
One organization confirmed its key had been live.

> one company confirmed its key had been live
## Method and limits
Data collected from GitHub code search on November 1-3, 2026.

> all data came from read-only github code and commit search
## Prior work
Claude Code users reported the mechanism since August 2025.

> none got a reply from anthropic
## What happens next
Developers must rotate credentials and stop typing secrets into commands.

> reference them as $var from whatever secrets manager you use
## Key takeaway

2,539 real secrets were found in 1,994 public GitHub repositories after developers clicked 'don't ask again' on AI tools.