back

The Third Mass GitHub Actions compromise this year: An 8-Setting Hardening Checklist

The latest GitHub Actions supply-chain attack shows how stolen developer credentials can turn CI/CD workflows into a path to cloud access. Pinning Actions, restricting token permissions, tightening OIDC trust, and reviewing workflow changes can sharply reduce the blast radius.

The Third Mass GitHub Actions compromise this year: An 8-Setting Hardening Checklist

GitHub Actions has become one of the most attractive places to attack a software organization because a workflow sits between source code and everything the software needs to build, test, publish, and deploy. A single compromised workflow can inherit repository permissions, cloud identity, package-publishing credentials, deployment secrets, and tokens for other services.

The latest campaign, tracked by Aikido as wfx-loot, shows how little an attacker needs once a developer account has already been compromised. Starting November 10, attackers used stolen GitHub credentials to open probe pull requests across tens of thousands of repositories, then injected a secret-stealing payload wherever those accounts had sufficient write access. Aikido counted 4,837 compromised accounts and 61,764 repositories involved in the probing activity. SafeDep separately counted malicious commits in 8,093 public repositories, while Aikido reported evidence that the payload actually ran in at least 1,835 repositories. Those figures measure different stages of the campaign and shouldn't be added together.

The incident follows the May Megalodon campaign, which pushed 5,718 malicious commits into 5,561 repositories in roughly six hours, and the October GhostAction wave, which GitGuardian said targeted more than 30,000 repositories using about 1,900 compromised accounts. The recurring pattern isn't a flaw in GitHub Actions itself. It is the combination of compromised developer identities, workflow files that can execute code automatically, and CI environments that often hold more authority than the build actually requires.

That makes the right response architectural rather than reactive. Organizations should treat .github/workflows as privileged infrastructure, reduce the authority available to every workflow, make workflow changes subject to dedicated review, and make cloud trust policies narrow enough that a stolen CI identity cannot become a cloud administrator.

The attack isn't exploiting GitHub Actions

That distinction is easy to lose in the headlines.

wfx-loot didn't need a vulnerability in the GitHub Actions runner. The attacker used stolen credentials belonging to real GitHub users and automation accounts. Those credentials already had permission to interact with repositories, so the malicious changes arrived through normal GitHub authentication and appeared under identities that maintainers trusted. Endor Labs describes the campaign as an account-takeover and workflow-injection attack rather than an exploit against GitHub Actions itself.

The attack began with probe pull requests using a wfx-docs branch and the title docs: dependency audit notes. Where the compromised account had enough access, the attacker could then modify an existing workflow, add another workflow, or use an npm installation hook. The payload collected credentials from the CI environment and attempted to remove evidence by reverting changes and deleting workflow runs and logs.

That last part matters operationally. A repository can look clean after the attacker has finished.

A deleted workflow doesn't mean the credentials it accessed are safe. A reverted commit doesn't revoke an AWS role. Removing a GitHub secret doesn't invalidate a credential that has already been exchanged for a cloud session. And if the attacker created persistence through cloud identity configuration, rotating the original secret may not remove the second access path.

wfx-loot reportedly attempted exactly that kind of persistence, including AWS role-trust changes and Azure federated credentials prefixed with wfx-ci-.

Why CI runners are such valuable targets

A GitHub Actions runner is often treated as a disposable build machine. From an attacker's perspective, it can be a credential aggregation point.

A single workflow may have access to the GITHUB_TOKENrepository secrets, cloud credentials, package-registry tokens, signing keys, SSH material, Kubernetes configuration, Terraform credentials, or API keys for external services. The actual set depends on the organization, but the architecture creates the same problem: code running inside the workflow can often access everything exposed to that job.

GitHub's own documentation makes the underlying principle explicit. The GITHUB_TOKEN permissions can be restricted at the workflow or job level, and permissions that aren't specified are set to none when the permissions key is used.

That should be treated as the starting configuration, not an advanced hardening measure.

The question isn't whether a workflow might need write access. The question is what the workflow needs to perform its exact job.

A test workflow usually doesn't need permission to push code. A documentation build doesn't need deployment credentials. A pull-request validation job shouldn't automatically inherit production cloud authority. Separating those permissions reduces the amount an attacker can steal when a workflow is compromised.

Eight settings to change now

1. Pin every third-party Action to a full commit SHA

A workflow that says:

uses: some-org/some-action@v3

trusts whatever code that tag resolves to when the workflow executes.

A full commit SHA makes the dependency immutable:

uses: some-org/some-action@a1b2c3d4...

GitHub recommends pinning Actions to full-length commit SHAs when a dependency lockfile isn't being used. GitHub also now documents workflow dependency lockfiles as the strongest available protection because they record exact commits for Actions, including transitive dependencies. citeturn298622search10turn298622search15

