Lock Your GitHub Actions: The 30-Minute CI Supply-Chain Checklist (2026)
A 30-minute, priority-ordered checklist to harden GitHub Actions: lockfiles, least-privilege tokens, OIDC, and trigger lockdown.
By Bongyeon Kim · Researched from primary sources, verified by hand, and produced with AI assistance on a production stack this site actually operates (Vercel · Neon · Cloudflare R2).
On November 12, 2026 — today — researchers at OX Security published details of wfx-loot, a campaign in which attackers hijacked 4,837 GitHub accounts and used them to push a CI secret-stealing shell script into repositories. The malicious code ran inside GitHub Actions workflows, collected every GitHub token, cloud credential, and publishing secret it could reach, exfiltrated them to attacker servers, and then reverted the commit and deleted the workflow run and its logs. Over 66,000 probe pull requests were opened; secrets were successfully exfiltrated from at least 1,806 repositories.
This is not a one-off. It is the third wave this year of attacks whose final step is "run my code inside your CI runner." Microsoft Threat Intelligence tracked a Mini Shai-Hulud campaign (May 2026) that compromised @antv npm packages specifically to steal GitHub Actions credentials, then a larger worm it called ChainDrop (August 2026) that hit 400+ npm packages and used stolen identities to enumerate workflow secrets, AWS, Kubernetes, and Vault credentials. In June 2026, the Red Hat npm Miasma campaign started inside a CI/CD pipeline — attackers abused a legitimate GitHub Actions OIDC publishing workflow to ship trojanized packages with authentic signatures.
Your CI pipeline is no longer just a place where tests run. It holds GitHub tokens with write access, cloud keys, npm/PyPI publishing tokens, and environment secrets — and every third-party action you uses: gets all of it. The good news: the highest-value hardening takes about 30 minutes. The bad news about skipping it is denominated in dollars.
TL;DR
- This week's wfx-loot campaign (OX Security, Nov 12, 2026) exfiltrated secrets from 1,806+ repos through malicious GitHub Actions runs that cleaned up after themselves. This is the current threat model, not a hypothetical.
- A CI compromise is a money problem: leaked AWS keys get weaponized for crypto-mining within minutes — documented bills include $1,137 in 4 hours (Reddit, Sept 2025) and $2,375 from five minutes of key exposure (The Register, 2015).
- Use the new workflow lockfiles (
gh actions-lock, GA since Oct 28, 2026) — GitHub's docs now say this supersedes SHA-pinning. If you can't, pin to full-length commit SHAs, never tags. - Deny all permissions by default (
permissions: {}at workflow level), raise per-job, and switch cloud deploys to OIDC so there's no long-lived key to steal. - Treat
pull_request_targetas radioactive and audit third-party actions with zizmor — 10 minutes with the linter catches the patterns behind most of these incidents.
The cost side of the equation

