RubyGems API Key

ID

rubygems_key

Severity

high

Vendor

RubyGems

Family

API Token

Description

RubyGems is a package manager for the Ruby programming language that provides a standard format for distributing Ruby programs and libraries, a tool designed to easily manage the installation of gems, and a server for distributing them.

Security

Any hardcoded RubyGem Key is a potential secret reported by this detector.

Accidentally checking-in the key to source control repositories could compromise the RubyGem account and data.

Examples

RUBYGEMS_API_KEY=rubygems_Ji2BcecvVm1utreSB6BZXLmIFzTpVz6c91IBU5kBclFoCkt5

Mitigation / Fix

  1. Remove the Key from the source code or committed configuration file.

  2. Follow your policy for handling leaked secrets, which typically require revoking the secret in the target system(s). Go to Api Keys, find the specific key and revoke it.

  3. If under a git repository, you may remove unwanted files from the repository history using tools like git filter-repo or BFG Repo-Cleaner. You may follow the procedure listed here for GitHub.

You should consider any sensitive data in commits with secrets as compromised.

Remember that secrets may be removed from history in your projects, but not in other users' cloned or forked repositories.