ThreatBeaconXSubscribe
HighThreat Intelligence · 18 min read

Gheist Campaign Abuses Stolen GitHub Tokens to Exfiltrate Secrets Across Repositories

Wiz Research has identified an automated campaign named Gheist that abuses compromised GitHub access tokens to introduce malicious GitHub Actions workflows into repositories accessible to the affected accounts. The campaign attempts to extract repository secrets, deployment-environment credentials, and other sensitive information through workflow execution logs, which are retrieved through GitHub's own API. The workflow runs are then deleted shortly after execution, potentially reducing the visibility of the activity during routine investigations. Wiz has tracked the campaign since September 15, 2026, and recovered more than 13,500 planted branches associated with over 850 compromised accounts. The affected accounts ranged from personal projects to private repositories belonging to enterprise organizations. The campaign's defining characteristic is its reliance on legitimate GitHub functionality rather than a dedicated attacker-controlled command-and-control (C2) server. The operators use compromised credentials to create branches, commit workflow files, execute jobs, and retrieve logs through GitHub's infrastructure. A GitHub security control introduced on July 28, 2026, has significantly disrupted the observed activity in public repositories by holding potentially malicious workflow runs until a collaborator approves them. However, Wiz observed successful execution and follow-on activity in private repositories and GitHub Enterprise Server environments. As of October 24, 2026, the campaign remained active and continued to evolve. Wiz also reported that approximately two-thirds of the implicated accounts were no longer available on GitHub, which the researchers considered a possible indication of response activity following their report to GitHub.

Written by Vedanabhatla Sai Swetha·Published Oct 26, 2026

1. Description

Gheist highlights the security risks associated with compromised developer credentials and excessive trust in automated software development workflows. Rather than exploiting a conventional software vulnerability, the campaign uses valid GitHub credentials to perform unauthorized repository operations and execute attacker-introduced workflows.

The operation begins when the attackers obtain a compromised GitHub token. They use the token to identify accessible repositories and create a new branch in each targeted repository. A workflow file is then committed to the branch, causing GitHub Actions to execute the injected workflow in response to the push event.

The workflow attempts to print environment variables and repository secrets into its execution log. To evade ordinary secret masking, the values are encoded using Base32 before being printed. The attackers then retrieve the workflow logs through the GitHub API and delete the workflow runs shortly afterward.

The campaign can also target deployment-environment secrets, which may contain production credentials, by configuring workflow jobs to run against available repository environments. A later variant introduced a separate job designed for self-hosted runners, expanding the potential collection targets to runner hosts, process environments, credential files, cloud metadata, and other sensitive resources.

The campaign demonstrates that protecting the source-code repository alone is insufficient. Security teams must also control who can modify workflows, which credentials jobs can access, which environments require approval, and what resources self-hosted runners can reach.

2. Technical Description

2.1 Initial access and token abuse

Gheist relies on compromised GitHub access tokens. According to Wiz, the credential sources that researchers could trace included infostealer logs and tokens exposed in earlier supply-chain compromises, including the Trivy compromise reported in March 2026.

The compromised credentials allow the operators to perform repository operations under the identity of the token's owner. The malicious commits are unsigned and appear under the associated account's authorship, making it important to distinguish the account recorded in the commit from the individual or process that actually performed the action.

Within enterprise organizations, Wiz observed the tooling cycling through tokens associated with several users and automation accounts within minutes. The researchers also observed private repositories being cloned before the malicious workflow was planted.

2.2 Malicious branch and workflow creation

For each targeted repository, the tool creates a branch using the ci-sync- prefix followed by six random characters. It then adds a workflow file at:

.github/workflows/sync-check.yml

The commit message is:

ci: sync config

The push event triggers the workflow, which attempts to collect and encode information available to the job.

2.3 Secret collection through workflow logs

The workflow attempts to print environment variables and the repository's secrets context. Base32 encoding is used to transform the values before they enter the log.

GitHub's secret masking is intended to redact matching secret values when they appear verbatim. An encoded representation does not match the original stored value in the same way, potentially allowing the encoded content to appear in the log without the expected redaction.

