Mishcon de Reya page structure
Site header
Menu
Main content section
Blue technology waves

Exposed GitHub secrets continue to cause security issues

Posted on 23 April 2025

GitHub have released a security announcement drawing attention to a consistent threat in software development: the unintentional exposure of secrets and the propagation of insecure code.  

This isn’t just a GitHub specific issue - it’s an industry-wide problem. Threat actors are increasingly automating scans of public and private repositories to harvest credentials, API keys, and other sensitive data. Simultaneously, insecure code practices - such as using vulnerable packages or improper input handling - are being exploited as part of software supply chain attacks.  

For instance, in 2023, a Microsoft AI research team accidentally exposed 38 terabytes of private data on GitHub due to a misconfigured SAS token embedded in a repository. The token granted full access to an internal Azure storage account, illustrating how a single leaked secret can compromise massive volumes of sensitive data.  

So what?  

Security teams should treat this as a pressing and ongoing concern that requires continuous mitigation - not a one-time fix. Secrets and code vulnerabilities are common entry points for attackers seeking initial access, lateral movement, or persistence within cloud and development environments.  

The steps your team can take to evaluate your exposure and reduce risk:  

Audit all repositories (including forks and archived projects) 

  • Use open-source tools like TruffleHog or commercial services to scan for secrets. Run scheduled scans across both public and private repos to detect sensitive information inadvertently committed to source control.  Implement pre-commit secret detection .
  • Use frameworks like pre-commit combined with secret-scanning plugins to prevent secrets from ever being committed in the first place. Enforce this through CI/CD pipelines.  

Integrate code scanning tools into your development process  

  • Tools like GitHub code scanning with CodeQL or third-party scanners (e.g., Snyk, Semgrep) can detect unsafe coding patterns or vulnerable dependencies. Automate scans on pull requests and block merges if critical vulnerabilities are found.  

Maintain a revocation process for exposed credentials  

  • Every organisation should have a credential management policy. If a secret is exposed, you must be able to rotate or revoke it within minutes. Using tools like HashiCorp Vault or AWS Secrets Manager can streamline this.  

Monitor for external exposures  

  • Attackers don't just look at your main repo. They scrape forks, gists, and even npm or PyPI packages for exposed secrets. Set up alerts and monitoring, possibly through services like GitHub’s native secret scanning.  

Invest in developer security awareness  

  • Regular training and real-time feedback in IDEs (eg via GitHub Copilot with security suggestions or tools like Secure Code Warrior) can reduce the chances of vulnerabilities being introduced at all.  

GitHub’s evolution of its security tools underscores a broader industry reality: secrets, leakage and code insecurity are critical and active points of vulnerability. As the Microsoft example shows, even sophisticated teams can make small mistakes with outsized consequences.  

Security teams should proactively harden their software supply chain by embedding automated controls and regularly auditing repositories - not only to stay ahead of threats, but to respond quickly when exposures happen.  

How can we help you?
Help

How can we help you?

Subscribe: I'd like to keep in touch

If your enquiry is urgent please call +44 20 3321 7000

Crisis Hotline

I'm a client

I'm looking for advice

Something else