Answers · GitHub Actions

wfx-loot: how to tell if your repo ran it (missing workflow run numbers) and which AI keys to rotate

Check two things in every repo you can write to: a pull request titled docs: dependency audit notes (or a wfx-docs branch) on or after Nov 10, and a gap in any workflow's run numbers since then. The attacker reverts its commit and deletes the workflow run and its logs, so, per OX Security, "the most reliable trace left behind is a missing workflow run number." OX: "A probe pull request alone means the account that opened it is compromised."

If a malicious commit landed in a repo with Actions enabled, OX's advice is to "treat every repository and organization secret, variable and cloud role reachable from that workflow as compromised – even if no workflow run is visible." That includes AI keys: Aikido lists OpenAI, Anthropic/Claude, Gemini, Hugging Face, Cursor and Copilot credentials among what the script collects. Rotate at each provider, prove each old value fails, then hunt for the cloud backdoors that rotation doesn't remove.

Updated Nov 18, 2026: GitGuardian says GitHub held the workflow forms, and the npm hook ran

GitGuardian's Nov 13 analysis adds three things to the checks below.

  • The workflow-file forms were held. In its sample, "Every November payload run still visible was held: seven of seven. Each had conclusion action_required." GitGuardian: "Our observations show no trace of workflow execution when the payload was directly embedded in a workflow file."
  • The npm hook got past the hold. It changes only package.json and a root .ci-xxxxxx.sh script, so the repo's own unchanged workflows run it during npm install, npm ci or pnpm install. Of 30 sampled repos that ran jobs on the hook commit, none was blocked; public job logs from 19 show the script running, 18 of them reporting a successful exfiltration. It also runs on a developer machine that installs from an affected repo before the cleanup commit. In CI logs, look for > sh ./.ci- under a postinstall line; GitGuardian says an install that exits with status 42 means every exfiltration channel failed.
  • It started earlier. A precursor ran Oct 24–29 (80 payload patches, 7 accounts, 12 repositories), so widen the --since dates in the commands below to 2026-10-24.
  • A run-number gap is not proof it ran. GitGuardian: "A gap in run numbers proves a run was created. It does not prove the run executed." Our note: a postinstall hook commit in your history is the stronger sign; a gap at a workflow-file commit alone may be a run that was held and then deleted. GitGuardian's rotation advice is unchanged: if it ran in a workflow, it read every repo and org secret and variable, not only the ones the workflow references.

What happened, per OX Security and Aikido

  • Stolen tokens, not a GitHub bug. Aikido dates the start to about 12:45 UTC on Nov 10. OX counts 4,837 hijacked GitHub accounts. The malicious commits are authored as real users with their noreply email and no signature, "which points to stolen access tokens rather than a GitHub platform vulnerability" (OX).
  • Probe, inject, run, erase. A docs: dependency audit notes pull request from a wfx-docs branch confirms write access. A commit dressed as CI maintenance then adds the stealer to an existing workflow, a new workflow file, an existing shell script, or an npm postinstall hook. The next workflow run or npm install runs it. The commit is reverted with ci: restore or ci: cleanup, and the run and its logs are deleted. Aikido: reverted "within at most one minute."
  • Scale, per OX (Nov 12). Over 66,200 probe pull requests; 8,093 public repositories with a malicious commit on the default branch (7,309 by workflow injection, 771 by npm postinstall hooks, 16 by new workflow files); at least 1,806 repositories exfiltrated secrets. Aikido's count is at least 1,835. OX: "Private repositories and non-default branches aren't visible, so the real number is higher."
  • Exfiltration changed mid-campaign. HTTP POST to two IPs at first. OX: "Starting November 12 at approximately 05:30 UTC, new copies send stolen data through Telegram bots instead of HTTP, which means blocking the known IP addresses alone is no longer enough." Both firms called the campaign ongoing on Nov 12.

