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.
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:
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:
“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 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
PDPA Compliance Audit
Digital Transformation Consultancy
Data Protection Trustmarks Certification Readiness Consultancy
PDPA Data Protection Software
Vulnerability Assessment & Penetration Testing (VAPT)
Smart Contract Audit