After the workflow executes, the tool retrieves the log through the GitHub API and deletes the run seconds later.

This approach allows the attackers to use GitHub itself as the execution and data-retrieval mechanism. There is no separate attacker domain or outbound connection that defenders can simply block to stop the reported secret-exfiltration path.

2.4 Deployment-environment secrets

The more developed workflow variant enumerates repository deployment environments and uses a job matrix to execute against them.

The workflow configuration can reference an environment through an expression such as:

environment: ${{ matrix.environment }}

Where the job is permitted to access an environment and its protection requirements do not block execution, environment-scoped secrets may become available to the workflow. These secrets can include production deployment credentials and other sensitive authentication material.

2.5 Self-hosted runner targeting

On October 19, 2026, Wiz observed the introduction of a second job named sync-host. It used runs-on: self-hosted and appeared to be pushed only to repositories with a registered self-hosted runner.

The job created three helper files:

  • .gdmp_pat

  • .gdmp_patg

  • .gdmp_sweep

It also recorded progress in logs using headers beginning with:

===== gdmp-pivot:

The job attempted to collect host information, search sensitive paths, inspect process environments, access Docker through the socket, and retrieve runner and cloud-related credentials.

Wiz identified bugs in this version, including incorrect runner-key file selection, a broken URL-credential regular expression, and unsuccessful collection of GCP and Azure tokens. These were implementation defects in the observed variant, not reliable protections against later versions of the tooling.

3. Attack Overview

3.1 Campaign timeline

DateObserved activity
September 15, 2026Wiz began tracking the Gheist campaign.
September 28, 2026Tool B appeared with additional workflow capabilities, including a six-minute timeout, environment-matrix handling, and repository-specific payload changes.
October 6, 2026A related activity cluster renamed approximately 1,461 repositories across 391 accounts to cracked-software lures. The renames incidentally removed 610 ci-sync branches.
October 18, 2026Twenty-five Gheist-associated accounts created repositories named Windows RDP Runner within nine minutes, attempting to abuse GitHub Actions for free compute.
October 19, 2026Tool B added a Base32 separator and later introduced the sync-host job targeting self-hosted runners.
October 19–20, 2026Three victims re-pushed Gheist commits with a loader appended to vite.config.js; two cases also included an api.js file executed by package.json before development and build operations.
October 24, 2026The campaign remained active and evolving. Approximately two-thirds of implicated accounts were no longer available on GitHub, according to Wiz.
October 25, 2026Wiz published its research report.

The timeline describes activity reported by Wiz. It does not establish that every event was conducted by one operator or that every account was compromised through the same initial-access method.

3.2 Attack sequence

  1. The attackers obtain or use a compromised GitHub access token.

  2. The tool identifies repositories accessible to that token.

  3. It creates a ci-sync-* branch in a targeted repository.

  4. It commits .github/workflows/sync-check.yml using the message ci: sync config.

  5. The push triggers the injected GitHub Actions workflow.

  6. The workflow attempts to print environment variables and secrets in Base32-encoded form.

  7. More advanced variants attempt to access deployment-environment secrets.

  8. The tool retrieves workflow logs through the GitHub API.

  9. The workflow run is deleted shortly afterward.

  10. In selected private or enterprise environments, subsequent activity may involve cloud credentials and additional collection from self-hosted runners.

3.3 Attack characteristics

  • Authentication abuse: Uses compromised tokens rather than requiring a new exploit against GitHub.

  • Workflow injection: Introduces an unauthorized Actions workflow into accessible repositories.

  • Secret exposure: Attempts to disclose repository and environment secrets through workflow logs.

  • Log cleanup: Deletes workflow runs after collecting their logs.

  • Legitimate infrastructure abuse: Uses GitHub APIs and Actions rather than a dedicated C2 server.

  • Enterprise reach: Can affect multiple repositories and accounts within an organization.

  • Evolving payloads: Includes a later self-hosted runner job and repository-specific workflow variations.

4. Technical Analysis

