ghtier

GitHub Actions

How a workflow run works, what an attacker gets when one goes wrong, and how to lock it down, with most of the attention on version pinning. The Best Practices page has the baseline hardening examples (least-privilege permissions, safe pull_request_target, script injection, OIDC). This page goes further on why those matter and where they fall short.

How a run works

Every workflow run is the same chain. Something fires an event, GitHub picks a workflow file from some ref, hands a runner a token and the secrets the job asks for, and then executes every step in order. Nothing separates your own build script from a third-party action in step three: they share the filesystem, the environment, the network, and the process memory where secrets live.

  1. 1

    Event

    A push, PR, comment, schedule, or API call. Decides who is effectively running your CI.

  2. 2

    Workflow file

    Read from a ref the event decides. For a fork PR that can be the attacker's copy.

  3. 3

    Runner

    A fresh VM (hosted) or your own machine (self-hosted), given a token and the job's secrets.

  4. 4

    Steps

    Your scripts and every third-party action, all in the same process space with the same access.

  5. 5

    Side effects

    Pushes, releases, packages, cache entries, artifacts, cloud deploys. The real blast radius.

Security questions map onto that chain. Who can fire the event? Which copy of the workflow runs? What does the token let the job do? Which code, from whom, runs in the steps? And what can the job change afterwards? Almost every Actions incident on this site is one of those questions answered badly.

Triggers and who controls them

The trigger is the trust decision. It decides whether an outsider can start the run, whether their copy of the workflow is used, and whether the run gets secrets. The dangerous combination is always the same: a trigger that runs with secrets, plus a step that runs or reads something an outsider controls.

TriggerWho can fire itWorkflow file fromFork run getsWatch forAttack technique
pull_requestAnyone who can open a PR, including from a forkThe PR's merge commit, so the PR author controls the workflow fileRead-only GITHUB_TOKEN, no secretsSafe by design for forks. The risk is a same-repo branch PR, which gets secrets, or a later privileged workflow that trusts this run's output.
pull_request_targetAnyone who can open a PR, including from a forkThe default branch (since Dec 2025)Secrets and the repo's default token permissionsOnly dangerous once the job checks out or runs PR code. That is the classic pwn request. It also shares the default branch's cache scope.
workflow_runWhoever triggered the upstream workflow, which can be a fork PRThe default branchSecrets and write token, even when the upstream run came from a forkArtifacts, branch names, and PR titles from the upstream run are attacker-controlled. Treat anything downloaded from it as untrusted input.
issue_comment / issues / discussionAnyone who can comment, on public repos that is everyoneThe default branchSecrets and write tokenTitles, bodies, and comments go straight into expressions. ChatOps bots that check out a PR on a '/test' comment are pwn requests by another name.
pushAnyone with write access to the branchThe pushed commitNot applicable, forks can't pushA write-access user can add a new workflow on any unprotected branch and read every secret it references. Write access is effectively secrets access unless deploy secrets live in protected environments.
workflow_dispatch / repository_dispatchWrite access, or any token with actions: write / contents: writeThe ref the caller choosesNot applicableA stolen token with write access can start a release workflow on a branch it just pushed. Inputs are attacker-controlled strings.
scheduleNobody directly, it runs on a timerThe default branchNot applicableLow exposure, but these jobs often hold broad tokens for maintenance and quietly keep running long after anyone looks at them.

Two things that catch people out. First, a pull request from a branch in the same repository is not a fork PR, so it gets secrets. Anyone with write access can open one with a modified workflow. Second, the privileged triggers (pull_request_target, workflow_run, issue_comment) are fine on their own. They become a pwn request when a step checks out the PR, restores a cache the PR could have written, or puts a title or comment into a shell.

What an attacker gets inside a job

Once untrusted code runs in a step, whether through a compromised action, a malicious dependency, or script injection, it has everything the job has. Assume all of this is gone:

The GITHUB_TOKEN

With whatever permissions the job was given. On actions/checkout before v6 it was also written to .git/config, where any later step or uploaded artifact could pick it up (the ArtiPACKED finding).

Every secret the job references

The runner process holds them in memory in plain text. Log masking doesn't help: the tj-actions payload read them straight out of the Runner.Worker process memory.

An OIDC token, if id-token: write is set

Which can be traded for cloud credentials for as long as the job runs, from anywhere.

Credentials set up by earlier steps

Cloud CLI sessions, registry logins, npm/pypi tokens in config files. The environment is richer than the YAML suggests.

The Actions cache

