On April 15 GitHub disclosed that an attacker had used OAuth tokens stolen from two well-known integrators, Heroku and Travis CI, to download private repositories from dozens of organizations. GitHub itself was not breached, and the attacker never had to log in as any of the victims. They held keys that customers had given to a third party, and used them.
Most of our clients have never thought of clicking "Authorize" on a connected app as issuing a credential. It is one. It is often the longest-lived and least-watched credential the company has.
What happened
The sequence GitHub published, along with what the integrators have said since:
- April 12. GitHub's security team spotted unauthorized access to npm's production infrastructure using a compromised AWS API key. GitHub believes the attacker got that key by downloading private npm repositories with a stolen OAuth token.
- The tokens belonged to OAuth applications for the Heroku Dashboard and for Travis CI. They had been issued to those integrators by GitHub users who connected the services to their accounts.
- The pattern, which GitHub laid out on April 27, was methodical. The attacker authenticated to GitHub's API with a stolen token, listed the organizations the user belonged to, chose targets, listed their private repositories and cloned some of them. GitHub described the attacks as highly targeted, and said the attacker may have mined repository contents for secrets to reach other infrastructure.
- GitHub said its own systems were not compromised. It does not store the tokens in their original, usable form, so it does not believe they were taken from GitHub.
- Heroku revoked every token used by its GitHub integration, finishing on April 16, and has blocked new ones from being issued. Deployments from GitHub to Heroku stopped working. Reconnection is on hold until Heroku decides it is safe, and it is urging customers to review their own GitHub logs and rotate any credentials that may have been exposed.
- Travis CI said it revoked and reissued the keys and tokens that connect customer accounts to GitHub, and said no customer data was exposed.
- GitHub emailed affected users on April 18, and on April 22 notified a further group whose repository lists had been read but whose contents had not been downloaded. On April 27 it said it was sending its final expected notifications.
Why this route works
Stealing a token is not glamorous, but it skips almost every control a company has spent money on.
It skips your login. A token is what you get after a login has already happened. SSO, MFA and conditional access were all checked once, when someone granted the app access. After that, whoever holds the token is treated as the app.
It does not expire on its own schedule. Tokens like these usually live until someone revokes them. The developer who authorized an integration in 2019 may have forgotten it exists, while the grant they made is still live.
The scopes are broad. Classic OAuth scopes on code platforms are coarse. An integration that needs to deploy one repository often holds access to every private repository the authorizing user can see.
Someone else holds it. The security of that token depends on the integrator's systems, not yours. You have no view into how they store it.
It looks like normal use. The integration is supposed to call the API. A clone through a legitimate app's token does not trip the same alarms as a login from a strange country.
The second hop is your secrets
The npm part of this story is the most instructive. Cloning a repository is a confidentiality problem. Finding a working cloud key inside it is an access problem, and that is the step that took the attacker from source code to production infrastructure.
When we review client repositories, we find live credentials in commit history often enough that we now assume they are there until a scan proves otherwise. That includes old commits and branches. Deleting a key in a later commit does not remove it from history, and anyone who clones the repository gets the history too.
What to do this week
- Check whether you were notified. GitHub has said that affected customers get an email from it, and that no email means it did not identify your account as affected. That is useful, but it does not replace checking for yourself.
- Read your own logs. Look at organization audit logs and personal security logs for unusual repository listing or cloning by the Heroku or Travis CI integrations over the past month. Heroku's status updates say plainly that its security team cannot see customers' GitHub logs, so this is your job.
- Rotate secrets in every repository those integrations could reach, not just the ones you think were cloned. That scope is the honest one.
What to do this quarter
- Turn on OAuth app access restrictions for your GitHub organization, so members cannot give third-party apps access to organization data without an owner's approval. Turning it on cuts off unapproved apps immediately, so approve the ones you need first or announce a cutover window.
- Prefer GitHub Apps to OAuth apps where vendors offer both. GitHub Apps are installed on specific repositories, request specific permissions, and work with short-lived tokens.
- Prune on a schedule. Every quarter, review authorized apps at organization and user level. Remove anything nobody can explain.
- Get secrets out of code. Scan on every push, keep secrets in a vault, and use short-lived cloud credentials for deployment pipelines instead of static keys.
- Repeat the exercise for Microsoft 365 and Google Workspace. "Allow this app to access your account" is the same pattern, with your mailboxes and files on the other end. Restrict user consent and send requests through an admin approval workflow.
- Find out what your logs can actually see. Check which repository events your plan records before you need them, not during an incident.
Every "Authorize" button cuts a key and hands it to someone else to keep. Count your keys.