Before the checklist, put a number on the risk, because this is where security and your bank account meet.
Leaked cloud credentials are converted into crypto-mining almost instantly. The classic documented case: a developer's AWS keys touched GitHub for roughly five minutes and turned into a $2,375 Bitcoin-mining bill across 140 EC2 instances (The Register, January 2015). That's not ancient history — a SaaS developer on Reddit in September 2025 pushed keys to a private repo and had a $1,137 AWS bill within 4 hours, with EC2 and RDS instances spun up overnight. Palo Alto Unit 42's EleKtra-Leak research (October 2023) found exposed IAM keys being exploited within five minutes of hitting GitHub.
The asymmetry is brutal, and it's the "Tech × Money" heart of this post: Sysdig's PURPLEURCHIN investigation (October 2022) calculated that mining one Monero coin's worth of hash through abused free CI accounts consumed roughly $103,000 of GitHub's compute. Trend Micro's 2022 GitHub Actions cryptojacking analysis found compromised workloads running at 100% CPU can drive on-demand cloud costs up by as much as 600%. Attackers don't need much from you — they need your identity, and CI runners hand it over by default.
Against that: this checklist takes about 30 minutes. Here it is, in priority order.
1. Deny-all permissions by default, escalate per job
The single cheapest fix. Historically, GitHub's GITHUB_TOKEN defaulted to write access across the repo, so one compromised action could rewrite your code and workflows. First, flip the repository/org default (Settings → Actions → General → Workflow permissions) to read-only. Then, inside each workflow, start from zero and grant back only what's needed:
name: Lint
on: [push, pull_request, workflow_dispatch]
permissions: {} # deny everything at workflow level
jobs:
lint:
runs-on: ubuntu-latest
permissions:
contents: read # the only thing this job needs
steps:
- uses: actions/checkout@<commit-sha> # see step 3
An empty permissions: {} block plus per-job grants means a compromised action in job A cannot mint tokens for job B's needs. This is the pattern the hugovk guide uses, and GitHub's own secure-use reference explicitly recommends read-only defaults with per-job escalation. If a job genuinely needs to push (e.g., release automation), give that job contents: write and nothing else.
2. Adopt workflow lockfiles (new in 2026 — the best fix)
GitHub Actions are fetched from Git, and tags are mutable pointers. On October 28, 2026, GitHub announced that workflow lockfiles are generally available: a lockfile records the exact commit for every action your workflows depend on — including transitive dependencies — and GitHub verifies each source repo's identity at run time. GitHub's secure-use docs now say this is "the strongest protection available, and supersedes SHA pinning."
Getting there is minutes, not hours:
$ gh extension install github/gh-actions-lock
$ gh actions-lock
This rewrites uses: lines to owner/action@vX.Y.Z form and generates .github/workflows/actions.lock mapping each action to its resolved commit. Commit both. Both Renovate and Dependabot already understand the lockfile, so your routine update PRs keep it in sync (consider a version cooldown rather than instant-latest — that's a separate lesson from this year's npm worms).
3. No lockfile yet? Pin by full-length commit SHA
If you can't adopt lockfiles, the classic rule still stands: never reference a mutable tag. A tag like @v4 is a pointer the action's maintainer (or anyone who compromises their account) can move to malicious code — exactly how the tj-actions/changed-files incident (March 2025) turned previously safe workflows into secret-dumping scripts. Pin to the full 40-character SHA and comment the version:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
Verify the SHA comes from the original repo, not a fork. GitHub's docs note an attacker would need to produce a SHA-1 collision to substitute code under this scheme — imperfect theory, but effective practice.
4. Treat pull_request_target as radioactive
The pull_request_target (and workflow_run) triggers run with the base branch's privileges and secrets, while PR content can come from anyone who can open a fork. If such a workflow checks out and executes PR code — a common pattern for "greeting bots" and "label PRs" automations — any internet user effectively has write access to your repo. This exact pattern keeps showing up in incident post-mortems, and Veracode's Mini Shai-Hulud analysis (May 2026) called out pull_request_target workflows running untrusted code as a recurring propagation path.
Rules:
- If you don't specifically need the privileged context, use
pull_requestinstead — it runs with read-only tokens and no secrets. - If you must use
pull_request_target, never check out untrusted PR code into the privileged workflow; use a "pwn request"-safe split (untrusted code in an unprivileged job, trusted code in a privileged one) per GitHub Security Lab's guidance. - Never run untrusted PR code on self-hosted runners. GitHub's docs say self-hosted runners should "almost never" be used for public repos, period.
5. Replace long-lived cloud keys with OIDC
If your deploy workflow holds an AWS access key, a GCP service-account JSON, or an Azure client secret, that key is a standing bounty: steal it once and it works from anywhere, forever, until someone notices the bill. OIDC flips this: the workflow exchanges a short-lived, audience-bound token for temporary cloud credentials, scoped to a specific repo and branch. Nothing valuable is left sitting in the secrets store to exfiltrate — which matters given that the Red Hat Miasma and ChainDrop payloads both enumerated cloud and Vault credentials from CI environments.
The workflow-side change is small (the cloud-provider trust configuration is done once outside GitHub):
permissions:
contents: read
id-token: write # required to request the OIDC token
steps:
- name: Configure AWS credentials via OIDC
uses: aws-actions/configure-aws-credentials@<commit-sha>
with:
role-to-assume: ${{ secrets.AWS_DEPLOY_ROLE_ARN }} # role ARN is not a secret credential
aws-region: us-east-1
Keep the long-lived key only if a provider has no OIDC support — and even then, scope it minimally and rotate it on a schedule, per GitHub's secrets guidance.
6. Hygiene details that decide whether a theft succeeds
Small things that repeatedly decide outcomes in real incidents:
persist-credentials: falseon checkout. By default,actions/checkoutleaves theGITHUB_TOKENin the local Git config on the runner, available to every later step — including a malicious one. One line, huge blast-radius reduction.- One secret per value, never structured blobs. GitHub's docs warn that JSON/YAML blobs defeat log redaction; store individual values.
- Register derived values as secrets (
core.setSecret) so transformed credentials still redact in logs. - Block workflow-created PRs in repo/org settings, so a compromised token can't self-approve changes.
- Protect
.github/workflows/with CODEOWNERS so workflow edits always require a human reviewer — this targets the wfx-loot pattern of injecting a workflow via a commit. - Environment secrets with required reviewers for deploys, so production credentials need a click, not just a token.
7. Audit third-party actions — mechanically, not by vibes
Every uses: is arbitrary code execution with your secrets attached. You can't read a 200-line action before every update, but you can automate the review:
# .pre-commit-config.yaml
- repo: https://github.com/zizmorcore/zizmor-pre-commit
rev: v1.32.0
hooks:
- id: zizmor
zizmor is the security linter the hugovk guide calls "strongly recommended" — it flags tag-pinning, excessive permissions, dangerous triggers, template injection, and more; v1.32.0+ understands lockfiles. Add OpenSSF Scorecard in CI for the same class of checks from another angle, and use GitHub's dependency graph / Advisory Database alerts to learn when an action you use gets a security advisory. For new actions, do read the source once, and check the Marketplace "verified creator" badge as a weak-but-real signal.
8. Verify the locks — in CI, forever
Hardening decays. GitHub recommends a dedicated job that fails the build when the lockfile drifts from the workflows or a pinned commit no longer verifies upstream:
lockfile:
runs-on: ubuntu-slim
env:
GH_TOKEN: ${{ github.token }}
steps:
- uses: actions/checkout@<commit-sha>
with:
persist-credentials: false
- run: gh extension install github/gh-actions-lock --pin v0.4.1
- run: gh actions-lock --verify
Run it as its own job so it executes in parallel with your lint, and let Dependabot/Renovate open the update PRs so the lockfile version pins never go stale. That's the difference between a hardening checklist and a hardened repository.
Wrap-up
- The threat model has a face: wfx-loot (Nov 2026), ChainDrop (Aug 2026), and Mini Shai-Hulud (May 2026) all ended at "exfiltrate secrets from CI runners." A hardened Actions setup breaks every one of their propagation steps — permissions, pinning, OIDC, trigger hygiene.
- The money framing is simple: 30 minutes of lockfile + permissions + OIDC work versus a documented $1,137-in-4-hours class of cloud bill and five-minute key-exploitation windows. This is the highest ROI configuration work in your repo.
- This complements the runtime side: I covered what happens when the attack lands on your CDN in "Surviving a CDN Supply-Chain Attack: A Next.js Checklist" — CI is the other half of the same supply-chain boundary, and both deserve the same 30 minutes.
Sources
- Hugo van Kemenade — "Lock your GitHub Actions" (hugovk.dev, Nov 11, 2026)
- GitHub Docs — Secure use reference (Actions security hardening)
- GitHub Changelog — Workflow lockfiles are generally available (Oct 28, 2026)
- OX Security — wfx-loot campaign analysis (Nov 12, 2026)
- Microsoft Threat Intelligence — ChainDrop self-propagating worm (Aug 2026)
- Microsoft Threat Intelligence — Mini Shai-Hulud / @antv CI credential theft (May 2026)
- Sysdig TRT — PURPLEURCHIN cryptomining operation (Oct 2022)
- Palo Alto Unit 42 — EleKtra-Leak exposed IAM key cryptojacking (Oct 2023)
- The Register — $2,375 Bitcoin-mining bill from exposed AWS keys (Jan 2015)
- Reddit r/github — $1,137 AWS bill 4 hours after pushing keys to a private repo (Sept 2025)
Related Posts
- Migrating to Next.js 16 cacheComponents: 5 Things That Actually Broke (Measured in Production)2026. 11. 24
- Apache HTTP Server Critical RCE (CVE-2026-119618): The Patch Checklist (2026)2026. 11. 12
- Brave Search API Accepts x402: Agents Can Now Pay Per Search ??The Machine-Billing Era (2026)2026. 11. 12