Dark Reading is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them.Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.

Application Security

Leaked Development Secrets a Major Issue for Repositories

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.

Related Content:

Research Finds Nearly 800,000 Access Keys Exposed Online

Special Report: How IT Security Organizations Are Attacking the Cybersecurity Problem

New From The Edge: Realistic Patch Management Tips, Post-SolarWinds

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. 

While companies may believe that keys leaked in open source repositories do not affect their security posture, 94% of JavaScript projects rely on open source components, as do 81% of Python projects, according to GitHub's report. 

"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%. 

Python developers most often leaked secrets, according to GitGuardians' analysis of the file extensions associated with leaked data. Python files accounted for 28% of leaks, while JavaScript accounted for 19%, and environment configuration files accounted for almost 10% of published secrets, according to the data. 

"It was a bit surprising for us as well," Thomas says. "I have no real idea why Python developers leak the most, but one reason may be, if I'm guessing, that Python is more often used on the back end, while JavaScript is used on the front end."

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

Recommended Reading:

Comment  | 
Print  | 
More Insights
Newest First  |  Oldest First  |  Threaded View
Ransomware Is Not the Problem
Adam Shostack, Consultant, Entrepreneur, Technologist, Game Designer,  6/9/2021
How Can I Test the Security of My Home-Office Employees' Routers?
John Bock, Senior Research Scientist,  6/7/2021
New Ransomware Group Claiming Connection to REvil Gang Surfaces
Jai Vijayan, Contributing Writer,  6/10/2021
Register for Dark Reading Newsletters
White Papers
Cartoon Contest
Write a Caption, Win an Amazon Gift Card! Click Here
Latest Comment: Zero Trust doesn't have to break your budget!
Current Issue
The State of Cybersecurity Incident Response
In this report learn how enterprises are building their incident response teams and processes, how they research potential compromises, how they respond to new breaches, and what tools and processes they use to remediate problems and improve their cyber defenses for the future.
Flash Poll
How Enterprises are Developing Secure Applications
How Enterprises are Developing Secure Applications
Recent breaches of third-party apps are driving many organizations to think harder about the security of their off-the-shelf software as they continue to move left in secure software development practices.
Twitter Feed
Dark Reading - Bug Report
Bug Report
Enterprise Vulnerabilities
From DHS/US-CERT's National Vulnerability Database
PUBLISHED: 2021-06-17
In CiviCRM before 5.21.3 and 5.22.x through 5.24.x before 5.24.3, users may be able to upload and execute a crafted PHAR archive.
PUBLISHED: 2021-06-17
In CiviCRM before 5.28.1 and CiviCRM ESR before 5.27.5 ESR, the CKEditor configuration form allows CSRF.
PUBLISHED: 2021-06-17
HashiCorp Nomad and Nomad Enterprise up to version 1.0.4 bridge networking mode allows ARP spoofing from other bridged tasks on the same node. Fixed in 0.12.12, 1.0.5, and 1.1.0 RC1.
PUBLISHED: 2021-06-17
An XSS issue was discovered in manage_custom_field_edit_page.php in MantisBT before 2.25.2. Unescaped output of the return parameter allows an attacker to inject code into a hidden input field.
PUBLISHED: 2021-06-17
All versions of package lutils are vulnerable to Prototype Pollution via the main (merge) function.