This control addresses a different attack path from wfx-loot, but it belongs in the same hardening program. A compromised Action repository should not be able to silently change what your workflow executes merely by moving a tag.

Don't rely on @latest, floating major versions, or mutable tags for security-sensitive automation.

2. Make GITHUB_TOKEN read-only by default

Set organization and repository defaults to the most restrictive token permissions that work for your workflows.

GitHub allows administrators to select restricted workflow permissions, and workflows can further narrow permissions using the permissions key. citeturn298622search5turn298622search9

A useful baseline looks like:

permissions:
  contents: read

Then grant individual jobs only what they need.

For example, a release job might need contents: write, while a unit-test job needs only contents: read. Keeping those permissions separate limits the blast radius if the test job is compromised.

This also makes security review easier because excessive authority becomes visible in the workflow itself.

3. Put .github/workflows/ behind CODEOWNERS

Treat workflow files as production infrastructure.

GitHub explicitly recommends using CODEOWNERS to require designated reviewers for workflow changes. A repository can assign ownership to .github/workflows/ and combine that with branch protection requiring Code Owner approval.

A basic rule could look like:

/.github/workflows/ @platform-security-team

The important part isn't the exact syntax. It's creating a separate approval surface for CI/CD changes.

Application code and pipeline code have different security implications. A change to a React component might affect one service. A change to a deployment workflow can change what code executes with production credentials.

That distinction deserves an explicit control.

4. Restrict which Actions repositories are allowed

Allowing every public Action creates a dependency problem that grows with every workflow.

GitHub provides organization-level policies that can restrict Actions to repositories owned by the organization or to explicitly selected external Actions and reusable workflows. GitHub also supports requiring Actions to be pinned to full-length commit SHAs.

A practical enterprise policy is to maintain an approved set of external Actions and require exceptions to go through security review.

This won't stop a compromised developer account from modifying your own workflow, but it reduces the number of external execution dependencies an attacker can introduce through a workflow change.

It also makes the CI software supply chain measurable. Security teams can answer which Actions are approved, which versions are running, and who owns them.

5. Scope OIDC trust to the exact repository and branch

OIDC is often described as the answer to long-lived cloud credentials in CI. It is better than storing static cloud keys, but OIDC doesn't automatically provide least privilege.

The important control sits on the cloud side.

AWS, Azure, and Google Cloud should trust only the GitHub identities that actually need access. The trust relationship should constrain attributes such as organization, repository, branch, environment, or workflow rather than accepting any workload from the GitHub organization.

That matters because wfx-loot specifically targeted OIDC and cloud credentials. The campaign attempted to turn CI identity into cloud access, and researchers reported AWS role-trust manipulation and Azure federated credentials as persistence mechanisms.

A stolen GitHub token should not become a universal cloud login.

OIDC should therefore be treated as a way to remove static secrets, not as permission to broaden trust.

6. Require approval before untrusted code receives sensitive credentials

The workflow trigger matters as much as the permissions.

GitHub specifically warns about pull_request_target: workflows triggered by it can have elevated repository permissions, and they should not check out, build, or execute untrusted pull-request code while retaining access to secrets or a privileged GITHUB_TOKEN.

Organizations should review workflows that use pull_request_target, especially where a forked pull request can cause attacker-controlled code to execute.

A safer design often separates untrusted testing from privileged operations. The untrusted job can build and test without production secrets. A later, trusted job can handle deployment or publishing after the appropriate checks and approvals have passed.

This separation prevents a malicious contribution from turning a routine pull request into a credential-extraction opportunity.

7. Keep production credentials out of ordinary build jobs

A common mistake is treating every workflow job as though it has the same trust level.

Build, test, package, deploy, and release operations should have different identities where practical. Production credentials should only become available at the stage that genuinely needs them, ideally behind environment protection and explicit approval.

GitHub environments can provide a boundary around deployment credentials and approvals, but the architectural principle is broader: don't expose a secret to a job that doesn't need it.

This becomes particularly important with self-hosted runners. A compromised workflow running on a self-hosted runner can potentially reach local files, network services, credentials, or other workloads that don't exist on a fresh GitHub-hosted runner.

Runner placement should therefore follow the sensitivity of the workload. Production deployment jobs should not casually share infrastructure with arbitrary pull-request builds.

8. Monitor workflow changes and identity behavior, not just malware

Signature-based detection is too late when an attacker is using legitimate credentials.

The wfx-loot campaign demonstrates why organizations need telemetry around the identity and workflow layers. Security teams should alert on unexpected modifications under .github/workflows/, new workflow files, unusual Actions permissions, changes to OIDC trust relationships, newly created cloud credentials, and unexpected package publications.