A job can write entries that later, more privileged runs on the same branch scope restore. That is how Ultralytics was poisoned.

Outbound network

Hosted runners have unrestricted egress by default, so exfiltration is one curl away.

The runner host itself (self-hosted only)

A non-ephemeral runner keeps whatever the attacker leaves behind, for every future job that lands on it, and sits inside your network.

The takeaway is that the blast radius of a job is decided before it starts: by its token permissions, the secrets it references, its OIDC trust, and the runner it lands on. Reducing any of those helps even when every other control fails.

Getting secrets out, end to end

No token can read an Actions secret through the API: it returns names, and the write permissions only overwrite values. The only way to a value is to run code in a job that receives it, and send it somewhere. So the question for every secret is who can make such a job run code they chose, and what GitHub checks before it hands the secret over.

Where a secret lives decides which jobs get it

SecretGiven toWhat guards itFix
Repository secretsEvery workflow run in the repository, except pull_request runs from forks and runs Dependabot starts, which get Dependabot secrets instead.Nothing beyond who can make a run execute code they wrote. GitHub's own docs say anyone with write access can read them.
Environment secretsOnly jobs that name the environment, and only once its deployment branch policy and required reviewers let the job through.Required reviewers hold even against a push a workflow already acts on. A branch policy holds only while nobody can push a branch or tag it allows, and Protected branches only allows every branch in a repository without branch protection. An admin can change both, and bypasses them unless the environment turns bypass off.
Organization secretsRuns in every repository the secret's access policy lists: all repositories, private ones, or a selected few.The weakest repository on the list decides. Anyone who can change the list can add a repository they control.

With T2Contents: Write and nothing else

The common case: a stolen personal token or App token that can push but has no Workflows, Actions or Administration permission.

Can itAnswerWhy
Read a secret through the APINoNo token can. The API lists names, and Secrets: write and Environments: write overwrite values without reading them.T1Secrets: WriteT1Environments: Write
Change a workflow fileNoA token also needs Workflows: write to change anything under .github/workflows. A person with the Write role pushing with their own login has no such limit.T1Workflows: WriteT1Write
Change what a workflow runsYesBuild scripts, tests, package manifests and local actions outside .github/workflows are ordinary files. Pushed to a new branch, an existing push workflow runs them with its secrets.The escalation ↗
Start a runYesA push starts the push workflows, and repository_dispatch starts the default branch's workflows on that event. workflow_dispatch needs Actions: write. A push made with a GITHUB_TOKEN starts nothing; repository_dispatch still does.T1Actions: WriteThe escalation ↗
Change an environment's reviewers or branch policyNoEnvironments, their protection rules and branch policies belong to Administration: write.T1Administration: WriteThe escalation ↗
Get environment secretsOnly ifOnly if a push workflow already has a job that names the environment, the environment has no required reviewers, and its branch policy lets your branch through: no policy, a name pattern you can create, or Protected branches only in a repository with no branch protection.
Get organization secretsYesThe ones shared with this repository that the workflow uses arrive the same way as repository secrets.

Every way to a secret

Each row starts from some access and ends with a job that runs the attacker's code with secrets in it. The last column is what an environment with a branch policy and required reviewers does to that route.

Starting fromHowReachesEnvironment protection

Commit a workflow, or change an existing one, that runs on push and sends the repository's secrets out. The workflow also sets its own token permissions, including id-token: write.

The new job can name any environment, but still has to pass its branch policy and reviewers.

Push a new branch that changes a file an existing push workflow runs: a build script, a test, a package manifest, or a local action outside .github/workflows. The workflow file stays as it is, so no Workflows permission is needed. A push made with a GITHUB_TOKEN starts no run, so this takes a personal token, an App token or a person's own push.

Only environments a push workflow already names, and only through the same branch policy and reviewers.

Send a repository_dispatch event with a client_payload you write. It runs the default branch's workflows on that event with their secrets, and unlike a push it starts a run even when sent with a GITHUB_TOKEN. The payload is only a way in when the workflow puts it into a shell or checks out the ref it names.

Runs on the default branch, which most branch policies allow, so only required reviewers stop it.

Run the publish workflow with workflow_dispatch against a branch whose build script was changed.

The branch it dispatches on has to pass the branch policy, and reviewers still stop it.

Create a deployment for a branch or commit you chose. A workflow on the deployment event runs at that commit, and its job gets the environment's secrets unless a deployment branch policy or required reviewers stop it.

A branch policy stops it unless the commit's branch passes. Approving the job yourself works only as a required reviewer, and only when self-review is allowed.

