A Coveralls repo token lets a CI job upload coverage reports for one repository on Coveralls. On its own, the token cannot read your code or change your account, which makes it one of the lower-risk secrets in this list. The concern is that anyone holding it can post false coverage results to your repository, and a sudden change in the figures can mislead reviewers who trust the badge. Reset the token first, then check the uploads, because a few bad reports are easy to miss.
Check your GitHub account for leaked secrets — free
- Provider
- Coveralls
- Severity
- Medium
- Impact
- SaaS account access and billing
- Checked live by LeakWatch
- No
What a Coveralls repo token looks like
Coveralls repo tokens are strings of 37 letters, digits and hyphens, with no prefix. The rule and the context around the value are what identify it. The word coveralls placed near the value in a CI file, a script or a log is the usual sign:
<37 characters of letters, digits and hyphens> Coveralls repo token (masked)
The token is usually stored as a secret in the CI system and passed to the coverage tool through an environment variable. Some older setups write it into a configuration file, which is where it is most often committed.
How Coveralls repo tokens get leaked
- CI configuration committed to a repository. A workflow file that contains the token in plain text instead of referring to the CI secret store.
- Fork pull requests. A workflow that exposes secrets to a fork can print the token in logs, and forks sometimes publish their own copies of the configuration.
- Coverage configuration files. A settings file for the coverage tool that stores the token and is copied to a new project.
- Shared scripts and gists. A snippet posted to a forum or a support thread with the real token in it.
- CI logs. A step that prints its environment, or a debug option that echoes the upload command.
What to do in the first hour
- Reset the token. Open the account settings for the repository on Coveralls, find the repository token and reset or regenerate it. The old value stops working for uploads.
- Update the CI secret with the new token, and run one build to confirm that coverage still uploads.
- Check the coverage history. Look at the recent uploads and the coverage trend. Unexpected jumps or drops, or uploads from builds you do not recognise, are a sign of misuse.
- Review the workflows. Check the pipeline files for any step that could print secrets, and make sure forks cannot read the token.
- Remove the value from configuration and refer to it only through the CI secret store.
- Clean the repository and logs. Remove the token from files and history, and check old logs. See I accidentally pushed an API key to GitHub.
Not sure what else leaked from the same pipeline? Run a free scan.
Revoke it at Coveralls
Open the account settings for the repository on Coveralls and look for the repository token. Public descriptions name the action differently, sometimes as regenerate and sometimes as reset, so read the label carefully. Coveralls also has an account-level API token, which is separate and is not the one used for uploads, so do not confuse the two. This guide has not confirmed the exact labels against the live page, and the Coveralls help documentation is the place to check them.
How LeakWatch detects it
The rule is called “Coveralls Repo Token”. It looks for the word coveralls within about 40 characters of a 37-character run of letters, digits and hyphens, with word boundaries around the value. The word is required. The severity is medium. This type is not checked live: LeakWatch does not call Coveralls with the value it finds.
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 the token read my source code?
No. A coverage token is for uploading reports. It does not grant access to the code itself, although the uploaded reports reveal file names and structure.
Will resetting the token break my badge?
The badge keeps showing the last good result. Your next upload will fail until the new token is in the CI secret, so update it promptly.
Does a fork need its own token?
Yes. Forks that enable Coveralls for their own copy of the repository have their own token. Never share a token across forks.