Every day, more than 5,000 private keys, database connection strings, certificates, and passwords are leaked to GitHub repositories, putting applications at risk.
More than 5,000 passwords, private keys, and other development “secrets” are leaked every day when programmers push code to online repositories — a year-over-year increase of 20% that also makes the software and the developer’s infrastructure more susceptible to attack, according to a new report by security firm GitGuardian.
The company, which scans public GitHub repositories daily and analyzes the latest committed code, found that API keys for Google Cloud resources, for a variety of development tools — such as the Django web framework and Okta authentication framework — and for database access made up almost 60% of all leaked secrets. Developers from India, Brazil, and the United States most often leaked secrets, the company found.
Overall, while the number of leaked secrets is only about 0.2% of the public commits scanned each day, leaking an application secret can be devastating, enabling attackers to gain easy access to applications or the back-end databases, says Jeremy Thomas, CEO of GitGuardian.
“Cybersecurity is largely about human mistakes,” he says. “This is still a rare event that we are preventing but a serious one, and developers have to assume that they are going to make mistakes.”
Development activity on GitHub has skyrocketed in the past year, with the number of repositories jumping by 35% during the pandemic and the average active user contributing 25% more to open source projects, according to the GitHub “State of the Octoverse” report published in December.
“Open source is the connective tissue for much of the information economy,” GitHub stated in the security portion of its main report. “You would be hard-pressed to find a scenario where your data does not pass through at least one open source component. Many of the services and technology we all rely on, from banking to healthcare, also rely on open source software.”
In addition, GitGuardian stresses in its new report that developers often use the same account for personal development and corporate development, raising the possibility of cross-contamination in repositories. Eighty-five percent of leaked secrets occur in the personal repositories of developers, while 15% affected the public repositories owned by businesses, the company states.
“Secrets present in all these repositories can be either personal or corporate and this is where the risk lies for organizations as some of their corporate secrets are exposed publicly through their current or former developers’ personal repositories,” states the report, published today.
The most common types of secrets leaked in public repositories include Google keys, which accounted for 28% of leaked secrets, development tools at 16%, and databases and data storage keys at 15%.
Back-end technology includes databases and website logic, so secrets are more common, he says.
Often developers work with code and keep keys and passwords for various resources in an insecure location to make it easier to change the code, but doing so often results in the information mistakenly being published, Thomas says. Cybercriminals and nation-state actors often scan GitHub and other repositories to find inadvertently leaked information.
“Keeping secrets encrypted and tightly wrapped makes it harder for developers to both access and distribute them,” GitGuardian states in the report. “This can lead developers to choose the path of least resistance when handling them which may include hardcoding them into source code, distributing them through email or messaging systems like Slack, saving them directly into config files and storing them inside internal wikis.”
GitGuardian points to several reports of leaked secrets leading to information exposure, including a leaked JumpCloud API key that exposed Starbucks’ data in 2019 and leaked credentials to a third-party data service that exposed information at Equifax in 2019.
Veteran technology journalist of more than 20 years. Former research engineer. Written for more than two dozen publications, including CNET News.com, Dark Reading, MIT’s Technology Review, Popular Science, and Wired News. Five awards for journalism, including Best Deadline … View Full Bio