Gemfury credentials
ID |
gemfury_deploy_push_token |
Severity |
high |
Vendor |
RubyGems |
Family |
API Token |
Description
Gemfury is a private package repository for public and private packages. Interaction with the registry is done via a dashboard, using a cli tool or curl API calls.
Account and repository can be accessed in various ways by authenticating with one the following types of tokens:
-
Deploy tokens enable read-only access to your private repositories. You can plug these tokens into your package manager for easy installation and deployment.
-
Push tokens are write-only for uploading new packages into this account. These work great with CI/CD workflows.
-
CLI tokens are automatically created when you authenticate with the command-line tool. You can manage these CLI sessions here.
-
Full access tokens grant unfettered access to an account. These are good for API access.
This detector looks for the Deploy and Push tokens.
Security
Any hardcoded Gemfury Token is a potential secret reported by this detector.
Accidentally checking-in the key to source control repositories could compromise the Gemfury account and data.
Examples
test_build_pkg: only: - /^\d+\.\d+\.\d+b\d+$/ except: - branches script: - devpi use /cat/beta - devpi upload - UPLOAD_FILE=(dist/*.tar.gz) - "curl -F package=@${UPLOAD_FILE} https://6OHN2-8UfmnDv2n4qPo16Gu31gm6RMBqg@push.fury.io/cat/" - "curl -F package=@${UPLOAD_FILE} https://Dry7PTYpKwYq4vzNQ6qQ@push.fury.io/cat/" artifacts: paths: - dist/
Mitigation / Fix
-
Remove the
Key
from the source code or committed configuration file. -
Follow your policy for handling leaked secrets, which typically require revoking the secret in the target system(s). Go to Tokens, find the specific token, disable it and then revoke it.
-
If under a git repository, you may remove unwanted files from the repository history using tools like
git filter-repo
orBFG 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. |