Infosec Watchtower Logo

Rising Tide of Secret Leaks on GitHub: Navigating the Digital Security Crisis

Charles M. Walls | March 16, 2024 | Views: 197

A digital landscape dominated by towering repositories and swirling streams of code, with digital locks scattered throughout.

In 2023, a whopping 12.8 million new instances of secret data breaches were uncovered on GitHub, showing a staggering 28% increase from the previous year. This worrying trend has seen the rate of these breaches quadruple since 2021, highlighting an alarming growth in the public exposure of confidential information. With GitHub becoming even more populated—boasting an additional 50 million repositories in just a year (a 22% rise)—the likelihood of both accidental and intentional leaks of sensitive data has shot up significantly.

This surge underscores a critical call to action for businesses to keep a vigilant eye on their sensitive data's exposure. Shockingly, a vast number of companies are left in the dark, vulnerable to potential breaches without the necessary tools or knowledge to prevent them. In 2023, the detection of over 1 million legitimate Google API secrets, 250,000 Google Cloud secrets, and 140,000 AWS secrets illustrates the magnitude of the issue.

The tech industry, especially software providers, is hit hardest, with nearly 66% of all detected leaks. However, the ripple effects spread far and wide, affecting sectors like education, science and technology, retail, manufacturing, and finance, which together make up roughly 30% of the leaks. This widespread vulnerability signals an urgent need for industries across the board to adopt more stringent security measures to protect their data.

A startling find in the research was that 90% of exposed, valid secrets remained active for at least five days after their discovery, leaving a wide window for exploitation even after the authors were alerted. Secrets involving major service providers like Cloudflare, AWS, OpenAI, and GitHub are particularly at risk due to non-revocation of exposed credentials.

Eric Fourrier, CEO of GitGuardian, warns of the dangers of developers simply deleting leaky commits or repositories without revoking them, leaving companies open to attacks for as long as the credentials are valid. This phenomenon, known as "zombie leaks," poses a severe security risk.

An investigation into 5,000 erased commits that had exposed a secret revealed that only 28.2% of the associated repositories were still accessible, suggesting many were either deleted or made private in response to the leak. This could mean that the extent of zombie leaks is even greater than believed.

The study also considers the possibility that companies might resort to DMCA takedowns to manage uncontrollable leaky repositories, finding a significant increase in the takedown of repositories exposing secrets in 2023.

Crucially, the findings emphasize that while detecting leaks is vital, the real challenge lies in improving security practices. Merely alerting developers isn't enough; they need actionable guidance and support to correct their errors effectively.

The breach at Toyota in 2022, resulting from a hacker obtaining server credentials from code published on GitHub, serves as a stark reminder that leaks can lead to severe consequences even years later.

The emergence of generative AI in 2023 has notably impacted various sectors, including cybersecurity, highlighting the need for vigilance against potential threats posed by advanced technology.

Furthermore, the study debunks the myth that private repositories are safe havens, with 3.11% of secrets leaked in private repositories also found in public ones. It also sheds light on the Python community's package management system, PyPI, where over 11,000 unique secrets were exposed in 2023.

The report calls for a combination of awareness, training, and technological solutions to combat the growing problem of secret sprawl. Implementing discovery tools and strict controls, alongside secrets detection and remediation platforms, can help organizations maintain continuous security assessment and swiftly address incidents, essential steps in safeguarding against the expanding threat landscape in the digital domain.