
Loading

Loading
We use strictly necessary cookies to run this site, and analytics cookies to understand how it's used. See our Privacy Policy for details.
28.65 million new hardcoded secrets hit public GitHub in 2025 alone. Why it keeps happening despite everyone knowing better, and why deleting one later doesn't undo the exposure.
A hardcoded API key or database password is one of the most consistently recurring findings in real code reviews, not a rare, careless slip, and the trend is getting worse, not better. GitGuardian's State of Secrets Sprawl 2026 report found 28.65 million new hardcoded secrets added to public GitHub commits in 2025 alone, a 34% year-over-year increase, and the largest single-year jump the report has recorded. That's public repositories; the same report found internal, private repos have a meaningfully higher secret-exposure rate than public ones, since the (often false) assumption of privacy makes teams less careful there, not more.
Nobody sets out to hardcode a production credential. It happens through a specific, repeatable sequence: a developer hardcodes a key locally "just to get something working," commits it because the change also includes real functional code, and either forgets to remove it before pushing or assumes a later cleanup pass will catch it. CI/CD pipeline configuration files, .env files accidentally un-ignored, and Docker images with credentials baked into a layer are the next most common sources, none of which show up in a normal code review that's focused on logic and functionality, not scanning every line for a plausible-looking secret.
Deleting a hardcoded secret in a later commit doesn't remove it, it's still fully recoverable from git history unless the history itself is rewritten, which most teams never do. A secret that was live in a repository for even a single commit should be treated as compromised and rotated, not just removed going forward; this is one of the most common gaps we find even at organizations that otherwise have decent secret-scanning tooling.
This is exactly what our Secure Code Review engagements are built to catch, a manual review specifically looking for this pattern, not just an automated scanner's best guess at what looks like a secret. For the broader set of configuration gaps this sits alongside, see our piece on common cloud security misconfigurations.
Tell us about your environment and goals, we'll help you scope the right engagement.