GitHub Now Scans for Accidentally-exposed PyPI, RubyGems Secrets

GitHub has recently expanded its secrets scanning capabilities to repositories containing PyPI and RubyGems registry secrets.

The move helps protect millions of applications built by Ruby and Python developers who may inadvertently be committing secrets and credentials to their public GitHub repos.

GitHub will now scan for PyPI, RubyGems secrets

Yesterday, GitHub announced that it will now automatically scan repositories exposing PyPI and RubyGems secrets, such as credentials and API tokens.

To avail this feature, developers need to ensure that GitHub Advanced Security is enabled for their repository, which seems to be the default case for public repos:

“For public repositories on GitHub.com, these features are permanently on and can only be disabled if you change the visibility of the project so that the code is no longer public,” states GitHub.

Similar to a username and password, secrets or tokens are strings that one can use to authenticate themselves while using a service.

Applications relying on third-party APIs frequently use secrets (private API keys) in their code to gain access to the API services.

As such, one must be cautious that secrets are not compromised, as that can lead to much greater attacks affecting the wider software supply chain.

Prior to this, GitHub would scan for accidentally-committed npm, NuGet, and Clojars secrets among others.

Also Read: The 5 Phases of Penetration Testing You Should Know

As seen by BleepingComputer, there’s an extensive list of over 70 different types of secrets currently supported by GitHub Advanced Security.

These include secrets for both open-source registries (like npm, PyPI, RubyGems, Nuget, Clojars, etc.), and non-package-management-services like Adobe and OpenAI:

GitHub secrets scanning candidates
Types of secrets supported by GitHub Advanced Security (GitHub)

What happens when a secret is identified?

When GitHub spots a password, an API token, private SSH keys, or another supported secret exposed in a public repository, it notifies the registry maintainer.

The registry maintainers, for example, recently added PyPI and RubyGems, would then revoke the exposed credential, and email the developer explaining why:

RubyGems email compromised secret
A sample email from RubyGems alerting developer of a revoked secret (GitHub)

“In each case, we automatically scan every commit to a public repository or gist for potentially leaked credentials.”

“If we find one, we notify the registry, and they automatically revoke any compromised secrets and notify their owner,” explains GitHub software engineer Annie Gesellchen in yesterday’s blog post.

The advantage here of GitHub’s partnership with RubyGems and PyPI remains that the exposed secrets are revoked within seconds in an automated fashion, rather than waiting on the developer to take manual action.

As reported by BleepingComputer time and time again [123], exposed secrets and credentials have translated into successful breaches.

Also Read: Got Hacked? Here Are 5 Ways to Handle Data Breaches

As such, automated secrets scanning takes us one step closer to safeguarding the developer infrastructure from accidental leaks, and stepping up supply-chain security.

Outsourced DPO – It is mandatory to appoint a Data Protection Officer. Engage us today.

PDPA Training (SkillsFuture Eligible) – Empower data protection knowledge for your employees.

Vulnerability Assessment Penetration Testing – Find loopholes in your websites, mobile apps or systems.

Privacy Ninja provides GUARANTEED quality and results for the following services: 
DPO-As-A-Service (Outsourced DPO Subscription)
PDPA Compliance Training
P
DPA Compliance Audit
Dig
ital Transformation Consultancy
Data Protection Trustmarks Certification Readiness Consultancy

PDPA Data Protection Software
Vulnerability Assessment & Penetration Testing (VAPT)
Smart Contract Audit

Like & Subscribe:
Facebook
LinkedIn
Twitter
YouTube
Podcast


0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *