Skip to content

%

CI/CD security testing: lessons from the wfx-loot GitHub attack

The wfx-loot campaign stole CI secrets from GitHub Actions. Here is what a CI/CD security test should check, explained for founders and business leaders.

Axrok Team7 min read

On November 10, 2026, an attacker began using stolen GitHub credentials to push a credential-stealing payload into GitHub Actions workflows across tens of thousands of repositories. Researchers at Aikido, who track the campaign as wfx-loot, report that 4,837 compromised accounts opened probe pull requests in 61,764 repositories, and that at least 1,835 of them ran the payload and had credentials stolen (Aikido; BleepingComputer).

Most coverage so far focuses on indicators of compromise. This post looks at the question that matters for founders and leadership teams: what does your build pipeline have access to, and has anyone tested it the way an attacker would?

What happened in the wfx-loot campaign

According to Aikido, for each repository a stolen token could write to, the attacker followed three steps:

  1. Probe. It opened a pull request titled "docs: dependency audit notes" from a wfx-docs branch to confirm write access.
  2. Push the payload. It used one of three routes: injecting about 1,500 lines into an existing workflow, adding an npm postinstall hook that runs on any npm install, or adding a new workflow file on a short-lived branch.
  3. Clean up. It reverted the change within at most one minute and deleted the workflow run along with its logs.

Aikido reports that 92% of the probe pull requests were still open when it published its analysis, which suggests most owners had not noticed. It also notes that a missing run number in a workflow's history is often the only trace left behind.

What the payload went after

The script collected GitHub Actions secrets and variables, the workflow GITHUB_TOKEN, OIDC and Actions runtime tokens, cloud credentials for AWS, Azure and Google Cloud, developer credentials for tools such as SSH, Docker, Kubernetes, npm, PyPI, Vault and Terraform, and API keys for AI providers and AI developer tools (Aikido; BleepingComputer).

It then tried to turn that access into more. Aikido describes the payload exchanging GitHub OIDC tokens for AWS, Azure and Google Cloud sessions and creating long-lived AWS access keys. It also describes two persistence steps designed to outlast credential rotation: rewriting an AWS role trust policy, and adding federated identity credentials to Azure applications.

One detail stands out for anyone who relies on branch protection. Aikido reports that the payload posted forged "success" status checks using the context names of a repository's required checks, because branch protection matched on the context name rather than on the app that posted it.

Why this matters beyond the engineering team

A CI/CD pipeline is a privileged identity. It often holds deploy keys, cloud roles and package publishing tokens, and it runs code automatically. If a pipeline can deploy to production, its credentials are, in practice, production credentials.

GitHub's own security guidance puts it plainly: any user with write access to a repository has read access to all secrets configured in that repository. So "who can push to this repo?" is also a question about who can reach your cloud keys.

The OWASP Top 10 CI/CD Security Risks project lists several categories that map closely to this campaign, including Inadequate Identity and Access Management (CICD-SEC-2), Poisoned Pipeline Execution (CICD-SEC-4), Insufficient Credential Hygiene (CICD-SEC-6) and Insufficient Logging and Visibility (CICD-SEC-10).

Many penetration tests focus on the running application. That is valuable, and our guide to penetration testing versus vulnerability scanning explains why. But a test scoped only to the live app may never look at how code reaches production.

What a CI/CD security test should check

Here is a practical checklist, drawn from the campaign details above and from GitHub's published hardening guidance.

1. Who can write, and what that unlocks

Map every human account, outside collaborator, bot and token with write access to each repository. Aikido found that 10,431 of the probe pull requests went into repositories the compromised account did not own, reached through collaborator or organisation access. Stale collaborators and broad organisation permissions widen the reach of a single stolen credential.

2. Workflow triggers and untrusted code

GitHub warns that the pull_request_target and workflow_run triggers, when combined with a checkout of an untrusted pull request, can expose a repository to compromise (GitHub). GitHub also advises that self-hosted runners should almost never be used for public repositories, and that caution is needed on private ones, because untrusted code in a workflow can persistently compromise a self-hosted runner. A tester should review each trigger and runner against that guidance.

3. Secrets and token permissions

GitHub recommends setting the default GITHUB_TOKEN permission to read-only for repository contents and raising it only for the jobs that need more (GitHub). A review should list which secrets each repository and environment can reach, flag long-lived cloud keys, and check whether any job has more access than its task requires.

4. OIDC trust policies in your cloud

OIDC lets workflows request a short-lived cloud token that is valid for a single job, so you no longer store long-lived cloud secrets in GitHub (GitHub). That is a real improvement. But wfx-loot shows that a malicious workflow run can still request those tokens.

The control that matters is the trust condition on the cloud side. GitHub documents how the token's subject claim can be filtered to a specific environment or branch, for example a role that only trusts jobs running in a "Production" environment of one named repository (GitHub). A tester should check whether a workflow on an arbitrary branch, or from a pull request, can assume a role that touches production.

5. Change control on workflow files

GitHub suggests adding the .github/workflows directory to CODEOWNERS so changes to workflow files need approval from a designated reviewer, and pinning third-party actions to a full-length commit SHA or a workflow dependency lockfile (GitHub). Given the forged status checks Aikido describes, it is also worth testing whether your required checks can be satisfied by any token with write access.

6. Install scripts and dependencies

One wfx-loot variant hid in an npm postinstall hook. Package lifecycle scripts run during installation, inside the same job that may hold your secrets. When the hook is added in the repository itself, that is Poisoned Pipeline Execution (CICD-SEC-4). OWASP also advises, under Dependency Chain Abuse (CICD-SEC-3), that install scripts should not have access to pipeline secrets. A review should check where install scripts run and what credentials are present when they do.

7. Logging and detection

The attacker deleted workflow runs and logs within at most one minute. Ask whether your team would see a new workflow file, a deleted run, a new IAM access key or a new federated identity credential. If those events are not monitored, a short-lived intrusion can leave very little to find.

If you think you were affected

Aikido and BleepingComputer suggest looking for a wfx-docs branch, the "docs: dependency audit notes" pull request and gaps in workflow run numbers. Where the payload ran, treat every secret and cloud role available to the affected workflows as compromised and rotate them. Aikido also lists persistence to look for, such as Azure federated identity credentials named wfx-ci-, so rotation should be paired with a review of cloud identity and trust policies.

How Axrok approaches pipeline testing

When we scope a penetration test, the path from repository to production can be part of it: repository permissions, workflow triggers, secrets exposure, OIDC trust policies and the cloud roles a pipeline can reach. If you are preparing for an audit, our guide to SOC 2 penetration testing requirements explains how testing evidence fits in.

Key takeaways

  • The wfx-loot campaign used stolen GitHub accounts to run a secret stealer in at least 1,835 repositories, according to Aikido.
  • Anyone with write access to a GitHub repository can read the secrets configured in it, so write access can also mean access to those secrets, which often include cloud credentials.
  • OIDC removes long-lived cloud secrets, but its value depends on tight trust conditions on the cloud side.
  • Workflow files, install scripts and required status checks deserve the same change control as application code.
  • Detection matters: the attacker deleted runs and logs within at most one minute.

FAQ

What is CI/CD security testing?

It is a review of how code moves from a repository to production, looking at who can change workflows, what secrets and cloud roles the pipeline can reach, and whether an attacker with one stolen credential could abuse that access.

Is OIDC safer than storing cloud keys as GitHub secrets?

GitHub describes OIDC as removing the need to store long-lived cloud credentials, with tokens that expire after a single job. Its protection depends on the cloud trust policy limiting which repositories, branches or environments can request access.

Does a standard web application pentest cover CI/CD?

Not necessarily. It depends on scope. If your pipeline holds production credentials, ask your provider to include it explicitly.

Sources

  1. wfx-loot campaign pushes CI secret stealer to tens of thousands of repositories, Aikido, https://www.aikido.dev/blog/compromised-github-accounts-push-ci-secret-stealer-to-tens-of-thousands-of-repositories
  2. Hackers compromise 4,800 GitHub accounts to steal cloud credentials, BleepingComputer, https://www.bleepingcomputer.com/news/security/hackers-compromise-4-800-github-accounts-to-steal-cloud-credentials/
  3. Secure use reference, GitHub Docs, https://docs.github.com/en/actions/reference/security/secure-use
  4. OpenID Connect, GitHub Docs, https://docs.github.com/en/actions/concepts/security/openid-connect
  5. OpenID Connect reference, GitHub Docs, https://docs.github.com/en/actions/reference/security/oidc
  6. Top 10 CI/CD Security Risks, OWASP, https://owasp.org/www-project-top-10-ci-cd-security-risks/

If you would like a second pair of eyes, we offer a free consultation to talk through whether your build pipeline belongs in your next test's scope, and a free Exposure Snapshot of your external attack surface. You can reach Zayan Abbas at zayan@axrok.com or through our contact page.

  • Penetration testing
  • Security strategy

Want this looked at in your environment?

Tell us what you need protected. A founder reads every enquiry and replies personally.