How to check your repos

  1. Search for the probe pull request across an org or user account (GitHub CLI). Any hit means the author's token is stolen and could write to that repo:

    gh search prs "docs: dependency audit notes" --match title --owner YOUR_ORG --created ">=2026-11-10" --json repository,number,author,state
  2. In each clone, look for the attacker's commit messages and branches. The revert doesn't erase the original commit from history. Pass: no output from either line:

    git fetch --all --quiet && git log --all --since=2026-11-10 --date=iso --format='%h %ad %an %s' -E --grep='^(ci: refresh build cache|chore: add ci helper|chore: add dependency audit workflow|ci: restore|ci: cleanup)$'
    git ls-remote origin 'refs/heads/wfx-docs' 'refs/heads/chore/*' 'refs/heads/ci-check-*'

    Aikido's branch pattern for throwaway branches is chore/ plus eight random characters, so legitimate chore/ branches will show up too; read the names.

  3. Find missing run numbers. Run numbers count up per workflow, so a deleted run leaves a hole. Our command; it prints every gap since Nov 9:

    gh api --paginate "repos/OWNER/REPO/actions/runs?per_page=100&created=%3E%3D2026-11-09" --jq '.workflow_runs[] | "\(.workflow_id) \(.run_number)"' | sort -k1,1n -k2,2n | awk '$1==w && $2>n+1 {print "workflow " w ": run " n+1 "-" $2-1 " missing"} {w=$1; n=$2}'

    Our note: a gap is a lead, not proof. Busy repos have gaps from runs people deleted on purpose, and listing a repo while new runs start can skip one. Confirm by checking whether the gap lines up with one of the commits above. A workflow file added on a throwaway branch may leave no runs at all, so the commit search matters as much as the gaps.

  4. Check for the npm hook variant. Aikido: chore: add ci helper adds a .ci-xxxxxx.sh script and a postinstall hook in package.json that runs it on any npm install. That runs on developer machines too, not only CI. Pass: no output:

    git log --all --since=2026-11-10 --format='%h %ad %s' --date=iso -G'postinstall' -- '*package.json'
    git log --all --since=2026-11-10 --name-only --format='' | grep -E '(^|/)\.ci-[A-Za-z0-9]{6}\.sh$'
  5. Already blocked the two exfil IPs? Per OX, copies since Nov 12 05:30 UTC post to api.telegram.org instead. If you log egress from self-hosted runners, search those logs for Telegram since then.

What it takes

Aikido describes one shell script of about 1,500 lines, "heavily commented, not obfuscated," used in all three delivery variants. From the runner it collects:

  • GitHub Actions secrets and variables, the workflow GITHUB_TOKEN, and the OIDC and Actions runtime tokens.
  • AI provider and AI tool credentials: "OpenAI, Anthropic/Claude, Gemini, Hugging Face, Cursor, Copilot, Codex, Continue, Codeium, Aider, Weights & Biases and Ollama."
  • The full environment, plus a filtered copy of variables matching token, secret, pass, cred, aws, azure, gcp, openai, anthropic, stripe and dozens of other keywords.
  • Credential files for AWS, Azure, GCP, Docker, Kubernetes, npm, PyPI, Git, SSH, GPG, Vault and Terraform; every .env, .pem, .p12, .jks, .kdbx and kubeconfig under $HOME; shell histories for bash, zsh, mysql, psql, python and node.
  • A snapshot of the repository, files matching secret patterns, the last 100 commits, and recent workflow artifacts. Our note: a key committed once and deleted later is still in those 100 commits.
  • Then it escalates: it exchanges GitHub OIDC tokens for AWS, GCP and Azure sessions, calls iam:CreateAccessKey for long-lived AWS credentials, rewrites a role's trust policy to "Principal": {"AWS": "*"}, and adds Azure federated credentials named wfx-ci-…. It also posts forged success status checks so branch protection passes while it runs.