4.1 Tool A and Tool B

Wiz observed two variants operating in parallel. The branch naming convention helps distinguish them.

Tool A

  • Uses a hexadecimal suffix in its branch names.

  • Uses the plain secret-dumping payload.

  • Represents the simpler observed workflow variant.

Tool B

  • Uses a base36 suffix in its branch names.

  • Added timeout-minutes: 6 and environment-matrix handling within hours of its first observed run on September 28.

  • Modifies the selected payload per repository.

  • Added a Base32-encoded separator on October 19.

  • Later introduced a sync-host job for repositories with self-hosted runners.

The general branch indicator published by Wiz is ^ci-sync-[0-9a-z]{6}$. This captures the reported six-character lowercase alphanumeric suffix pattern. The regex is useful for hunting but should be combined with workflow-file, commit-message, and audit-log evidence.

4.2 Why permissions: {} does not stop the attack

The observed workflow uses:

permissions: {}

This restricts permissions granted to the job's automatically provided GITHUB_TOKEN. However, the attacker does not need that token for the primary secret-dumping behavior.

The configuration does not itself remove access to the workflow's secrets context. As a result, restricting the job's GITHUB_TOKEN permissions alone does not prevent a workflow from attempting to expose secrets made available to that job.

Defenders should therefore assess both token permissions and the secrets that workflows can access.

4.3 Base32 encoding and secret masking

The workflow uses commands equivalent to:

env | base32 -w 120

and:

echo -n '${{ toJSON(secrets) }}' | base32 -w 120

The commands encode environment information and the serialized secrets context before printing the output.

GitHub's masking mechanism can recognize matching secret values in logs, but an encoded value differs from the original string. This creates a path for encoded secret material to appear in logs without matching the original secret value.

The attackers then download the logs through GitHub's API. The technique emphasizes why secret masking should not be treated as a substitute for limiting secret availability or preventing unauthorized workflow changes.

4.4 The Base32 separator

On October 19, Tool B inserted:

echo X | base32 -w 120

Wiz reported that this produced the marker LAFA====. The researchers considered it likely that the separator was intended to help the operator's log parser distinguish sections of the output.

This marker provides a useful additional hunting clue for the later payload variant.

4.5 Self-hosted runner collection

The later sync-host job attempted broader collection than the initial repository-secret workflow.

