Skip to content
Quantum Secure Labs
Cybersecurity News

Gheist: stolen GitHub tokens pull secrets from private repositories through Actions logs

An automated campaign called Gheist uses stolen GitHub tokens to plant workflows that print repository secrets, including private and GitHub Enterprise ones, into Actions logs. If your team uses GitHub with CI/CD…

By Quantum Secure Labs4 min read
Pantalla de un portátil con código y registros de un proceso de integración continua
In this article

An automated campaign called Gheist uses stolen GitHub tokens to plant workflows that print repository secrets, including private and GitHub Enterprise ones, into Actions logs. If your team uses GitHub with CI/CD, search your audit logs today for ci-sync- branches and, if you find any, rotate every secret.

The essentials

  • Wiz has recovered more than 13,500 planted branches from more than 850 compromised accounts, ranging from personal projects to private enterprise repositories (The Hacker News).
  • Each attack creates a ci-sync- branch followed by six random characters and pushes a single file, .github/workflows/sync-check.yml, with the commit message “ci: sync config”.
  • Since 28 July GitHub holds potentially malicious runs until a collaborator with write access approves them, but only on public github.com repositories.
  • Wiz has tracked the campaign since 15 September, said it was still active and evolving as of 24 October, and estimates it hit “a dozen companies” (Dark Reading).

How does it steal the secrets?

The attacker doesn't need to break anything. They use a stolen GitHub token, create the branch and push the workflow. That workflow prints the job environment and every secret it can read, encoded in base32. GitHub masks secrets in logs, but doesn't guarantee it once the value is encoded, so the full text comes out. The attacker then downloads the logs and deletes the run.

Because the secrets leave through GitHub itself, there is no attacker server and no outbound connection to block. Your firewall sees nothing unusual.

Where do the tokens come from? Wiz traced some of them to infostealer logs and to tokens exposed in earlier supply chain attacks, according to The Hacker News.

Am I affected if my repositories are private?

Yes, and more so than with public ones. GitHub's hold stopped every run on the public repositories Wiz checked, but it doesn't cover private repositories or GitHub Enterprise Server. The attacks have worked on private repositories and in GitHub Enterprise environments.

In enterprise organisations, the tool cycled through tokens from several users and automation accounts within minutes and cloned private repositories before planting the workflow. Hours later, cloud credentials from the same organisation were used to enumerate AWS Secrets Manager. The theft doesn't stay in GitHub.

Around 19 October a version appeared that launches a second job against self-hosted runners. Wiz describes it as broken and reports no successful execution.

What to do today

  1. Ask whoever runs your GitHub to search the audit logs for runs on ci-sync-* branches deleted less than a minute after finishing, and for activity from the “gheist” user agent.
  2. If your workflows use OIDC with your cloud provider, check its logs for role assumptions whose subject includes a ci-sync- branch.
  3. If you find any trace, rotate every repository, organisation and environment secret that repository could use: AWS or other cloud keys, deployment tokens, database passwords. Deleting the branch or the run does not undo the exposure.
  4. Revoke the tokens that made the commits and check their owners' laptops for infostealers.
  5. Keep a written record of the review, whether you find something or not.

What it means for a small business

The weak point here isn't GitHub: it's long-lived personal tokens. One old token with write access is enough to read every secret in the repository. At a startup, those secrets are often the production cloud keys.

Our view: treat this as a credential management problem, not a vendor problem. Over the medium term, replace personal tokens with GitHub Apps or short-lived tokens, require reviewers on production environments, restrict OIDC to protected branches or environments and use ephemeral self-hosted runners. None of these measures is exotic or expensive.

Don't forget GDPR. If a stolen secret gives access to personal data in production, it can become a notifiable breach. That's why you should document the review. If you want a second look at your CI/CD chain, you can lean on our cybersecurity service.

One caveat: these details come from specialist media citing Wiz's report. We haven't accessed the original report or a GitHub advisory.

Frequently asked questions

Is deleting the ci-sync branch enough?

No. The secrets have already left through the logs. You need to rotate all of them and revoke the tokens involved.

Will my firewall catch it?

Not through data exfiltration: the secrets leave through GitHub itself, with no connection to an attacker server. Detection relies on the audit logs.

Am I protected if I use GitHub Enterprise Server?

No. The run hold GitHub has applied since 28 July only covers public github.com repositories.

Sources

Worried about a threat like this one?

We review your exposure and show you how to protect yourself.

See our cybersecurity service

Cybersecurity News

Node2Shell: Brotli flaw CVE-2026-111497 forces patches for Node.js, .NET and Python

A critical flaw in Google's Brotli decoder (CVE-2026-111497, "Node2Shell") lets crafted compressed data corrupt memory. It affects websites, APIs and scripts in Node.js, .NET or Python that decompress Brotli from third…

Cybersecurity News

Malicious LiteLLM 1.107.0 on PyPI and Docker: a leaked GitHub key opened the door to the attack

A malicious LiteLLM release, version 1.107.0, was published on 21 October to PyPI and Docker with a credential stealer and a backdoor. It affects anyone who installed LiteLLM without pinning a version or used tags like…

Cybersecurity News

Threat actor k0t targets exposed Fortinet and Palo Alto firewalls and VPNs: over 70,000 credentials

Group-IB and NyxLab have uncovered a campaign by the actor k0t that scans the internet for vulnerable Fortinet and Palo Alto firewalls and VPNs, regardless of sector or size. It is linked to Qilin ransomware. If you…

Want to apply these ideas to your business?

Tell us about your case and we'll show you how to apply these strategies to your project.