Secrets, including API keys, passwords, encryption keys, and other credentials, are critical components of modern software operations, which makes managing them a top priority for development and security teams. Secrets sprawl is the spread of those secrets across various environments, tools, and repositories. When left unchecked, this sprawl can be intensely frustrating for developers and introduce significant platform vulnerabilities for security teams.
For developers, working with secrets is a very common aspect of the development pipeline. Poor secrets management practices that lead to extensive secrets sprawl have a number of frustrating effects:
A common avenue for leaked secrets is through the near ubiquity of open-source code. Around 90% of code currently in production is open-source, and while open-source code is highly useful, it’s also publically available. This means that any secrets accidentally committed to a repository are potentially available to anyone with the tools to scan for and leverage exposed secrets. If developers accidentally include secrets in their commits, they’ve instantly introduced a security vulnerability. As you might imagine, The frequency of leaked secrets in GitHub commits only increases with secrets sprawl.
GitGuardian, a service that scans github commits to alert authors of leaked secrets in their commits, published a report including a number of concerning statistics regarding the frequency of accidentally leaked secrets.
Even in an age where tech development already seems widespread, the report shows that development is only increasing. GitGuardian noted there were 50 million new code repositories on GitHub, a 22% increase from the year before. Unsurprisingly, the number of new leaked secrets was up 28%, reaching a figure well over 12 million. There are a ton of figures in the report, and I recommend any reader take their own look at, but here are a few I thought were of particular note:
From a hacker’s perspective, secrets sprawl is a goldmine. When system vulnerabilities are presented directly to them, hackers have little need to search for infrastructural weaknesses to exploit or set up elaborate phishing scams.
Perhaps even more troubling than the number and frequency of secrets leaked in public repositories is their subsequent lack of remediation. GitGuardian sends notices to commit authors after they detect secrets, so the authors can rotate those secrets and make sure to keep them out of future versioned commits, yet little is done.
GitGuardian’s data underscores the magnitude of this issue: 90% of exposed valid secrets remain active for at least five days after the notice is delivered, illustrating the lack of remediation practices in place.
Combatting secrets sprawl and leaked secrets
The first step in combating poor secrets management is equipping your team with the proper tools. Implementing these tools at the development level is incredibly important to reducing sprawl and preventing leaked secrets in GitHub commits. Here are key practices to consider:
With millions of new repositories created each year and a growing number of leaked secrets, organizations must take decisive action to secure their sensitive information.
By implementing a comprehensive secrets management solution, organizations can:
Ultimately, secrets are called “secrets” for a reason—they are meant to be protected. By prioritizing secrets management in the development pipeline, organizations can safeguard their assets, protect their reputations, and build a more secure digital future. Check out how Doppler can help you secure your development pipeline!
Trusted by the world’s best DevOps and security teams. Doppler is the secrets manager developers love.