Coding agent secret leakage: hidden file exposes API tokens, cloud keys, DB passwords across thousands of public GitHub repos
Severity: high · Patch status: no-fix-needed · Since 2026-11-07
Apiiro researchers Shmulik Cohen and Matan Giladi found that AI coding agents copy secrets into hidden local files that developers then push to public repositories. Scanning GitHub, they discovered 2,539 real secrets across 1,994 public repositories, including database passwords, cloud keys, API tokens and SSH root logins. Notable exposures include a database vendor's admin-level cloud key, a production Azure Postgres password, a Square production token, and the owner password of a medical-records database, affecting 63 organizations. This is credential exposure rather than a software vulnerability, so there is no vendor patch; remediation requires secret rotation, history scrubbing and secret-scanning controls.
What to do
- Rotate and revoke all credentials that may have been handled by coding agents or committed to repositories, prioritizing production database, cloud and payment tokens
- Search repositories (including hidden files and git history) for leaked secrets using secret-scanning tools and remove them from history
- Restrict coding-agent file access and add pre-commit and CI secret-scanning gates
- Enable GitHub push protection and secret scanning, and audit org repos for hidden files containing credentials
- Review logs for misuse of any exposed keys
Sources
All live incidents on Threat Watch