Subscribe to the Non-Human & AI Identity Journal

Notifications
Clear all

GitHub OAuth token compromise: what IAM teams need to change


(@nhi-mgmt-group)
Member Moderator
Joined: 1 year ago
Posts: 13010
Topic starter  

TL;DR: A dormant GitHub OAuth token issued 95 days earlier was used to exfiltrate 472 repositories, with detection built from five correlated anomaly signals and response centered on revocation and secret rotation, according to Exaforce. The case shows that long-lived developer OAuth credentials create a governance gap that traditional review cycles and baseline assumptions do not close.

NHIMG editorial — based on content published by Exaforce: Learning from the Exaforce frontline: Detecting GitHub OAuth Token Compromise

By the numbers:

Questions worth separating out

Q: What breaks when a GitHub OAuth token is treated like a temporary login session?

A: The organisation loses track of a credential that can remain valid for months or years after the original setup event.

Q: Why do long-lived developer OAuth credentials increase breach impact?

A: Because they preserve trust even after the initiating user action is over.

Q: How do security teams know if OAuth abuse is slipping past detection?

A: The warning signs are gaps between user activity and identity telemetry.

Practitioner guidance

  • Revoke dormant OAuth grants on a fixed schedule Build a process to identify OAuth tokens that were issued but never used, or that have been idle beyond your risk threshold, and revoke them before they become a live attack path.
  • Prefer expiring credentials for sensitive developer access Where possible, move sensitive workflows to credential types with mandatory expiration and narrower repository scope, rather than relying on classic OAuth App tokens that remain valid indefinitely.
  • Correlate identity, location, and session signals Tune detections to combine impossible travel, ASN drift, rate spikes, and user-agent anomalies with identity provider timing so that token replay shows up as one finding instead of five weak alerts.

What's in the full article

Exaforce's full blog covers the operational detail this post intentionally leaves for the source:

  • How the five anomaly signals were correlated into a single high-confidence finding
  • The response workflow for revoking OAuth grants and active sessions across connected systems
  • The preventive control set for dormant-token flagging, repository scoping, and endpoint coverage
  • The detection and SOAR patterns used to move from alerting to containment

👉 Read Exaforce's analysis of GitHub OAuth token compromise and detection →

GitHub OAuth token compromise: what IAM teams need to change?

Explore further

View Full Forum →  |  NHI Foundation Course →



   
Quote
(@mr-nhi)
Member Moderator
Joined: 3 months ago
Posts: 12594
 

Dormant OAuth grants are a lifecycle failure, not a one-off detection problem. The attack worked because the token remained valid long after the human setup event ended, which means the real control gap was credential lifetime governance. That is an OWASP NHI issue as much as a logging issue, because the organisation had no effective mechanism for forcing renewal before abuse. Practitioner conclusion: if a token can outlive its original context by months, it is already outside normal identity control.

A few things that frame the scale:

  • 91% of former employee tokens remain active after offboarding, leaving organisations vulnerable to potential security breaches, according to The 2025 State of NHIs and Secrets in Cybersecurity.
  • 62% of all secrets are duplicated and stored in multiple locations, which expands the number of places a compromised OAuth credential can be abused.

A question worth separating out:

Q: Who is accountable when a dormant OAuth token is abused to steal repositories?

A: The accountable owners are the teams that approved the integration, defined the credential lifecycle, and operated the monitoring and revocation process. In practice, this spans IAM, platform engineering, and application owners. If a credential can stay alive without a clear owner, accountability has already broken down.

👉 Read our full editorial: GitHub OAuth token compromise exposes dormant credential risk



   
ReplyQuote
Share: