Back to all lessons
Awareness Lessons
yesterday

Stolen Developer Tokens Open the Door to Production Systems via GitHub

Written by AI from the linked story. Not reviewed by an editor. How this works

When developer machines are compromised, attackers can harvest GitHub personal access tokens and OAuth tokens to pivot directly into production environments, CI/CD pipelines, and secrets stores. The incidents affecting SAP, Todoist, and LiteLLM demonstrate that development access is not isolated — it is often a privileged on-ramp to sensitive source code, build secrets, and downstream systems. Organizations frequently underestimate the blast radius of a single compromised developer credential because CI/CD pipelines are trusted implicitly and rarely audited with the same rigor as production infrastructure. This matters because attackers can inject malicious code, exfiltrate secrets, or compromise the software supply chain affecting customers at scale.

Tactical Insight

Immediate actions

  • Rotate all GitHub personal access tokens and OAuth tokens immediately upon any suspicion of developer machine compromise.
  • Audit existing token scopes and revoke any tokens with broader permissions than the minimum required for their specific task.
  • Scan CI/CD pipeline configurations and repository secrets for exposed credentials using tools such as GitHub Secret Scanning or truffleHog.

Long-term improvements

  • Enforce short-lived, fine-grained tokens with least-privilege scopes and require re-authentication for sensitive operations rather than relying on long-lived personal access tokens.
  • Implement mandatory code review and branch protection rules so no single developer account can push directly to main or modify workflow files without approval.
  • Treat CI/CD pipeline access and secrets management with the same rigour as production infrastructure, including regular access reviews and just-in-time provisioning.

Detection measures

  • Enable audit logging on GitHub organisations and alert on anomalous token usage, such as access from unexpected IP addresses or unusual hours.
  • Monitor for unexpected changes to GitHub Actions workflow files or new repository secrets being created or accessed.
  • Integrate developer endpoint detection (EDR) telemetry with SIEM to detect credential-harvesting activity on developer machines before tokens are leveraged.

Back this up with a control

All controls and vendors

Training helps people spot this. These controls make the attack fail even on the day someone does not.