Do You Also Hardcode API Keys Directly in Your Code?

Do You Also Hardcode API Keys Directly in Your Code?

GitGuardian released its annual leak report — and it's about all of us.
In 2025, 29 million hardcoded secrets leaked on GitHub. +34% year over year, a record. AI key leaks grew by 81%, with DeepSeek alone — 113,000 keys.

A separate story with MCP: 24,000 secrets were found in config files, 2,100 of them active. The reason — official tutorials themselves recommend inserting keys directly into the config.

And the cherry on top: 64% of secrets leaked in 2022 are still active. No one revoked them.

Source: report <a href="gitguardian.com/the-state-of-secrets-sprawl-2026/">GitGuardian" target="_blank" rel="noopener noreferrer">https://blog.gitguardian.com/the-state-of-secrets-sprawl-2026/">GitGuardian State of Secrets Sprawl 2026</a>