Skip to content
Code & CI · Secret guide

Leaked Readme API Token: what to do in the first hour

High severityDetected onlyLast verified · 4 min read

A Readme API token authenticates your scripts to the Readme platform that hosts your developer documentation. With it, a caller can read and change the documentation for the project: pages, versions, guides and API reference content. A changed page is served to every developer who reads your docs, so a leaked token can be used to publish misleading instructions or to add a link that sends readers somewhere harmful. The token is not a payment credential, but its effect is visible to your users, which is why it deserves a quick response.

Check your GitHub account for leaked secrets — free

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

What a Readme API Token looks like

Readme API tokens start with rdme_, followed by a long block of lowercase letters and digits. The token is one string with no separators:

rdme_…   Readme API token (masked)

The prefix is distinctive, so the value can be found without any label. Tokens are usually used in a continuous integration job that syncs an API reference from an OpenAPI file, or in a script that updates changelog pages. That is where the token tends to end up in a repository, next to the documentation source files.

How Readme API Tokens get leaked

  • Sync workflows. A documentation workflow that writes the token into a configuration file and commits it, so the next push carries it into the repository.
  • Workflow logs. A CI step that prints its environment, or a command that echoes the request it sends.
  • Shared scripts. A publishing script copied to a colleague or posted in a chat with the token still inside.
  • Public documentation source. A docs repository that was made public while the token was in one of its files.
  • Forked repositories. A fork that inherited a commit containing the token, even after the original was cleaned.

What to do in the first hour

  1. Revoke the token. Open the account settings for your Readme project and revoke or regenerate the API key that leaked. Do this first, because the token can still publish changes until it is replaced.
  2. Create a replacement for the workflow that needs it, and store it as a secret in your CI system. Test the sync with a non-production change.
  3. Review the page history. Look at the recent changes to your documentation. Check for pages that were edited, added or removed since the exposure date, and for links that point to unfamiliar sites.
  4. Check the versions. Confirm that the published versions match your repository. Remove any version or page you did not create.
  5. Look at the other tokens on the project and remove any you no longer use.
  6. Check the rest of the file for other secrets, such as deployment keys. Rotate them if they sat beside the token. See I accidentally pushed an API key to GitHub for the order of steps.
  7. Clean the repository. Read the token from a CI secret and remove it from current files. Revocation is what makes the old value useless, so do not rely on a history rewrite alone.

Not sure what else leaked? Run a free scan.

Not sure what else leaked? Run a free scan.

Revoke it at Readme

API keys are managed in the project settings of the Readme dashboard. Open account settings, go to the API key section, and revoke or regenerate the token that leaked. Regenerating replaces the old value, which suits a workflow that still needs access. We have not confirmed the exact labels on the current interface, so follow what the dashboard shows, and check that you are in the correct project.

How LeakWatch detects it

The rule is called Readme API Token. It looks for the rdme_ prefix followed by exactly 70 lowercase letters or digits, with a boundary or a line break after it. Shorter values and values with uppercase letters are not reported by this rule. The severity is high, with the impact class for SaaS tools. This type is not checked live: LeakWatch does not send a request to Readme with the value it found.

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

Can a leaked token change my API reference?

Yes, if its permissions allow it. Documentation writes are the main risk, so check your recent page history and compare it with your repository.

Will the token break my documentation build after I revoke it?

Only the sync step. Deploy the new token to your CI secret and run the workflow once to confirm that it works.

Should the docs repository be public?

That is a choice for your team. A public repository is fine as long as no credentials are committed to it, so keep the token out of the source entirely.

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

LeakWatch is not affiliated with Readme.