GhostAction: What to Revoke After a Compromise
Disclosure: This article is AI-assisted. Deleting a malicious workflow leaves two things unresolved: the access used to add it and any credentials it stole. Later GhostAction payloads also targeted developer machines, s
Disclosure: This article is AI-assisted.
Deleting a malicious workflow leaves two things unresolved: the access used to add it and any credentials it stole. Later GhostAction payloads also targeted developer machines, so recovery can extend beyond the repository.
This checklist is for engineers responsible for GitHub repositories, build systems, and their credentials. It covers GitGuardianβs reports through October 27, 2026.
Separate targeted secrets from confirmed exfiltration
GitGuardianβs October 7 investigation, updated October 13 reported 772 public repositories hit from August 31 through September 30. The injected workflows targeted 2,577 secrets. Run records were available for 605 repositories. Those records showed 26 secrets exfiltrated from 13.
By October 5, cleanup was visible in the public history of 124 of those 772 repositories, about 16%. Those cleanup commits do not show whether the credentials were revoked. The researchers found 92 older malicious workflows still in place, redirected to a new exfiltration endpoint.
The October 8 to 12 wave targeted more than 30,000 repositories and attempted to extract 3,174 secrets from public repositoriesβ CI. GitGuardian reports that GitHub began blocking the malicious workflows on October 9, preventing extraction through the October 10 and 12 waves. Socketβs separate investigation documented successful execution in its October 8 sample, not across the entire target set.
Check beyond GitHub Actions
GitGuardianβs October 27 follow-up describes five payload families aimed at GitHub Actions, developer machines, self-hosted runners, and AWS role credentials. The researchers found no successful Actions runs in that later dataset. GitHubβs workflow blocks did not cover the payload designed for developer machines.
That payload paired a folder-open task in .vscode/tasks.json with a script disguised as public/fonts/fa-solid-400.woff2. It was designed to run when a developer opened the folder in VS Code and trusted the workspace. Some payloads also attempted to install a recurring cron job. If one ran, deleting repository files would leave that persistence behind.
The report also describes wiki scanning, a fallback that uploads stolen data to a private GitHub gist, and attempts to obtain AWS sessions through OpenID Connect (OIDC). These capabilities help define what to investigate. Whether a particular credential was stolen depends on execution and access evidence.
Contain the attack and revoke exposed credentials
Start containment and revocation together. Revoke credentials known to be compromised as soon as you identify them. Do not wait for the full investigation or a host rebuild. Introduce replacements only after the systems that will use them are trusted. The tasks below can overlap as you establish the affected scope.
Stop malicious execution. Disable affected workflows and cancel any queued or active runs. Disabling a workflow does not cancel an existing run.
If a runner or developer machine may have executed a payload, isolate it and follow your host incident-response process before using it for recovery. Preserve relevant logs and file evidence without delaying containment or revocation.
Revoke compromised GitHub access. Use the account security log and the organizationβs audit log to investigate personal access tokens, OAuth grants, GitHub App access, sessions, and SSH keys. Work with the account and organization owners to revoke compromised access as you find it.
For a personal access token, open Settings, Developer settings, Personal access tokens, then delete the affected token. A GitHub App installation may need separate suspension or removal.
Find and remove the malicious content. Inspect every repository the account could write to, affected branches, and Git history. Compare changes with the reportsβ indicators, including github_actions_security.yml, security-check.yml, security-audit.yml, the VS Code task, the script disguised as a font, and the other workflow files listed in the October 27 report. Remove confirmed malicious content. Reverting a commit that only changed the attackerβs destination can restore an older malicious version, so inspect the resulting files.
On machines where execution was possible, investigate the #ghc2 cron marker and other persistence. The October 27 report also found PolinRider loaders in rewritten GhostAction commits. If files such as api.js or fa-solid-300.ttf match those indicators, extend the investigation to that loader and its host persistence. Removing a GhostAction cron entry alone would not address that additional compromise.
Clean or rebuild affected hosts before returning them to service. Continue revoking exposed credentials while that work is underway.
Complete the credential inventory and revoke exposed credentials. Include secrets referenced by malicious workflows and credentials exposed in repository content, history, or the wiki. Check local credentials if a runner or workstation was affected, and private gists named build cache containing c.dat where relevant. Revoke exposed credentials through their providers as you identify them. If execution records are incomplete, treat credentials accessible to the affected workflow or host as potentially exposed and work with their owners to revoke them.
For AWS roles. Investigate unexpected AssumeRoleWithWebIdentity events and restrict OIDC trust to the intended repositories and branches. Changing the roleβs trust policy does not invalidate credentials already issued. Follow AWSβs role-session revocation procedure to deny access to affected sessions. The role-wide procedure also interrupts legitimate sessions issued before the cutoff, so coordinate the impact with the service owner.
Restore access with replacement credentials. Once the systems that will use them are trusted, create replacements with only the permissions they need. Update Actions secrets and dependent services from a trusted machine.
Verify revocation and service recovery. Check the providerβs revocation status and, where supported, use a controlled authentication check to confirm that the old credential no longer works. Confirm that its replacement has the intended permissions, then run the restored workflow.
Record both results: a successful build says nothing about whether an old credential still works. Review provider activity for unauthorized use during and after the exposure window.
GitHubβs leaked-secret remediation guide explains why provider-side revocation matters: deleting a secret from a repository does not stop someone from using a copy.
Recovery questions
What if the credential used to push the malicious files cannot be identified?
Treat the account as compromised. If the logs cannot narrow the entry point, work with the account and organization owners to revoke the access methods that could have been used, including tokens, app authorizations, sessions, and SSH keys. Restore only the access still needed, from a trusted machine, and record any gaps in the evidence.
Does a matching filename prove that a repository is compromised?
No. Some reported filenames are also used by legitimate projects. Compare the file contents, commit history, and execution records with the published indicators before deciding what to remove.
What belongs in the recovery record?
Record the credential identifier, provider, owner, revocation time, and verification result. Link to restricted incident evidence and the restored workflow run. Keep secret values out of tickets, screenshots, and the inventory.
Canonical version: TokenTimer.
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.