Skip to content
Code & CI · Secret guide

Leaked Sidekiq Secret: what to do in the first hour

High severityDetected onlyLast verified · 4 min read

A Sidekiq secret is the credential for a commercial Sidekiq Pro or Sidekiq Enterprise licence. It is not a key for the Sidekiq open-source gem. Its value is embedded in the URL of the private gem server that Bundler uses when it installs those commercial gems. Anyone who holds the value can install the commercial gems on their own machines, which is a licence problem, and may be able to reach the vendor’s gem server with your account. Rotate the credential first, then check for unauthorized installs and who has had the value.

Check your GitHub account for leaked secrets — free

Provider
Sidekiq
Severity
High
Impact
SaaS account access and billing
Checked live by LeakWatch
No

What a Sidekiq Secret looks like

The value is a pair of hexadecimal groups separated by a colon. It is normally not written as a standalone key. It sits inside an environment variable named after the private gem server, such as BUNDLE_ENTERPRISE__CONTRIBSYS__COM or BUNDLE_GEMS__CONTRIBSYS__COM:

BUNDLE_ENTERPRISE__CONTRIBSYS__COM=…:…   Sidekiq licence credential (masked)

The variable name is the context the rule uses. A credential pair pasted without that name is less likely to be detected, so look at the Gemfile, the Bundler configuration and any CI variable that mentions the vendor’s gem server. Because Bundler reads these values from the environment, the credential can end up in build logs or in a Docker image layer even when it never appeared in a committed file.

How Sidekiq Secrets get leaked

  • Bundler configuration. A configuration file or a .bundle directory committed with the credentials written into it.
  • Docker images. A build that passes the credential as a build argument, so it remains in an image layer that is later pushed to a public registry.
  • CI logs. A bundle install step that prints the source URL, including the credential, when it fails.
  • Shared Gemfile snippets. A configuration pasted into a bug report or a forum post while debugging an install error.
  • Public repositories. A project that vendored the commercial gems or their source references with the credential in the URL.

What to do in the first hour

  1. Rotate the credential. Open the account settings for your Sidekiq licence and use the vendor’s credential rotation tool. The old credentials stop working when you rotate, so update every system that installs gems before you finish.
  2. Update every install. Change the environment variable on developer machines, CI runners and build images. Run a bundle install on each to confirm it works.
  3. Check the licence seats. Review how many machines and accounts use the licence. Remove any you do not recognize.
  4. Check the images and caches. Rebuild Docker images that held the old credential, and delete cached gem sources that may contain it.
  5. Look at other secrets in the same build, such as registry tokens and deployment keys. Rotate them if they sat beside the value. See I accidentally pushed an API key to GitHub for the order of steps.
  6. Clean the repository. Move the credential into the CI secret store, use an environment variable at install time and remove it from files. A deleted commit still exists in clones, so rotation is the real fix.

Not sure what else leaked? Run a free scan.

Not sure what else leaked? Run a free scan.

Revoke it at Sidekiq

Commercial credentials are managed through the vendor’s billing portal, which is linked from your account settings. Open account settings, find the rotation option for the licence, and generate new credentials. The vendor’s documentation says that credentials which have been publicized can be rotated at any time, and that a warning may arrive if the value was found in public. Do not ignore such a warning, because the vendor can lock an account that is not answered in time. We could not confirm the exact labels on the billing page, so follow what you see.

How LeakWatch detects it

The rule is called Sidekiq Secret. It looks for one of the two Contributed Systems variable names, followed by an assignment separator and a value made of two hexadecimal groups joined by a colon, with a boundary after it. The variable name is required, so a bare pair of hexadecimal groups is not reported. The severity is high, with the impact class for SaaS tools. This type is not checked live: LeakWatch does not try the credential against the gem server.

LeakWatch detects this format but does not check it live: it can tell you the key is exposed, not whether it still works. Assume it does until you have revoked it.

FAQ

Is the open-source Sidekiq gem covered by this?

No. The open-source gem does not use this credential. It is for the commercial Pro and Enterprise gems that are downloaded from a private server.

Why does the value appear in a Docker image?

Because the install step passes it to Bundler, and some build tools record that input in an image layer. Rebuild the image without the credential, and check the layers of any image that was pushed.

Can I share the credential with a developer?

The vendor’s guidance is that sharing is possible, but the safer approach is for each developer to use their own environment variable, so you can rotate one person’s access without affecting the others.

Get alerted next time a secret leaks — create a free account

LeakWatch is not affiliated with Sidekiq.