Rotate, prove the old keys are dead, remove the backdoors

  1. Rotate every secret and variable the affected workflows could read, at the provider that issued it, from a machine that didn't run the payload. Order: anything that spends money or publishes (AI keys, cloud, npm/PyPI tokens, Stripe), then the rest. Revoke the personal access tokens and gh sessions of any account that opened a probe pull request.

  2. Prove each old value fails. Pass: 401 or 403 (Gemini answers 400 for an invalid key). Our commands; put the old value in OLD first:

    curl -s -o /dev/null -w '%{http_code}\n' https://api.openai.com/v1/models -H "Authorization: Bearer $OLD"
    curl -s -o /dev/null -w '%{http_code}\n' https://api.anthropic.com/v1/models -H "x-api-key: $OLD" -H 'anthropic-version: 2023-06-01'
    curl -s -o /dev/null -w '%{http_code}\n' https://generativelanguage.googleapis.com/v1beta/models -H "x-goog-api-key: $OLD"
    curl -s -o /dev/null -w '%{http_code}\n' https://huggingface.co/api/whoami-v2 -H "Authorization: Bearer $OLD"
    curl -s -o /dev/null -w '%{http_code}\n' https://api.github.com/user -H "Authorization: Bearer $OLD"
    curl -s -o /dev/null -w '%{http_code}\n' https://registry.npmjs.org/-/whoami -H "Authorization: Bearer $OLD"

    Cursor and Copilot sign-ins aren't API keys you can curl: sign out of every session in each tool's account settings and re-authenticate. Then read each AI provider's usage page for spend since Nov 10 that isn't yours.

  3. Hunt for persistence. OX: "Rotating secrets doesn't remove backdoors that were already planted." Look for Azure and Entra ID federated credentials named wfx-ci-*, AWS role trust policies that allow any principal, AWS sessions named wfx-*, and IAM access keys created since Nov 10. A quick AWS look for open trust policies:

    aws iam list-roles --query "Roles[?contains(to_string(AssumeRolePolicyDocument), '\"AWS\":\"*\"')].RoleName"

Hardening, so the next stolen token gets less

Related: Cursor's security incident: what to rotate (Cursor keys and agent traces), the Black October breaches hub, and Dosu's post-mortem on PR CI holding production credentials.

  • Least-privilege GITHUB_TOKEN. Set permissions: contents: read at the top of each workflow and widen per job, and set the repo and org default to read-only. Our note: an attacker who edits a workflow can ask for more, so this caps every other run, not the injected one.
  • Careful with pull_request_target. It runs with secrets in the base repo's context. Our note: never check out and run a PR's code under it.
  • Pin third-party actions by full commit SHA, not a tag. Our note: this doesn't stop wfx-loot, which pushes its own steps, but it closes the neighbouring hole where a tag gets moved.
  • Environment secrets with required reviewers for anything that deploys or spends. A pushed workflow can't read a protected environment's secrets until someone approves the run. Prefer OIDC with tightly scoped trust conditions over long-lived cloud keys, and scope trust to a branch or environment, not the whole repo.
  • npm ci --ignore-scripts in CI (or ignore-scripts=true in .npmrc) so a planted postinstall hook doesn't run; allow scripts only for packages that need them.
  • Short-lived, fine-grained tokens. OX: "Until GitHub tokens are short-lived by default and bot accounts stop bypassing branch protection, every stolen token is a potential entry point for the next campaign." Review which bot accounts can bypass branch protection; OX describes one pushing the payload straight to a protected default branch.

Ship Check Kit · $29

Rather not run it by hand?

The Ship Check Kit can't detect wfx-loot, deleted runs or a compromised GitHub account; use the commands above for that. What it covers, run by your coding agent on your app: SC-SEC-01 finds secrets anywhere in git history (the payload copies your last 100 commits), SC-SEC-03 fails while any old value still gets anything but a 401 or 403, SC-SEC-04 flags secrets written to logs and outbound payloads, and SC-AI-02 fails any AI provider without a spend ceiling and alert. Four of 44 launch checks, each with the evidence and the fix.

Checked against OX Security: Thousands of GitHub accounts hijacked with wfx-loot (Nov 12), Aikido: wfx-loot campaign pushes CI secret stealer to tens of thousands of repositories (Nov 12), BleepingComputer: Hackers compromise 4,800 GitHub accounts to steal cloud credentials (Nov 12), GitGuardian: wfx-loot, a CI secret stealer pushed with stolen GitHub credentials (Nov 13) on 2026-11-18. Only test apps and accounts you own or are allowed to test.