Collection areaReported behavior
Host informationCollected host details and crontab information.
FilesystemSearched home directories, workspaces, and system paths.
Credential formatsSearched for 31 token formats, including credentials associated with Anthropic, Hugging Face, Groq, and NVIDIA.
Sensitive filesSearched for private keys, .env files, Terraform state, and shell history.
Process informationAttempted to read environment variables from /proc/*/environ.
Docker accessUsed the Docker socket to attempt access to the host filesystem through a container.
Cloud credentialsAttempted to access AWS instance-role credentials and cloud metadata associated with GCP and Azure.
CI/CD credentialsSearched for GitHub Actions and GitLab runner credential files.
KubernetesAttempted to access the Kubernetes service-account token.

The report also describes defects in the observed job. It looked for the wrong runner-key file, used a broken URL-credential regular expression, and did not successfully collect GCP or Azure tokens. These observations describe that version of the job; they should not be interpreted as evidence that all such collection attempts will fail.

4.6 GitHub's workflow-approval hold

On July 28, 2026, GitHub introduced a control that holds potentially malicious workflow runs in public repositories until a collaborator approves them.

Wiz reported that every public Gheist run examined—including runs involving the self-hosted job—remained in the action_required state. The researchers found that the malicious payloads did not execute in those examined public cases.

However, the approval hold did not apply in the same way to private repositories or GitHub Enterprise Server. In those environments, GitHub audit logs showed runs on ci-sync-* branches completing before being deleted by activity associated with the gheist user agent.

CloudTrail records also showed organizational workflows executing on these branches and assuming AWS roles. This provided evidence of Actions execution without the public-repository approval hold.

Detection implication: Where workflows authenticate to cloud services using OpenID Connect (OIDC), cloud audit logs can provide evidence of a malicious branch being used for workflow execution—even when GitHub logs are unavailable to the defender.

4.7 Related activity on compromised accounts

Wiz observed several other activities associated with accounts that overlapped with the Gheist campaign. These observations are relevant to credential compromise and incident scope, but account overlap alone does not prove common ownership or coordination.

Repository-based malware lures

On October 6, 391 accounts renamed approximately 1,461 repositories to cracked-software lures, including names such as fl-studio-crack and solana-sniper-lite. The renaming activity incidentally removed 610 ci-sync branches. Wiz also found that 166 accounts involved in this repository-renaming activity did not appear in the Gheist activity, suggesting a broader affected account pool.

Free-compute abuse

On October 18, 25 Gheist-associated accounts each created a repository named Windows RDP Runner within a nine-minute period. The activity attempted to abuse GitHub Actions to obtain free compute cycles.

PolinRider

Some victims appeared to be infected with PolinRider, described by Wiz as DPRK-linked malware that hides JavaScript in build configuration files and force-pushes backdated commits.

On October 19 and 20, three victims re-pushed their Gheist commits with a loader appended to vite.config.js behind hundreds of whitespace characters. Two cases also included an api.js file that package.json ran before development and build operations.

Megalodon

Wiz reported that 57 accounts from Gheist's first phase had also been victims of Megalodon in May.

Credential sources

The sources Wiz could trace were consistent with stolen credentials originating from infostealer logs and tokens exposed during previous supply-chain compromises, including the Trivy compromise in March 2026.

Important distinction: Wiz explicitly states that Gheist is different from GhostAction. The report associates GhostAction with different workflow files and the exfiltration address 193.32.204[.]199. That address belongs to the GhostAction distinction in the source and should not be presented as a confirmed Gheist C2 indicator.

5. Indicators of Compromise (IOCs)

The following indicators are explicitly listed or described in the supplied Wiz Research report.

5.1 Behavioral indicators

IndicatorValue or patternRelevance
API user agentgheistUser-agent value associated with the campaign's API requests.
Branch nameci-sync- followed by six charactersReported branch naming convention.
Branch regex^ci-sync-[0-9a-z]{6}$Published pattern for hunting suspicious branches.
Commit messageci: sync configMessage associated with the injected workflow commit.
Workflow file.github/workflows/sync-check.ymlFile introduced by the primary payload.
Workflow namesync-checkName of the primary workflow.
Base32 separatorLAFA====Marker produced by the separator added to Tool B.
Self-hosted log marker===== gdmp-pivot:Prefix used to mark stages of the self-hosted job.

5.2 File indicators

FileContext
.gdmp_patHelper file written by the self-hosted job.
.gdmp_patgHelper file written by the self-hosted job.
.gdmp_sweepHelper file written by the self-hosted job.

5.3 Payload marker

The report identifies the following secret-dumping marker:

toJSON(secrets) }}' | base32 -w 120

Search for the marker in relevant workflow files, commits, logs, and available forensic records. Because payloads can be modified per repository, the absence of this exact string does not rule out campaign activity.

5.4 Workflow blob SHA-1 values

Payload variantWorkflow blob SHA-1
Plain payloadf3da2b8b357dcda02fd455d314be2a95007516a6
Timeout variantd09535857a741bbb976bdc084a9a021713133291
Separator variant1dc5af9cce950aad1eb1546ecce8565b117540c4
Self-hosted job variantc665b778b2d822453293003e7ca0bbb2cb08e39d

Wiz cautioned that environment-matrix variants differ between repositories. These hashes are useful for matching known variants, but hash-only detection will not reliably identify every modified payload.

5.5 IOC limitations

The supplied report does not provide a confirmed Gheist-specific IP-address or domain IOC. The campaign's principal collection path uses GitHub's own API, making behavioral detection and audit-log correlation particularly important.

The IP address 193.32.204[.]199 is mentioned in the source only to distinguish GhostAction from Gheist. It must not be treated as a confirmed Gheist infrastructure indicator.

6. Potential Impact

6.1 Exposure of repository secrets

An executed malicious workflow may expose secrets available to its job. Depending on repository configuration, these may include API keys, deployment credentials, service tokens, and other sensitive values.

6.2 Production-environment compromise

If a workflow can access deployment-environment secrets, the campaign may expose credentials associated with production deployments or other sensitive environments. The actual exposure depends on the environment's protection rules and which secrets were available at execution time.

6.3 Cloud account access

Stolen credentials or cloud role assumptions can provide a path from repository-level compromise into cloud infrastructure. Wiz reported cloud credentials from the same organization being used to enumerate AWS Secrets Manager.

6.4 Self-hosted runner and host exposure

The sync-host job attempted to search the runner's filesystem, inspect process environments, access Docker, and retrieve cloud and CI/CD credentials. If such a job executes on a self-hosted runner, the incident may extend beyond the repository to the runner host and identities available to it.

6.5 Software supply-chain risk

Unauthorized workflow modifications and related malicious files can create risks for software development and build pipelines. The reported overlap with repository-based malware lures and PolinRider-related activity makes it important to inspect build configuration files and repository history when investigating affected accounts.

6.6 Reduced incident visibility

Deleting workflow runs shortly after execution can make the activity harder to identify through routine review. The scale of the campaign also means a single compromised token may expose multiple repositories, depending on the permissions and access associated with that token.

6.7 Wider credential abuse

The overlap with other activity clusters indicates that compromised developer credentials can be reused by different campaigns. Organizations should therefore assess the broader compromise of the affected account, not just remove the visible malicious branch.

7. Recommendations

7.1 Immediate Actions

1. Hunt for suspicious branches

Search repositories for branches matching the ci-sync- prefix and six-character suffix. Prioritize branches whose only change is the addition of .github/workflows/sync-check.yml with the commit message ci: sync config.

2. Review GitHub audit logs

Look for workflow runs on ci-sync-* branches that completed and were deleted within approximately one minute. Search for activity associated with the gheist user agent and correlate it with branch creation, commits, and workflow execution.

3. Examine cloud audit logs

If GitHub Actions uses OIDC to authenticate to cloud services, inspect cloud audit records for role assumptions or token exchanges whose subject includes a ci-sync- branch. This may provide evidence of malicious workflow execution even when GitHub logs are unavailable.

4. Inspect self-hosted runners

Search runner hosts and available job logs for .gdmp_pat, .gdmp_patg, .gdmp_sweep, and gdmp-pivot. If a suspicious ci-sync branch ran on a self-hosted runner, treat the host and its instance role as compromised until the investigation establishes the scope.

5. Revoke compromised tokens

Revoke the tokens that pushed the suspicious commits. Review the associated users' and automation accounts' activity, permissions, and credential exposure history.

6. Rotate potentially exposed secrets

Rotate every repository, organization, and deployment-environment secret that was accessible to an affected repository or workflow. Removing the branch or deleting the run does not reverse prior exposure.

7. Review account and endpoint compromise

Inspect the devices belonging to affected token owners for evidence of infostealers or other credential theft. Review whether the same credentials were exposed through earlier supply-chain incidents.

8. Avoid approving suspicious workflows

Do not approve held sync-check runs or execute code from suspicious ci-sync-* branches. Preserve relevant audit records and forensic evidence before removing malicious changes, following the organization's incident-response procedures.

9. Investigate related repository activity

Review affected repositories for unexpected renames, cracked-software lures, suspicious changes to vite.config.js, unexpected api.js files, and unusual build-script behavior. Treat these as investigation leads based on the reported overlaps, not proof that every affected repository contains additional malware.

7.2 Preventive Actions

1. Reduce token privileges

Use GitHub Apps or short-lived, fine-grained tokens instead of broadly scoped personal access tokens where possible. Limit access to the repositories and operations required for the credential's purpose.

2. Protect production environments

Require reviewers and approval gates for deployment environments containing production secrets. Review who can change environment rules and which workflows are permitted to use sensitive environments.

3. Restrict cloud OIDC trust

Scope cloud trust policies to protected branches and approved environments. Avoid trust configurations that allow arbitrary repository branches to assume sensitive cloud roles.

4. Harden self-hosted runners

Use ephemeral runner hosts where practical. Avoid exposing the Docker socket or unrestricted cloud metadata access to jobs that do not require them. Separate untrusted jobs from runners with privileged credentials or access to sensitive networks.

5. Monitor workflow-file changes

Alert on unexpected additions or modifications to GitHub Actions workflow files, especially when a new branch is followed immediately by a workflow run.

6. Detect rapid run deletion

Monitor for workflows that complete and are deleted within a short interval. Correlate run deletion with branch creation, suspicious commit messages, user-agent information, and cloud role assumptions.

7. Minimize secrets available to jobs

Only provide workflows with the secrets required for their task. Separate development and production credentials and avoid exposing organization-wide credentials to ordinary repository workflows.

8. Preserve audit visibility

Retain GitHub and cloud audit logs in a location that is not dependent solely on the affected repository's history. Centralized logging can help investigators reconstruct activity when workflow runs or branches have been deleted.

9. Validate the full incident scope

Correlate GitHub audit events, workflow execution records, cloud authentication events, runner artifacts, and endpoint evidence. A malicious branch may be only one part of a broader compromise involving stolen tokens and additional campaigns.

8. Detection and Threat-Hunting Guidance

The campaign can be detected by correlating several weak signals instead of relying on a single indicator.

Detection signalWhat to investigate
Branch matches ^ci-sync-[0-9a-z]{6}$Check the branch's author, creation time, commit history, and workflow changes.
Commit message is ci: sync configVerify whether the change was authorized and whether it adds sync-check.yml.
Workflow run completes and is quickly deletedCorrelate execution time with branch creation and subsequent API activity.
User agent gheistIdentify related GitHub API requests and the credentials or accounts involved.
LAFA==== or gdmp-pivot appears in logsDetermine whether the later Tool B or self-hosted variant executed.
Cloud role assumption references a ci-sync- branchInvestigate whether an unauthorized Actions workflow obtained cloud identity.
.gdmp_pat, .gdmp_patg, or .gdmp_sweep is presentPreserve the artifacts and assess whether the self-hosted runner was accessed.

Wiz detection coverage

According to the supplied article, Wiz Defend includes detection rules named:

  • New Workflow Completed And Deleted In Short Time Span

  • Workflow Pushed With Secret Dump

  • Commit Created With Known Malicious Commit Message

Wiz also describes a Threat Center advisory containing an Event Explorer query covering planted commits, Gheist activity in GitHub audit logs, and cloud role assumptions from attacker branches.

These product-specific detections are useful reference points for defenders using Wiz. Organizations using other tools can implement equivalent correlation logic across their GitHub, CI/CD, cloud, and endpoint telemetry.

9. Conclusion

Gheist demonstrates how stolen developer credentials can be used to abuse trusted CI/CD automation at scale. By introducing malicious GitHub Actions workflows, encoding secrets to evade straightforward log masking, retrieving workflow logs through GitHub's own API, and deleting runs shortly afterward, the campaign attempts to turn repository access into a mechanism for credential theft.

The observed public-repository activity was significantly disrupted by GitHub's workflow-approval hold. However, the private-repository and GitHub Enterprise cases reported by Wiz show that this control does not remove the need for strong credential management, protected deployment environments, hardened self-hosted runners, and independent audit-log monitoring.

The most effective response combines immediate token revocation and secret rotation with a broader investigation into affected repositories, runner hosts, cloud identities, and the possibility of additional malware or credential theft on the same accounts.

Security teams should treat an executed malicious workflow as a potential secret-exposure incident, determine which credentials were available to the job, and investigate whether those credentials were subsequently used to access other systems.

MITRE ATT&CK Mapping

T1078 — Valid AccountsT1059.004 — Unix ShellT1552.001 — Credentials In FilesT1552.007 — Container APIT1567 — Exfiltration Over Web Service