Remove the environment's required reviewers, widen its deployment branch policy, or force a run through with the administrator bypass, which is on unless the environment turns it off. It still takes a way to run a job that names the environment, such as Workflows: write or a push a workflow already acts on.

This is the way around them.

Add a repository whose workflows you can change to an organization secret shared with selected repositories. The value is never needed: the next workflow run in that repository receives it and can send it out.

Not involved: organization secrets do not live in an environment.

Push to the repository that holds a reusable workflow other repositories call by branch or tag. Reusable workflows live in .github/workflows, so changing one needs Workflows: write. Callers that pass secrets: inherit hand it every secret they have.

Through each caller's own gates.

Create a runner registration token or a just-in-time configuration and register a machine the attacker controls, with the labels existing jobs ask for. A job goes to any available runner in its group that has all its labels.

No help: a job that waited for approval still runs on the attacker's runner once approved.
A pull request or comment from anyone, no permission needed

A pull_request_target or workflow_run job checks out the attacker's PR, or interpolates its title into a shell step, and the attacker's code runs with secrets in scope.

Only if the privileged job names an environment without required reviewers.
A compromised Action or dependency a workflow already runs

A backdoored Action or a process on a reused runner reads secrets out of runner memory or from .git/config, and prints them to logs or uploads them as artifacts.

No help: the code is already inside the job that was approved.

Some routes need no permission at all, and code already inside an approved job, or a runner the attacker registered, gets past every environment rule. Required reviewers still stop more of these routes than anything else, which is why production secrets belong in an environment that has them, and cloud access belongs in OIDC, where there is no stored value to send anywhere.

GITHUB_TOKEN scopes by tier

Each scope you add to a job's permissions: block is handed to every step in that job. These are the permissions a workflow can ask for, from the Permission Reference, on the same scale as everything else. The token only reaches the repository the workflow runs in and expires when the job ends (at most 24 hours), so none of them is Tier 0 on its own.

TierScopeWhat it allows
T1
actions: writeStarts workflows that have a workflow_dispatch trigger, on any branch that holds the file, with its own inputs. Also re-runs, cancels and deletes runs, approves runs from fork pull requests, disables workflows, deletes logs, caches and artifacts, and sets the repository's OIDC subject template. A re-run keeps the privileges of whoever started the original run and uses the workflow file from the original commit; re-running a run Dependabot started still gets Dependabot secrets. Starting a privileged publish or deploy job by hand was the step that mattered in the Nx incident.
T1
id-token: writeLets the job request an OIDC token. The token grants nothing on GitHub; a cloud role whose trust policy accepts it hands out credentials. What the job gets is that role's permissions, and which jobs get it depends on how closely the policy matches the subject and audience.
T1
packages: writePublishes, deletes and restores package versions. Only the GITHUB_TOKEN has it: a workflow reaches a package linked to its repository, or one that gave the repository Actions access; Maven and Gradle packages always follow the repository. Whatever is published is pulled by everyone who depends on it.
T2
artifact-metadata: writeCreates and overwrites the organization's storage and deployment records for artifacts, including their runtime risks. Alert filters and security campaigns use them to show which code runs in production, so marking an artifact decommissioned or dropping a risk pushes its alerts down the list.
T2
attestations: writeUploads attestations and deletes them, for the repository and across the organization. A verifier checks the signing certificate, which names the repository and workflow that got it through Actions OIDC, so uploading alone does not make a forged artifact pass. Deleting one makes a genuine artifact fail verification.
T2
checks: writeCreates, completes and re-requests check runs and suites. A check run satisfies a required check of the same name unless the rule pins a different App as its source.
T2
contents: writePushes commits, creates, moves and deletes branches, tags and releases, merges pull requests, and sends repository_dispatch events. Cannot change files under .github/workflows without Workflows: write. On a repository other projects consume, moving a tag changes what they run, unless the tag belongs to an immutable release: its tag and assets are locked, though the release can still be deleted.
T2
deployments: writeCreates and deletes deployments for any branch, tag or commit, sets their statuses, and approves or rejects pending jobs where the caller is a required reviewer or the custom protection rule. A deployment triggers workflows on the deployment event at the commit it names, and a success status can satisfy a rule that requires deployments to succeed before merging. A deployment branch policy on the environment limits which refs can deploy.
T2
discussions: writeCreates and edits discussions. GitHub Discussions has been used as a command channel for malware.
T2
issues: writeCreates and edits issues and comments. Text in issues is what prompt injection against AI agents uses.
T2
pages: writeRebuilds the site from the default branch, cancels deployments, and deploys an Actions artifact to the site. A deployment also needs an OIDC token issued to a workflow run in the same repository, so new content goes out through a Pages workflow, not the API alone; the call itself can come from outside the run while the token is valid. Changing the site's source, custom domain or HTTPS also needs Administration (write).
T2
pull-requests: writeOpens, reviews, approves and merges pull requests. An approval can satisfy a review rule when the approver counts as a reviewer.
T2
security-events: writeDismisses code scanning alerts and uploads analyses, so findings can disappear without a fix.
T2
statuses: writeSets commit statuses. A required status check set to any source can be marked green by anyone with this; one pinned to a GitHub App only accepts that App's status.
T3
actions: readReads workflow runs, job logs and artifacts, lists caches without their contents, and reads environment protection settings and the repository's OIDC subject template. On a public repository anyone can already read the logs and artifacts. GitHub does not guarantee that secrets are masked in logs, and structured or encoded values often are not.
T3
artifact-metadata: readReads artifact deployment records.
T3
attestations: readReads build provenance attestations.
T3
checks: readReads check runs and suites.
T3
contents: readReads code, commits, branches, tags and releases. On a private repository this is the source code itself.
T3
deployments: readReads deployments and their statuses.
T3
discussions: readReads discussions.
T3
issues: readReads issues and comments.
T3
packages: readDownloads packages from GitHub Packages.
T3
pages: readReads the GitHub Pages configuration.
T3
pull-requests: readReads pull requests and reviews.
T3
security-events: readReads code scanning alerts and analyses. Shows where the code is weak.
T3
statuses: readReads commit statuses.

