Table of Contents
Once again this October, a stolen or forgotten GitHub token has been enough to break into large companies. The obvious answer is to ban the riskiest type of token, but if you have set up GitHub by the book, you can’t, and then security rests on nobody out in the organization switching it back on.
On 21 October, the cloud platform Railway reported that an attacker had gained access to some of its customers’ secret keys and passwords. How the attacker got in is not yet known, but among other things Railway had to reset every GitHub connection the platform held on its customers’ behalf. A few days earlier, a malicious version of the open source project LiteLLM was published because an attacker had found a GitHub key in a log file, and Meta has confirmed that hackers have been inside some of the company’s repositories.
In Denmark, most people remember Novo Nordisk, which in June reported a breach of internal systems. Novo has not said how the attackers got in, but the group behind the attack claims that one of the ways in was exactly that: a GitHub key with access to several hundred repositories.
One key is enough#
What these cases have in common is that the attackers did not have to break anything open. They found a key lying somewhere it should not have been, and it gave access to far more than it needed to.
Developers use keys like these, known as personal access tokens, to give scripts and tools access to the code. The oldest type, classic tokens, is the riskiest, because they can live forever and give access to everything the developer has access to. GitHub itself recommends newer and more limited alternatives, so the natural move is to ban classic tokens across the whole company.
When best practice gets in the way#
We couldn’t do that when we helped one of our customers move their development from Azure DevOps to GitHub, a journey a great many companies are on right now. Like most larger companies, the customer wanted to manage users and access centrally from its own identity provider, so that an employee automatically loses access when they leave. That is good practice, but the connection that keeps users in sync uses a classic token, and it cannot be exempted if you ban the rest.
After several conversations with GitHub’s support and engineers, it was clear there was no way around it. GitHub knows about the problem, which by their own account has been sitting in their backlog for some time.
Security that rests on trust#
The alternative is to allow classic tokens centrally and let each organization in GitHub shut them off itself. That moves the decision from IT security to whoever owns the organization, typically a product owner or a lead developer out in the business. The setting can only be changed manually in GitHub, and centrally you can only see the change after it has happened.
Our experience is that they do switch it on, rarely out of indifference, but because it is the fastest way to get something working when time is short. Zero trust is about security not depending on each individual doing the right thing, but here it depends on every single organization owner leaving alone a setting they both have access to and a good reason to change.
What can you do on GitHub?#
Until GitHub fixes this, you can limit the damage by giving every key an expiry date, keeping an eye on when organizations change the setting, and moving automation onto solutions that do not need personal keys. It is also worth knowing which external platforms have access to your GitHub, because as Railway showed, their problem quickly becomes yours too.
How we did it in fremforge#
When we built fremforge, our own European Git platform, we started from exactly this problem. Personal keys are switched off by default, so an organization has to actively opt in, and if it does, the keys get a maximum lifetime and a reminder before they expire.
User sync from the company’s identity provider uses its own key for that specific purpose rather than a personal key on an admin account, so it does not stand in the way of switching personal keys off, and it can be rotated without downtime. The setting can also be managed as code via API and Terraform, so the central IT function can hold it in place across organizations and detect if anyone changes it, and every change is logged.
Day to day, there is not much need for personal keys either. Developers sign in through the company’s identity provider with MFA, CI jobs get short-lived credentials that expire on their own, and keys accidentally committed to the code are rejected before they reach the history.
Central user management is still the right choice, but it should not come at the cost of the most dangerous key sticking around.
Sources#
- Railway: preliminary report (via daily.dev), GitGuardian
- LiteLLM: The Hacker News
- Meta: SecurityWeek
- Novo Nordisk: company announcement, 11 June 2026, GovInfoSecurity on the attackers’ claims
- GitHub: SCIM REST API, PAT policy for organizations
- fremforge: Authentication policy, SCIM, Terraform provider