The attack also leaves useful behavioral clues. Researchers observed probe pull requests using the wfx-docs branch and docs: dependency audit notes title, while the payload used recognizable workflow and commit patterns. Endor Labs also identified missing workflow-run numbers as a useful indicator because attackers deleted runs after execution.

Those indicators will change. The underlying detection logic shouldn't.

A CI identity that normally builds one repository should not suddenly modify dozens of unrelated repositories. A deployment role that normally assumes one role shouldn't suddenly alter trust policies. A package maintainer shouldn't publish from an unexpected runner immediately after modifying a workflow.

Identity behavior often survives payload changes.

Why this keeps happening

Three large campaigns in 2026 illustrate the progression.

Megalodon, in May, demonstrated how quickly malicious workflow injection could spread. Researchers reported 5,718 malicious commits across 5,561 repositories in about six hours. The payload harvested CI/CD secrets, cloud credentials, SSH keys, OIDC tokens, and other sensitive material. citeturn122490search30

GhostAction, in October, used compromised GitHub accounts to push malicious workflows at much larger scale. GitGuardian reported more than 30,000 targeted repositories and about 1,900 compromised accounts during the October wave.

wfx-loot, in November, moved the pattern further. Aikido reported 4,837 compromised accounts and 61,764 repositories involved in probing, with malicious commits and successful executions representing smaller but still substantial subsets. Researchers also found overlap with accounts affected during the GhostAction campaign.

The sequence matters because the attackers aren't repeatedly discovering a new GitHub Actions vulnerability.

They're finding a durable weakness in the development environment: developer identities have authority across many repositories, workflows can execute code automatically, and CI jobs often have access to credentials that reach beyond the repository itself.

Once those three conditions exist, automation does the rest.

The hardening problem starts with identity

The most useful shift in thinking is to stop treating GitHub Actions as merely a build service.

A workflow is executable infrastructure. A developer account with write access to workflows is therefore closer to a privileged infrastructure identity than an ordinary source-code contributor.

That changes how teams should review permissions.

Ask who can modify workflow files. Ask whether bot accounts can bypass branch protection. Ask which repositories a maintainer's token can write to. Ask what cloud roles a workflow can assume. Ask whether those roles are constrained to a specific repository and branch. Ask which secrets are exposed to each job. Ask whether a compromised runner can reach anything outside its intended environment.

Those questions produce a much clearer security model than simply scanning workflow YAML for suspicious commands.

What to do if you think you were hit

Incident response needs to distinguish between probe, injection, execution, and persistence.

A suspicious pull request means the associated GitHub credential should be investigated and revoked. A malicious workflow commit means the repository's history and workflow configuration need review. Evidence that the workflow executed means the secrets and cloud identities exposed to that job should be treated as compromised. Evidence of cloud persistence means credential rotation alone is insufficient.

For wfx-loot specifically, researchers recommend searching for the wfx-docs branch, the docs: dependency audit notes pull-request title, suspicious workflow commits, and gaps in workflow run numbers. Teams should also inspect AWS trust policies and Azure federated credentials for unexpected changes.

Published artifacts need investigation too. Researchers identified compromised versions of the Packagist package digitalelvis/neuronai-studio and the Go module github.com/onuragtas/docker-env.

The response should then move outward from GitHub: cloud IAM, package registries, deployment systems, Kubernetes, secrets managers, signing infrastructure, and any service that trusted credentials available to the affected runner.

Deleting the workflow is cleanup.

It isn't remediation.

What we see at 0xMetaLabs

The recurring GitHub Actions compromises point to a problem that sits between application security and cloud security. Organizations have spent years protecting source repositories while treating CI/CD as automation sitting behind them. That model no longer fits the way modern delivery pipelines work.

A workflow can change infrastructure, publish software, assume cloud identities, sign artifacts, access production systems, and modify other repositories. Its security posture should therefore be reviewed with the same discipline applied to production infrastructure.

The practical target isn't a perfectly locked-down CI platform. It's a pipeline where a stolen developer credential has limited reach, a modified workflow requires the right reviewer, an individual job receives only the permissions it needs, and a compromised runner cannot turn one repository into access to the rest of the company.

wfx-loot reinforces a point that Megalodon and GhostAction had already made: the pipeline is part of the software supply chain, and workflow files are privileged code.

Pin Actions. Restrict GITHUB_TOKEN. Review workflow changes. Narrow OIDC trust. Separate untrusted builds from privileged deployments. Keep production credentials away from ordinary jobs. Monitor identity and workflow behavior.

Those controls don't depend on detecting the next campaign's name.

They reduce what the next campaign can do.

Category

Tags

Follow us