A workflow with no permissions: key falls back to the repository default, which on older orgs is often read/write on nearly everything. Setting the org default to read-only and writing an explicit block per job is the single cheapest change on this page.

Version pinning

A uses: line is a dependency on someone else's repository, fetched fresh on every run. What you pin to decides who can change the code your job runs, and whether you would notice.

ReferenceExampleWho can change what runsAttack technique
Branchactions/checkout@mainAnyone who can push to that branch in the action's repo, at any time
Tagactions/checkout@v6Anyone with write access to the action's repo. Tags can be moved or recreated silently, which is what tj-actions and TeamPCP did
Tag on an immutable releaseowner/action@v2.1.0 (release published as immutable)Nobody, the tag is locked to its commit and can't be deleted. Floating major tags like v2 are still mutable
Full commit SHAactions/checkout@<40-char sha> # v6.0.1Nobody. Changing the code means a new SHA, which means a visible diff in your repo

Pin to a SHA and keep the version as a comment

GitHub's own guidance calls a full-length SHA the only way to use an action as an immutable release. The trailing comment is what makes pins reviewable and lets Dependabot and Renovate update them.

steps:
  - uses: actions/checkout@<full 40-char sha> # v6.0.1
    with:
      persist-credentials: false
  - uses: actions/setup-node@<full 40-char sha> # v5.0.0

For the first pass across many repositories, a tool like pinact rewrites tag references to SHA plus comment in place. After that, let Dependabot keep them current:

# .github/dependabot.yml
version: 2
updates:
  - package-ecosystem: "github-actions"
    directory: "/"          # covers .github/workflows
    schedule:
      interval: "weekly"
    groups:
      actions:
        patterns: ["*"]     # one PR per week instead of one per action

Review those PRs like code, because they are code. A bump PR that is auto-merged pins a malicious release for you just as fast as a floating tag would pull it in. Look at the upstream diff for anything that touches network calls, credentials, or new nested uses: lines.

Enforce it, don't just recommend it

Since August 2025 the Actions policy at enterprise, org, and repo level has a checkbox that fails any workflow using an action not pinned to a full SHA. The same allow-list accepts ! entries to block a specific action or version outright, which is the fastest way to cut off a compromised action across an org while you work out who used it:

