Grafana disclosed that a stolen GitHub token allowed attackers to clone its private repositories. The threat actor demanded payment to keep the stolen code private, but Grafana refused and involved law enforcement. Experts explain how token leaks happen, why they’re dangerous, and steps organizations can take to prevent similar incidents.
Grafana GitHub Token Breach Triggers Codebase Theft and Extortion Attempt

Grafana announced that an unauthorized party obtained a GitHub personal access token (PAT) that granted full read access to the company’s private repositories. Using the token, the attacker cloned the entire codebase, then tried to extort the firm by threatening to publish the source code unless a payment was made. Grafana declined to pay, engaged the FBI, and has since revoked the compromised credentials and added additional safeguards.
What happened and why it matters
Grafana’s security team detected unusual clone activity on their GitHub organization and traced it back to a PAT that had been leaked. The token allowed the attacker to:
- List all private repositories.
- Clone each repository in its entirety.
- Read issue trackers, pull‑request discussions, and CI configuration files.
Because the token provided read‑only access, the attacker could not directly modify the code, but the exposure of the full source gives adversaries a roadmap for future supply‑chain attacks, vulnerability discovery, or the creation of counterfeit binaries.
The incident underscores a growing trend: attackers targeting credential artifacts (tokens, SSH keys, OAuth secrets) rather than exploiting software bugs. A leaked token can be as powerful as a compromised admin account, and it often goes unnoticed until the victim notices anomalous activity.
Who is behind the attack?
While Grafana has not publicly identified the group, threat‑intel feeds from Hackmanc and Ransomware.live attribute the extortion attempt to CoinbaseCartel, a data‑extortion crew that surfaced in late 2025. Analysts at Fortinet FortiGuard Labs describe CoinbaseCartel as an off‑shoot of the ShinyHunters, Scattered Spider, and LAPSUS$ ecosystems. Unlike classic ransomware, the group focuses on stealing data and threatening public exposure unless a payment is made.
“These extortion‑only groups are cheap to run and can generate revenue quickly by leveraging the fear of brand damage,” says Michele Russo, senior threat analyst at FortiGuard Labs. “Stealing source code is attractive because it can be weaponized for future supply‑chain compromises, making the victim more likely to pay.
Practical takeaways for security teams
1. Treat tokens like passwords
- Store PATs in a secrets manager (e.g., HashiCorp Vault, AWS Secrets Manager) rather than in plain text or code repositories.
- Rotate tokens regularly—GitHub recommends a maximum lifespan of 30 days for high‑privilege tokens.
- Enforce the principle of least privilege: grant only the scopes needed for a given workflow (e.g.,
repo:readinstead ofrepo:all).
2. Monitor for anomalous Git activity
- Enable GitHub’s audit log and forward events to a SIEM (Splunk, Elastic, or Azure Sentinel). Look for spikes in
git cloneoperations, especially from IP ranges that are not part of your CI/CD pipeline. - Deploy a behavioral analytics rule that flags large data transfers from the repository to external IPs.
3. Harden CI/CD pipelines
- Use short‑lived OIDC tokens for GitHub Actions instead of long‑lived PATs. GitHub’s OIDC integration lets workflows obtain temporary credentials that automatically expire after the job finishes.
- Separate build environments from production secrets; never expose production tokens in a build container.
4. Incident response checklist for token leakage
| Step | Action |
|---|---|
| Identify | Pinpoint the compromised token via audit logs. |
| Revoke | Immediately invalidate the token in GitHub and rotate any dependent secrets. |
| Assess | Determine which repositories were accessed and whether any sensitive files (e.g., private keys, configuration files) were exposed. |
| Notify | Inform internal stakeholders, legal, and, if required, regulatory bodies. |
| Engage | Contact law enforcement (FBI, local cyber‑crime units) when extortion is involved. |
| Post‑mortem | Review why the token was exposed and implement mitigations. |
How Grafana responded
Grafana’s statement highlighted three immediate actions:
- Forensic analysis – A dedicated team examined GitHub audit logs and identified the token’s origin.
- Credential invalidation – All PATs with similar scopes were revoked, and new tokens were issued with tighter scope definitions.
- Additional safeguards – The company enabled mandatory SAML‑based SSO for all GitHub access and activated GitHub Advanced Security to scan for secret leakage in code pushes.
The firm also coordinated with the FBI, which advises against paying extortion demands because payment does not guarantee data deletion and may encourage further attacks.
What you can do right now
- Audit your GitHub organization: run
gh api -X GET /orgs/:org/credential-authorizationsto list active PATs and their scopes. - Enable secret scanning: GitHub’s built‑in secret scanning can automatically block pushes that contain tokens.
- Adopt zero‑trust networking: Restrict repository access to known IP ranges using GitHub’s IP allow‑list feature.
By treating tokens with the same rigor as passwords and continuously monitoring for abnormal repository activity, organizations can dramatically reduce the risk of a similar breach.
For more details on securing GitHub tokens, see the official GitHub token best practices guide.

Comments
Please log in or register to join the discussion