Supply‑Chain Tool “Gheist” Exploits Stolen GitHub Tokens to Harvest Cloud Secrets from Thousands of Repositories
What Happened — An active supply‑chain campaign, dubbed Gheist, is abusing compromised GitHub personal access tokens (PATs) to crawl private developer repositories and extract cloud‑provider credentials (AWS access keys, Azure service principals, GCP service accounts) as well as other sensitive configuration files. The attackers first obtain the PATs through phishing, credential‑stuffing, or by purchasing them on underground markets. Once a token is in hand, the tool authenticates to the victim’s GitHub account, enumerates all repositories the token can access, and searches for patterns that match known secret formats (e.g., AKIA… for AWS, -----BEGIN PRIVATE KEY-----).
The operation is automated: a lightweight Go binary runs on compromised workstations or CI runners, pulls the token from environment variables or credential stores, and streams any discovered secrets to a command‑and‑control server operated by the threat actors. Dark Reading reports that the campaign has already harvested credentials from “thousands of repositories,” though exact numbers have not been disclosed.
The attackers leverage the stolen secrets to pivot into victim cloud environments, where they can spin up compute resources, exfiltrate data, or deploy ransomware. Because the initial foothold is a legitimate GitHub token, standard anomaly‑based detection that looks for “malicious” binaries often misses the activity.
GitHub has responded by urging users to rotate all PATs, enable token‑scoping, and adopt fine‑grained permissions. The company also recommends enabling “token‑audit logs” and using its “secret scanning” feature, which flags exposed keys in code pushes. No public attribution has been made, but the tactics align with known credential‑theft groups that specialize in supply‑chain abuse.
Why It Matters for Trust & Control Assurance — The incident underscores the need for continuous oversight of third‑party development tools and strict lifecycle management of access tokens, a core control area for supply‑chain risk assurance.
Who Is Affected — Any organization that hosts private code on GitHub and integrates cloud credentials into its CI/CD pipelines is at risk. This includes software vendors, fintech firms, SaaS providers, and large enterprises that rely on cloud infrastructure for production workloads.
Recommended Actions
- Enforce least‑privilege token scopes – Issue PATs with the minimal permissions required for the job and avoid using tokens that can read all repositories.
- Implement token rotation policies – Require periodic regeneration of GitHub tokens and automate revocation of stale credentials.
- Activate GitHub secret scanning and audit logs – Ensure that any accidental commit of cloud keys is flagged immediately and that token usage is logged for forensic review.
- Adopt continuous third‑party monitoring – Deploy tools that ingest GitHub audit data, correlate token activity with cloud‑provider logs, and generate alerts on anomalous access patterns.
- Segregate cloud credentials from code repositories – Store secrets in dedicated vaults (e.g., HashiCorp Vault, AWS Secrets Manager) and retrieve them at runtime rather than embedding them in source.
Technical Notes –
- Attack vector: Compromised GitHub personal access tokens (PATs).
- Tools used: Custom Go binary; leverages GitHub REST API for repository enumeration.
- Data types exfiltrated: Cloud provider access keys, service‑account JSON files, SSH private keys, API tokens.
- Detection gaps: Legitimate token usage blends with malicious activity; traditional endpoint AV often does not flag the Go binary.
- Mitigations: GitHub’s fine‑grained PATs, secret scanning, token‑audit logs; external secret‑management solutions; zero‑trust network segmentation for CI/CD runners.
Source: Dark Reading – “Gheist Weaponizes GitHub Tokens to Steal Cloud Secrets”