# Settings > Actions > General > Allow select actions and reusable workflows
your-org/*,
aws-actions/configure-aws-credentials@*,
docker/build-push-action@*,
!tj-actions/changed-files@*

Scan first, then enforce. Run a scanner across the org to find unpinned uses, fix them, then turn on the SHA requirement. Turning it on first breaks every unpinned workflow on its next run.

What a SHA pin does not cover

Nested actions inside composite actions

A composite action you pinned by SHA can itself call other actions by tag. You get whatever those tags point to today. When reviewdog/action-setup@v1 was backdoored in March 2025, other reviewdog actions that call it by tag passed the payload on, including to workflows that had pinned those actions by SHA.

Docker-based actions

An action whose action.yml says `image: docker://some/image:latest`, or whose Dockerfile starts `FROM some/image:tag`, pulls a mutable image on every run.

Things the action downloads at runtime

Setup actions that fetch 'the latest' binary, install scripts piped from curl, and unpinned package installs. The SHA pins the wrapper, not what it fetches.

Reusable workflows

`uses: org/repo/.github/workflows/build.yml@main` is a mutable reference to a whole job, secrets included if you pass `secrets: inherit`.

Impostor commits

GitHub resolves a SHA from any fork in the repository's network, so `owner/action@<sha>` can point at a commit that only exists in an attacker's fork. Check that a new SHA is reachable from a tag or branch in the real repo.

Auto-merged bump PRs

If Dependabot or Renovate PRs for actions merge without review, a malicious release gets pinned for you. Pinning buys review time only if someone uses it.

GitHub's 2026 roadmap targets the first of these directly: a dependencies: section in the workflow file that locks every direct and nested action to a SHA, so composite actions no longer hide what they pull in. Until that is available to you, prefer actions that pin their own dependencies (OpenSSF Scorecard's Pinned-Dependencies check shows this), and vendor small actions into your own org where you can.

If you publish actions yourself

  • Turn on immutable releases, so a published tag is locked to its commit and can't be deleted or moved.
  • Add a tag ruleset that blocks force-updates and deletion for everyone, including admins.
  • Pin every nested uses: and Docker image inside your action by SHA or digest, so your consumers' pins mean something.
  • Publish from a workflow that runs no untrusted code, with a token scoped to that repository only.

Hardening, layer by layer

Controls that are set once for the whole org beat controls that rely on every workflow author getting it right. Work from the top down. Each line is an item on the Checklist, with the tier of the attack techniques it stops, the effort, and the plan it needs when that is more than Free.

1. Org and enterprise policy

Set once for every repository, so no workflow author has to remember them.

2. The workflow file

Set in each workflow. A scanner on every pull request keeps them from slipping.

permissions: {}

jobs:
  build:
    runs-on: ubuntu-latest
    permissions:
      contents: read
    steps:
      - uses: actions/checkout@<sha> # v6.0.1
        with:
          persist-credentials: false
      - run: make test

  publish:
    needs: build
    if: github.ref == 'refs/heads/main'
    runs-on: ubuntu-latest
    environment: release        # required reviewers + main-only rule
    permissions:
      contents: read
      packages: write
      id-token: write
      attestations: write
    steps:
      - uses: actions/checkout@<sha> # v6.0.1
        with:
          persist-credentials: false
      # build, push by digest, attest

3. The runner

Where the job runs and what it can reach from there.

4. Detection and response

Review changes to workflows, see what runs in them, and be ready to rotate.

Scan workflow files on every pull request, the same way you scan code, and watch what jobs do while they run. These are the tools on the Tooling page for workflows, pinning and runners, with how each works and how to run it in CI.

Workflow analysis

Action pinning

Runner hardening

GitHub changes to act on

The GitHub changes that touch a hardening item above, from the changes to act on. Each one is checked against GitHub's changelog post, and the fix is the checklist item it links.

1 action-required change is coming up. 5 more are already in effect; check you made them.

Kind

Earlier opt-ins and defaults (8): past their effective date, or older than 90 days

Incidents on this site

The incidents whose attack path uses a technique explained above, newest first. Each one walks through the steps and what breaks them.

T0August 2026ChainDrop: a hijacked maintainer account publishes through trusted publishingWith the keyv maintainer's GitHub account, the attacker committed a payload straight to main and cut releases, so the projects' own release workflows published it to npm through trusted publishing, with valid provenance. Each install then stole the next victim's tokens and published their packages too.Click to open →T0May 2026GitHub's internal repositories taken through a VS Code extensionA token stolen through a poisoned TanStack package let the attacker publish a backdoored Nx Console extension, which ran on a GitHub employee's machine and led to about 3,800 of GitHub's internal repositories being copied.Click to open →T1OngoingActions cache poisoning (Angular, TanStack)A fork's pull request ran in a pull_request_target workflow that shares the repository's Actions cache, wrote a poisoned pnpm store under the key the release workflow restores, and when the release ran, the malware took its OIDC token from memory and published 84 malicious TanStack versions.Click to open →T1May 2026Megalodon: mass backdooring of CI workflowsOn 18 May 2026, probably with credentials taken from developers' machines by infostealers, someone pushed workflows that steal CI secrets and cloud credentials straight to the default branch of 5,561 repositories in about six hours, and left dormant workflow_dispatch backdoors in a few chosen ones.Click to open →T0March – April 2026TeamPCP tag force-overwrite campaignA Trivy bot token left valid after an earlier break-in pushed a poisoned Trivy release and moved the tags of trivy-action and setup-trivy, whose payload took the secrets of every pipeline that ran them. Those secrets opened Checkmarx's KICS Action, LiteLLM on PyPI and Bitwarden's npm CLI in turn.Click to open →T2March – April 2026prt-scan: automated pull_request_target attacksOne actor using six accounts opened more than 500 pull requests whose code ran in pull_request_target workflows with the target's secrets; fewer than one in ten worked, but those leaked AWS, Cloudflare and Netlify keys and led to two compromised npm packages.Click to open →T0February 2026hackerbot-claw autonomous agent RCEAn account calling itself an autonomous AI security agent opened pull requests against seven well-known repositories' unsafe workflows, ran code in at least four of them, stole a write token from awesome-go and a personal access token from Trivy that let it take over the Trivy repository.Click to open →February 2026Clinejection: prompt injection in an AI issue triage workflowAn issue title told Cline's AI triage agent to install a package, which ran code in a workflow that shares the Actions cache with the nightly release jobs; poisoning that cache exposed the VS Code Marketplace, OpenVSX and npm publishing tokens, and someone used them to publish an unauthorized Cline CLI.Click to open →T1September 2025, returned 2026GhostActionWith maintainers' stolen credentials, the attacker committed a workflow that posted each repository's secrets to their own server: 817 repositories in 2025, and hundreds more when it came back in 2026.Click to open →T0September 2025 / November 2025 / May 2026Shai-Hulud self-propagating npm wormA self-spreading npm worm: each infected install stole the victim's GitHub and npm tokens, pushed a workflow that sent their repositories' secrets out, and published infected versions of the victim's own packages.Click to open →T0August 2025Nx "s1ngularity"An injectable pull_request_target workflow left on an old branch gave the attacker a write token, which ran Nx's publish job and handed over its npm token. The malicious versions used developers' own AI tools to search their machines for credentials.Click to open →T0March 2025tj-actions/changed-files supply-chain compromise (CVE-2025-30066)Each compromised repository leaked the token for the next, from a spotbugs pull request to reviewdog to tj-actions, until the Action's moved release tags made every repository using it by tag print its own secrets into its workflow logs.Click to open →T1March – June 2025Salesloft Drift GitHub → AWS pivotStolen GitHub tokens gave the attacker months inside Salesloft's GitHub account, and from there Drift's AWS environment and the OAuth tokens it held for its customers' Salesforce instances.Click to open →T1December 2024Ultralytics build cache poisoningA branch name ran as a shell command in a pull_request_target workflow, and the code it fetched poisoned the Actions cache that Ultralytics' release job restored, so two releases built and published through Trusted Publishing carried a cryptominer. Two days later two more malicious versions went to PyPI straight from an old API token.Click to open →T2August 2024ArtiPACKED artifact token leakagePublic workflow artifacts in projects of Red Hat, Google, AWS, Microsoft, OWASP and others contained the job's own GitHub token, and Unit 42 showed it could download one and push with it before the job ended, or use a six-hour runtime token to swap an artifact.Click to open →T0July 2023Dependabot impersonationWith developers' stolen personal access tokens, an automated script pushed commits made to look like Dependabot's to hundreds of repositories, adding a workflow that sent the repository's secrets out and a password stealer to every JavaScript file.Click to open →T22023–2024Self-hosted runner takeovers (PyTorch and others)By fixing a typo to become a contributor, researchers got their pull requests to run without approval on non-ephemeral self-hosted runners of GitHub's runner-images, PyTorch and TensorFlow, stayed on the machines, and took the write tokens, PATs and cloud keys of the release jobs that ran there next.Click to open →T2Ongoing"Pwn requests": pull_request_target & workflow_runA workflow on pull_request_target or workflow_run runs in the base repository with its secrets and a write token, so when it also checks out and runs the pull request's code, or takes in its artifacts or title, anyone who can open a pull request runs code with those privileges.Click to open →

Sources: GitHub Docs: Secure use reference, Workflow syntax: permissions, Keeping your actions up to date with Dependabot, and the GitHub changelog entries linked above.