Bugsnag handles two very different credentials, and what a leak means depends on which one it is. The notifier API key identifies a project and lets code report errors to it; it is shipped inside mobile apps and web bundles by design, so on its own it mostly allows someone to send fake errors into your project. The personal auth token, used with the Data Access API, is a real secret: it acts as the user who created it and can read error data across the organizations and projects that user can reach. Work out which one leaked, replace it, then check what it could read.
Check your GitHub account for leaked secrets — free
- Provider
- Bugsnag
- Severity
- High
- Impact
- SaaS account access and billing
- Checked live by LeakWatch
- No
What a Bugsnag API key looks like
Bugsnag’s notifier key is a project identifier, in many setups 32 hexadecimal characters. The detection rule of this site accepts a UUID-shaped value instead (8, 4, 4, 4 and 12 characters separated by dashes), close to the word Bugsnag:
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX notifier API key (project, masked)
XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX UUID-shaped value (masked)
token XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Authorization header of the Data Access API (masked)
The notifier key appears as apiKey in the Bugsnag client setup, in BUGSNAG_API_KEY, in the AndroidManifest.xml and Info.plist files of mobile apps, and in front-end bundles. The personal auth token is sent in an Authorization: token ... header and usually sits in a variable such as BUGSNAG_PERSONAL_TOKEN or BUGSNAG_AUTH_TOKEN, used by scripts and build tools. A leaked token is far more serious than a leaked notifier key.
How Bugsnag API keys get leaked
- Client initialization. The notifier key typed into the setup code of a web or mobile project, then committed or published in a bundle.
- Mobile manifests. The key stored in an Android manifest or an iOS property list, readable by anyone who downloads the app.
- Environment files.
BUGSNAG_API_KEYor a personal token in a.env, compose file or build script. - Release tooling. Upload scripts for source maps and release tracking that carry the key in a pipeline definition.
- Scripts and exports. A script that pulls errors through the API, saved with its token and shared in a gist, an issue or a ticket.
What to do in the first hour
- Identify the credential. A key used by the client library in the app is the notifier key. A value in an
Authorizationheader or a script that reads data is a personal auth token. - Revoke a personal token first. In the settings of your Bugsnag account, open the page that lists personal auth tokens and delete the exposed one (see the link below). Create a new one if a script still needs it, and keep it in a secret store.
- Replace the notifier key if needed. Look in the project settings for the key and the option to regenerate it, if your version offers one. Since the key ships in apps, plan for old app versions that keep sending to the old key.
- Deploy the new values to CI variables and builds, and trigger a test error to confirm reporting still works.
- Review the data exposed. If a personal token leaked, assume anyone holding it could read the errors, stack traces, breadcrumbs and user identifiers of the projects it reached. Decide whether any of that includes personal data you must report.
- Look for noise. If the notifier key leaked, check the projects for floods of invented errors, strange releases or events from unknown app versions.
- Clean up the code and look for neighbours such as source map upload keys. See I accidentally pushed an API key to GitHub.
Not sure what else leaked from the same repository? Run a free scan.
Revoke it at Bugsnag
For a personal auth token, sign in to your Bugsnag account, open your account settings and go to the page that lists personal auth tokens; delete the exposed one there. A deleted token stops working, so scripts using it must get a new one. The notifier key lives in the settings of each project. A person has not confirmed the exact menu wording for this guide, and the interface can change, so if the page differs from this description, look for the section where tokens or project keys are listed, and follow the Bugsnag documentation.
How LeakWatch detects it
The rule is called Bugsnag API Key. It looks for the word bugsnag, in any letter case, followed within about 40 characters by a UUID-shaped value: letters and digits in groups of 8, 4, 4, 4 and 12 separated by dashes, standing on their own. A 32-character key without dashes, or one far from the word, is not reported. That is why a notifier key written the usual way can be missed, and why a match here deserves a quick look at what the value really is. The severity is high. This type is not checked live: LeakWatch does not send any request to Bugsnag 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
Is a Bugsnag notifier key really secret?
Not in the same way as a token. It ships in apps and bundles, so assume it is public. The risk is fake events in your project. A personal auth token must stay private.
Can an attacker read my error data with the notifier key?
The notifier key is meant to send events, not to read them. Reading data takes a personal auth token, which is why you should tell the two apart first.
Do I need to tell users if a token leaked?
Maybe. Error events can contain user identifiers and request data. Check what your events hold and whether your obligations require a notification.