Export
The link always opens the latest version of this page.
Ask an AI about it
Open in ChatGPTA new chat that reads this entry from the site Open in ClaudeThe same, in ClaudeShare the link instead of a file, and they will always see the latest version.
Files are a snapshot of today. The live page has anything newer.
Hardcoded Secrets
Hardcoded secrets are sensitive credentials—such as API keys, passwords, database connection strings, or cryptographic material—embedded directly in source code or configuration files rather than stored securely in external secret management systems.
Consequences
Hardcoded secrets enable unauthorized access 1 to protected resources and systems. When secrets are committed to version control systems like Git, they create credential exposure 2 that persists in repository history even after removal from the current codebase. Remediation of exposed credentials in git history is costly, requiring expensive rotation and access revocation 3 across all systems that relied on the compromised credentials.
The scale of this vulnerability is significant: 28.65 million new hardcoded secrets were discovered in public GitHub commits in 2025, representing a 34% year-over-year increase 4.
Classification
Hardcoded secrets are classified under CWE-798 (Use of Hard-Coded Credentials) 1, which encompasses the practice of embedding authentication material directly in code rather than externalizing it through secure configuration management.
Mitigation
Organizations should implement secret-scanning tools to detect hardcoded credentials before they reach repositories, use external secret management systems (such as vaults or key management services), rotate credentials regularly, and audit git history for previously committed secrets. credential-exposure incidents require immediate access revocation and credential rotation across dependent systems.
In the news 5
- Machine Identity Debt: Why Human Identity Is No Longer Cloud Security's Primary Boundary · DZone
- AI Is a Backhoe, Not a Magic Wand · HackerNoon
- How Developers Prevent Production Risk at the Source · Wiz Research
- The Credential Problem Behind Agentic AI · HackerNoon
- Stop Fixing Vulnerabilities in Production — Fix Them Where They're Born · HackerNoon
Sign in for the full story cards: summaries, tags and starring.