TL;DR
In the last week of November, 1Password and SAP both disclosed incidents that started with an employee’s GitHub access. At 1Password, a hijacked account and a stolen token were enough to push code to backend services, and that code exported customer account records. Hardware keys and MFA would not have saved either company, because the attacker never had to log in. The fix isn’t a stronger login. It is making sure no single developer identity can take code all the way to production.
Originally published at portfolio.hagzag.com.
Two security companies, one door, one week
On November 19, 1Password started investigating signs that an employee’s GitHub account had been compromised. On November 25 it disclosed what happened. The attacker used that account and a stolen token to copy private source code and reach the CI/CD system, which holds “infrastructure related secrets in order for our product to work.” Then they pushed malicious code to backend services. That code downloaded what 1Password called “administrative data pertaining to our customers”: names, emails, account identifiers, SRP parameters, and the tokens in invitation, provisioning and account recovery links (SiliconANGLE).
Vaults were not touched. 1Password’s two-secret design held, exactly as advertised. But read that chain again: one GitHub identity got from source to CI secrets to running code in production.
The next day, Der Spiegel reported that attackers had used stolen SAP employee authentication tokens to copy and alter source code on GitHub. SAP confirmed an incident and said it found “no evidence of unauthorized access to customer business data.” The rest is still reported, not confirmed: the token theft, the altered code, the AI agents Spiegel’s sources mentioned, and Handelsblatt’s report that SAP rotated signing keys and suspended automated development operations (CSA note).
Neither company has said how the token was stolen. That’s the part everyone will speculate about. I think it’s the least important part.

Your MFA is guarding the wrong door
Most orgs I review have done the login part well. SSO through the IdP, enforced 2FA, some even require passkeys or hardware keys. That protects the moment a human types a password.
A personal access token skips that moment entirely. So does a session cookie lifted by an infostealer, an OAuth grant to a forgotten IDE plugin, or a GITHUB_TOKEN exfiltrated from a build. Once the attacker holds one of those, nobody types anything. The token is the engineer, for as long as it lives and for everything it can reach.
This is the contrarian part: buying everyone a YubiKey is a good idea that would likely have changed nothing here. The 1Password disclosure says “stolen token” and the SAP reporting says “authentication tokens”. Both point at a credential that was already past the login.
The real failure: push equals deploy
The step that turned an account compromise into a customer data incident at 1Password was “pushed malicious code to backend services”. The disclosure doesn’t say which control was missing, so I won’t guess about their pipeline. But I know how often I see the same shape in client repos:
- A developer can push to a branch that deploys, or merge their own PR.
- CI on that branch has production secrets in plain repository or org secrets.
- The deploy job runs on any push, with no environment gate.
In that setup, “a developer’s laptop got popped” and “production got popped” are the same event. The perimeter is not your VPC. It’s the set of GitHub identities that can cause code to run with production credentials.
A checklist that assumes the token is already stolen
Design every control as if the attacker already holds a valid token for one of your engineers. Then ask what that token can still not do.
1. Make tokens short-lived and narrow. Ban classic PATs at the org level. Require fine-grained PATs with approval, scoped to specific repos, with a maximum lifetime you choose (GitHub lets org owners enforce this, so check your plan). For automation, use GitHub Apps or OIDC, not anyone’s personal token.
# Who has a fine-grained PAT into your org right now, and when does it expire?
# (needs an org admin token or a GitHub App with the right org permission)
gh api "orgs/YOUR_ORG/personal-access-tokens?per_page=100" \
--jq '.[] | [.owner.login, .token_expires_at, .repository_selection] | @tsv'
# For SAML SSO orgs: which credentials have been authorized against the org
gh api "orgs/YOUR_ORG/credential-authorizations?per_page=100" \
--jq '.[] | [.login, .credential_type, .credential_accessed_at] | @tsv'
Run both. The first time I run these on a client org, the list is always longer than anyone expects.
2. Separate push from deploy. Protect deploy branches with rulesets: required PR, at least one reviewer who isn’t the author, no bypass for admins. Put production secrets in a GitHub deployment environment with required reviewers, never in repo-level secrets. One stolen identity should now need a second, independent human to reach production.
3. Require signed commits at merge, but don’t trust them alone. Turn on “require signed commits” in the ruleset. Know its limit: if the signing key lives on the same compromised laptop, the attacker signs too. Signing proves which key, not which intent. The second reviewer in step 2 is what actually stops the push.
4. Keep CI secrets out of reach of the repo. Move from stored cloud keys to OIDC federation with sub claims pinned to a specific repo, branch and environment. I covered the pinning detail in SHA Pinning Was Never the Finish Line. A stolen developer token that can’t mint a production cloud credential is a code-theft incident, not a data incident.
5. Watch GitHub like you watch your cloud. Stream the org audit log to your SIEM. Alert on new PATs, new deploy keys, workflow file changes on protected branches, and repo clones from unusual IPs. 1Password noticed the compromise. Ask yourself if you would.

What this costs (and where I’d cut corners)
None of this is free, and I’ve watched teams roll it back.
Required non-author reviewers hurt small teams. A three-person platform team on call at 2 AM will hate waiting for a second approval on a hotfix. My compromise: allow a break-glass bypass role, but alert loudly on every use and review it the next morning.
PAT expiry breaks scripts. The first 90-day expiry wave always takes down some cron job someone wrote with their personal token in 2022. That outage is the point. It shows you which automation was running as a human.
Environment gates slow deploy frequency, and that shows up in your DORA numbers. I’d rather explain a slower lead time than a disclosure blog post.
And the honest gap: if an attacker is patient, they can steal two identities. These controls raise the cost from “one infostealer hit” to “two coordinated compromises plus avoiding detection”. That’s the realistic goal.
Conclusion
Three weeks ago I wrote about the AI vendor you forgot to offboard. Then about pinning the actions you depend on. This time the weak link wasn’t a vendor or a third-party action. It was a trusted insider’s identity, used by someone else.
This week, run the two gh api commands above and count how many identities can take code to production by themselves. If the answer is more than zero, that’s your perimeter, and it has no fence.
Discussion