One Stolen Token Should Not Ship Your App
An attacker got hold of one admin's access token. Within minutes they had pushed a workflow file into every repository in the organisation, each one tailored to that repo, each one written to read the repo's secrets and send them out.
We contained it. Tokens revoked, secrets rotated, signatures enforced. I've written about that part separately.
This post is about the question that stayed with me afterwards, looking at our mobile repo:
If one token can push code, and pushing code can publish to the Play Store, then one token can ship an app to our users.
That had to stop being true. This is the release gate I built so that it takes two named humans, and so that a merge is no longer a release.
The problem, in two parts
One: a merge was a release. Merging to main built and published both of our Android apps (two apps, one codebase).β¦