Case 009 · Incident: Sep–Oct 2026
Gheist: Hackers hit 850+ GitHub accounts to steal their secret keys
Gheist is an automated campaign tracked by Wiz since September 15, 2026. It uses stolen GitHub tokens to push a sync-check workflow onto new ci-sync- branches. The workflow prints the repository's secrets, encoded in base32, into its own Actions log, and the tool downloads the log and deletes the run seconds later.
A Theft Without a Break-In
Wiz recovered more than 13,500 planted branches from more than 850 compromised accounts. According to one analysis, nothing in GitHub was broken. The attackers used stolen tokens and ordinary platform features.[1][2] The cloud security firm Wiz has tracked this campaign since September 15, 2026. It named the operation Gheist after the user agent the attackers' tool sends with its requests to the GitHub API. A user agent is a short label that tells a server which software is calling.[3] The idea is simple and quiet. A workflow is pushed into a repository, it prints that repository's secrets into its own log, and the attackers download the log before deleting the run.[3]
There was no vulnerability to patch. As one analysis put it, nothing in GitHub was broken. The attacker simply holds valid tokens and uses ordinary platform features.[2]
The Stolen Keys
The stolen tokens came from somewhere. Wiz could trace some to infostealer logs, malware that scrapes credentials from infected machines, and others to earlier supply-chain attacks, including the March compromise of the Trivy scanner.[3] Why does one token matter so much. GitHub's own documentation says anyone with write access to a repository can read every secret configured in it. A stolen token with that access is enough.[3] So the whole path begins with a key that was never theirs. The sources Wiz could trace include infostealer logs and earlier supply-chain attacks, but how each token was stolen is not public. Everything after that uses ordinary GitHub features: a planted branch, a workflow that runs, a log the tool downloads, and then a run it deletes.[1][3]
The Sync-Check Workflow
For each repository, the tool creates a branch named c-i-sync, followed by six random characters. Then it commits a workflow file called sync-check, with the innocent-looking message, c-i, sync config.[1] The commit is unsigned and recorded as the token owner's own work. The push itself is what triggers the workflow to run.[1] Here is the trick. GitHub hides secret values in logs only when they appear exactly as stored. The workflow first rewrites each secret in base32, a simple encoding into letters and digits, so the masking never matches and the secret prints in full.[1]
The workflow even carries an empty permissions block. That looks locked down, but it only restricts a token the attacker does not need. It does nothing to block access to the secrets themselves.[1] One version runs a separate job for every deployment environment in the repository. That pulls in environment-scoped secrets too, which Wiz says are often production credentials.[3] Once the secrets are in the log, the tool downloads that log and then deletes the run. In private repositories and on GitHub Enterprise Server, GitHub audit logs show these runs on ci-sync branches completing, then being deleted by the gheist user agent.[1][3]
And because the secrets leave through GitHub's own interface, there is no attacker server, no strange domain, nothing in the network traffic to block.[1]
Inside the Enterprise
This was not limited to throwaway projects. Wiz confirmed the attacks succeeded inside private repositories and GitHub Enterprise environments.[3] In enterprise organizations, the tool cycled through tokens from several users and automation accounts within minutes. It also cloned private repositories before planting the workflow.[3] Then, hours later, cloud credentials from the same organization were used to enumerate AWS Secrets Manager. Wiz does not say where those credentials came from, or who used them.[3]
The cloud logs tell part of the story. CloudTrail showed the organizations' own workflows running on the attacker branches and assuming AWS roles, which proves Actions executed without any approval.[1] That leaves an open question at the center of the worst cases. Hours later, cloud credentials from the same organization were used. Where those credentials came from, and who used them, is unknown. A link to the leaked secrets has not been established.[3]
A Moving Target
Gheist was never one static tool. Two variants ran in parallel. The one Wiz calls Tool A uses a hexadecimal branch suffix and a plain, unchanging payload.[1] Tool B first ran on September 28. Within hours it had added a six-minute timeout and the environment matrix, and it changes its payload for each repository it touches.[1] Around October 19, one version began pushing a second job aimed at self-hosted runners. These are machines that organizations run themselves to process Actions jobs. According to Wiz, the job was apparently pushed only to repositories that had such a runner registered.[1][3]
This second job, called sync-host, was written to comb the runner machine for credentials. It hunted for 31 types of tokens, plus private keys, process environments, cloud instance credentials and the Kubernetes service account token.[3] Wiz describes this job as buggy. It looked for the wrong runner key file, its pattern for finding credentials in web addresses was broken, and it did not collect Google Cloud or Azure tokens. Wiz's analysis reports no successful run of it.[1][3]
The Hold and the Disclosure
Now rewind to a defence put in place before any of this was named. Since July 28, GitHub has held workflow runs it flags as potentially malicious, pausing them until a collaborator with write access approves.[3] But that hold has a sharp edge. GitHub says it currently applies to public repositories on github.com only, and that GitHub Enterprise Server does not have it.[3] For public projects, it held. Every public Gheist run Wiz checked, across all variants, sat waiting for approval. The malicious payloads never ran there.[1]
Private repositories and Enterprise Server had no such brake. That is exactly where the workflows completed, where the runs were deleted, and where the follow-on cloud activity was seen.[1][3] And one thing stays unknown even now. GitHub's changelog does not describe how a run gets flagged for the hold in the first place.[2] According to Infosecurity Magazine, Wiz published its research on October 25. The outlet reported that Wiz had tracked the campaign since September 15 and recovered branches from more than 850 compromised accounts.[4]
Aftermath
As of October 24, the campaign was still running and still changing. By then, about two-thirds of the accounts involved were no longer available on GitHub.[3] Wiz had reported the activity to GitHub, and says the accounts' disappearance likely reflects that response.[3] The same compromised accounts were busy with other schemes. On October 6, 391 accounts, many also used by Gheist, renamed about 1,461 repositories into cracked-software lures to spread malware. The renaming wiped 610 of the planted branches.[3]
And 166 of those lure accounts never appear in Gheist activity at all. So the pool of compromised accounts is larger than Gheist's own footprint.[1] On October 18, 25 of the Gheist accounts each created a Windows RDP Runner repository within nine minutes, trying to abuse Actions for free compute.[1] Some victims also appear infected with PolinRider, malware researchers have linked to North Korea. On October 19 and 20, three of them re-pushed their Gheist commits with a loader slipped into a config file.[3]
Whether one operator is behind all of it is not established. The honest read is shared victims and shared timing, not proven common control.[2] There is history here too. Megalodon, a campaign that pushed secret-stealing workflows into thousands of repositories in May, had hit 57 of the same accounts. Wiz says Gheist is distinct from another campaign, GhostAction, which uses different workflow files.[3] A new GhostAction variant ran in public repositories until GitHub began blocking it on October 9, according to GitGuardian.[3]
Through all of it, as far as researchers could find, GitHub has published no statement specific to Gheist.[2] And the biggest number is the one nobody has. Wiz gives branch and account counts, but its analysis does not say how many organizations actually had secrets exposed.[3]
Containment and Hardening
If you run GitHub Actions, start in the audit logs. Look for workflow runs on ci-sync branches that were deleted within a minute of finishing, and for any activity from the user agent gheist.[3] If your workflows reach the cloud using OIDC, check your cloud audit logs for role assumptions or token exchanges whose subject mentions a ci-sync branch.[1] If one of these branches ran on a self-hosted runner, treat that machine and its cloud instance role as compromised.[3]
And know that cleanup is not containment. Deleting the branch or the run does not undo the exposure. Every secret the repository could read should be rotated, and the token that pushed the branch revoked.[3] Revoke the tokens that pushed the commits and check their owners' devices for infostealers. Do not approve any held sync-check runs, and do not run code from these branches.[3]
What to do
- For hardening that lasts, require human reviewers on any environment that holds production secrets. Scope cloud trust policies to protected branches, and prefer GitHub Apps or short-lived fine-grained tokens over long-lived personal access tokens.
- Treat self-hosted runners as disposable. Run them as short-lived machines, without access to the Docker socket and without open access to cloud metadata.
Open questions
- How many organizations and tokens were affected in total, and how many organizations actually had secrets exposed? Wiz gives only branch and account counts.
- Where did the cloud credentials used to enumerate AWS Secrets Manager come from, and who used them?
- Who runs the cryptomining, lure-repository and PolinRider activity on the same accounts, and is it the Gheist operator? Common control is not established.
- How was each original token stolen? Infostealers and earlier compromises such as Trivy are named as sources, but per-victim details are not public.
- Will GitHub extend its approval hold to private repositories and GitHub Enterprise Server, and on what timeline?
- Has the buggy self-hosted runner job been fixed in later versions? The campaign was still changing as of October 24.
- How does GitHub decide which workflow runs to flag for the approval hold? The changelog does not say.
- Has GitHub made any public statement specific to Gheist?
- How many planted branches were deleted, for example by the October 6 lure renames, and so are missing from the counts?