Skip to content
Write-up Advanced

Release-Drafter To google/accompanist Compromise: VRP Writeup

The Release Drafter GitHub Action had a workflow that could be triggered by anyone using a Dependabot actor confusion technique, allowing them to obtain a GITHUB_TOKEN with write access to the repository. This token could be used to modify the mutable v5 tag, potentially compromising all downstream users of the action, including Google/Accompanist.

Adnan Khan Follow

Published on adnanthekhan.com

Shortly after Hugo Vincent of Synactiv published his blog post on the Dependabot actor confusion technique, I set out to identify interesting repositories vulnerable to the this attack technique. One repository I quickly found was that of the Release Drafter reusable GitHub Action.

Adnan Khan, on adnanthekhan.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 10 min read.

Context

Release Drafter is a reusable GitHub Action, published on GitHub's Action marketplace, that drafts release notes for a repository. Thousands of repositories use it, and in most workflows where it appears it has at least write access to the repository, sometimes alongside other secrets. Because it is consumed as a third-party action, downstream repositories depend on whatever code sits behind the reference they use.

That reference is the crux of this report. Many repositories consume Release Drafter by tag, for example v5, rather than by commit SHA. Tags are mutable: whoever can push to the upstream repository can move a tag to point at different code, and every downstream consumer of that tag picks up the change on its next run. The report describes this as a supply chain compromise: the upstream action's release process becomes part of every consumer's attack surface.

The specific downstream repository examined here is google/accompanist, which used the action by tag inside a workflow whose GITHUB_TOKEN had full write permissions. The report was submitted to Google's VRP on that basis, and the same issue was disclosed to the Release Drafter maintainers. Google accepted the report, mitigated the impact on its side, and awarded $7,500 under the OSS Standard tier for a supply chain compromise.

From the original on adnanthekhan.com

The author notes that the issue lived entirely in the CI/CD configuration of the upstream repository, not in application code, which is the broader point of the writeup: assessing an open-source project on GitHub means looking past the codebase.

Setup

The technique at the centre of the report is the Dependabot actor confusion published by Hugo Vincent of Synactiv. The author used that blog post as the starting point and searched for repositories vulnerable to it. The report states that anyone with a GitHub account could have exploited the upstream workflow.

Because the upstream release-drafter/release-drafter repository is not owned by Google, the author could not attack it directly for the report. Instead, a complete mirror of both google/accompanist and release-drafter/release-drafter was created, so the full chain could be exercised end to end: from the Dependabot confusion Pwn Request, through obtaining a token, to pushing a malicious tag with an exfiltration payload that fires in the downstream repository.

From the original on adnanthekhan.com

The diagram shows how the mirror environment was configured to exercise the vulnerability path.

Finding it

The author was looking for repositories vulnerable to the Dependabot actor confusion technique and quickly found the Release Drafter reusable action. The reasoning that made it interesting had three parts, all of which had to hold for the issue to be impactful:

  1. The downstream repository used the release-drafter action by tag.
  2. The downstream repository used the action inside a workflow whose GITHUB_TOKEN had full write permissions.
  3. The upstream workflow could be driven by an unauthenticated outsider through the Dependabot confusion technique.

The first two are properties of google/accompanist; the third is a property of release-drafter/release-drafter. The author is explicit that the first two are, on their own, best-practice issues: fixing them would protect Google even if the upstream were compromised. The third is what turned a configuration weakness into an exploitable path.

The report also stresses that the risk of consuming actions by tag is well known and not new, citing a DEF CON 31 talk by Palo Alto Networks researchers on how GitHub Actions vulnerabilities can be wormable. What made this case notable is the concrete route to moving a tag on a popular action.

Exploitation

Step 1: the vulnerable upstream workflow

The Dependabot post-update workflow in release-drafter/release-drafter ran on pull_request_target, checked out the code from the pull request head, and then used actions/setup-node with cache: yarn. That combination means the package.json file from the pull request is read and processed by the workflow, making it a trivial code injection point. On its own this is a classic Pwn Request, a widely known vulnerability class.

From the original on adnanthekhan.com

The limiting factor was a guard on the job:

Text
if: ${{ github.actor == 'dependabot[bot]' }}

Normally that condition would make the workflow unexploitable by an outside attacker, because the actor would be the attacker's own account, not Dependabot. Hugo Vincent's technique removes that limitation by producing a synchronize event that is attributed to the Dependabot actor. With it, anyone could drive this workflow and obtain a GITHUB_TOKEN with write access to release-drafter/release-drafter.

Step 2: triggering the workflow as Dependabot

The report does not re-explain the technique in depth and points to the original blog post for that. The steps it lists are:

  1. Fork the target repository.
  2. Enable Dependabot on the fork.
  3. Add the payload to the default branch of the fork (the main branch in most cases).
  4. Create a fork PR from the feature branch created by Dependabot in the fork to the target repository.
  5. Comment @dependabot recreate in the PR Dependabot created within the fork.
  6. Dependabot updates the PR head with the new changes from main; because that branch is also the head branch for the second fork PR, it triggers a synchronize event in the base repository.

The effect is that the base repository sees a synchronize event whose actor is Dependabot, satisfying the if: guard, while the code being processed comes from the attacker's fork.

In the mirror of the release-drafter repository, the author used a GITHUB_TOKEN exfiltration payload followed by a sleep for 30 minutes. The workflow run time and the fact that the synchronize event came from Dependabot are both visible in the run. The attacker account in the mirror was named derpendabot-bot.

From the original on adnanthekhan.com

Step 3: backdooring the tag

With a write-capable GITHUB_TOKEN for the upstream repository in hand, the goal is to move the tag that downstream consumers use. The google/accompanist repository used the action by the v5 tag, so v5 is the tag to backdoor.

In the fork, the author committed a change to action.yml that turned the action into a composite action running an exfiltration payload.

From the original on adnanthekhan.com

Then the v5 tag was force updated to point at the new commit and pushed to the repository. From that moment, any downstream workflow resolving v5 would run the attacker's code.

The report notes that a motivated attacker could go further than a composite action. A first step would be to place the payload as obfuscated JavaScript inside the dist file. For most actions that file is several megabytes, and commits behind major version tags are designed to change, so a change of commit reference would not look unusual. The report links release-drafter's v6.0.0 dist/index.js as an example of the file in question.

To avoid collateral damage to repositories that are not the real target, an attacker could encrypt the actual payload with a key that is only present inside the target repository's workflow.

Step 4: the downstream workflow

The Update release workflow in google/accompanist ran on every push to main and used the v5 version of the action.

From the original on adnanthekhan.com

Reviewing previous runs showed that this workflow had a GITHUB_TOKEN with full write access. With that token, an attacker could modify code and releases, and potentially approve and merge their own pull requests.

From the original on adnanthekhan.com

Step 5: end-to-end in the mirror

In the mirror environment, the author pushed a change to the main branch of the repository. That triggered the Update release workflow. Instead of running the expected release-drafter action, it ran a simple curl | bash payload.

From the original on adnanthekhan.com

This closes the chain: an outsider drives the upstream workflow through Dependabot actor confusion, obtains a write token, moves the v5 tag to attacker-controlled code, and the next push to main in the downstream repository executes that code with a full-write token.

Root cause

Two mistakes combine.

In the upstream repository, the Dependabot post-update workflow uses pull_request_target, checks out the pull request head, and runs actions/setup-node with cache: yarn, so package.json from the pull request is executed as part of the workflow. The github.actor == 'dependabot[bot]' guard was intended to restrict this to Dependabot, but the actor field reflects who triggered the event, not where the code came from, and the Dependabot confusion technique lets an attacker produce a synchronize event attributed to Dependabot. The guard therefore does not constrain the attacker.

In the downstream repository, the action is consumed by mutable tag (v5) rather than by SHA, and the consuming workflow holds a GITHUB_TOKEN with full write permissions. Together they mean that a compromise of the upstream release process is a compromise of the downstream repository. The report frames this as the third party's attack surface becoming yours.

Impact

For the upstream action, anyone with a GitHub account could have obtained a GITHUB_TOKEN able to modify the tags associated with the action. Every downstream user consuming the action by tag, rather than by SHA, would then be running attacker-controlled code. The report is careful about the real-world picture: google/accompanist might not be a prime target, because backdooring the action backdoors it for everyone. A workflow that holds an NPM token for a cryptocurrency company is a different matter. The report points to Near's Wallet Selector, which also used the v5 version of release-drafter in bump-version.yml, and whose workflow had access to an NPM token an attacker could steal. The author states little doubt that a threat actor with the knowledge and opportunity would have exploited this.

In the google/accompanist case specifically, the full-write GITHUB_TOKEN in the Update release workflow would have allowed modifying code and releases, and potentially approving and merging the attacker's own pull requests. The author notes that an overt attack against the upstream was not performed for the report, but that a black hat attacker could have carried one out.

Fix

The upstream maintainers of release-drafter/release-drafter deployed a fix on 1 November, after the author sent a reminder email asking whether they had looked into the issue raised a few weeks earlier. The report does not describe the contents of that fix.

On the downstream side, the report names the two changes that would have protected Google independently of the upstream: consume the action by SHA instead of a mutable tag, and avoid granting the workflow a GITHUB_TOKEN with full write permissions. The author describes these as best practices in their own right. The general conclusion is that third-party actions should be pinned by SHA, because otherwise the third party's attack surface is also yours: any new vulnerability or technique that lets an attacker compromise an upstream action's release process makes every tag-consuming repository immediately vulnerable.

The report also broadens the threat model beyond code vulnerabilities: attackers frequently use spear-phishing against developers to conduct supply chain attacks, citing the Lottie Player incident, where the attacker likely took over $700k in cryptocurrency from a single victim. Targeting developers of popular reusable actions would not be surprising.

Variants to test

  • pull_request_target plus checkout of the PR head plus a package manager cache. Look for workflows that use pull_request_target, check out the pull request head, and then run a step that reads attacker-controlled files, such as actions/setup-node with cache: yarn reading package.json. A positive result is a workflow run where code from the fork executes with the base repository's token.
  • Actor-based guards. Search for conditions such as github.actor == 'dependabot[bot]', github.triggering_actor, or bot-name checks used as a security boundary. A positive result is a way to produce an event attributed to that actor while the code under test comes from your fork, for example through the Dependabot recreate flow described above.
  • Downstream consumption by tag. Enumerate workflows in an organisation that reference third-party actions by tag or branch rather than SHA, and check the permissions of the job that uses them. A positive result is a tag-referenced action inside a job with a write-capable GITHUB_TOKEN or with valuable secrets such as package registry tokens.
  • Tag mutability on the upstream. For any action you depend on, check whether the tag you consume can be moved by a token obtainable through a workflow weakness. A positive result is a write-capable token reachable from an unauthenticated trigger, combined with a tag that downstream users rely on.
  • Payload targeting. Consider whether a compromised action could restrict execution to a single victim, for example by encrypting the payload with a key present only in the target's workflow. A positive result in a test mirror is a payload that stays inert in non-target repositories and fires only in the intended one.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 18 min read.

What happened, in plain words

Imagine a popular recipe book that thousands of kitchens use. Each kitchen does not keep its own copy of the recipes; it just writes "use recipe book, edition 5" on its wall. If someone swaps out edition 5 for a different book, every kitchen that follows that note starts cooking the new recipes without noticing.

That is roughly what this report is about, but with software instead of recipes. A tool called Release Drafter is used by thousands of software projects on GitHub (a website where people store and share code). Projects that use Release Drafter usually point at it by a short label such as v5 rather than at an exact frozen copy. Labels can be moved. If an outsider can move the label, every project that follows it starts running the outsider's code.

The researcher found that anyone with a GitHub account could have obtained a token able to modify the tags of Release Drafter through a weakness in its own automated setup. He reported it to Google because one of Google's projects, google/accompanist, used Release Drafter by label. Google accepted the report, mitigated the impact on its side, and paid $7,500 under its OSS Standard tier for a supply chain compromise.

From the original on adnanthekhan.com

The key lesson is that the security of an open-source project is not only about the code you can read. It is also about the automated machinery around the code: the scripts that build it, test it and publish it. This report lives entirely in that machinery.

Some words you will need

Before going further, a handful of terms come up constantly. Each one is explained here once, in everyday language.

  • Repository (repo): a project's folder on GitHub, holding its files plus the full history of changes.
  • GitHub Actions: GitHub's built-in automation. You write a small recipe (a workflow) that says "when X happens, run Y". GitHub then runs it for you on GitHub's computers.
  • Workflow: one such recipe, stored as a file in the repository. It has triggers (when to run) and jobs (what to do).
  • Action: a reusable building block that a workflow can call, so people do not rewrite the same steps. Release Drafter is an action.
  • Marketplace: GitHub's catalogue of published actions that anyone can use.
  • Tag: a movable label attached to a particular version of a repository's code. Think of a sticky note on a box: you can peel it off and stick it on a different box.
  • SHA (commit hash): a long fingerprint that identifies one exact version of the code and cannot be changed. Pinning by SHA is like writing down the exact page and paragraph instead of "edition 5".
  • Token: a short secret string that acts like a temporary key or wristband. Whoever holds it is treated as having certain permissions, without needing a password.
  • GITHUB_TOKEN: a token that GitHub creates automatically for each workflow run, so the workflow can act on the repository (read files, write files, change releases, and so on). Its powers depend on settings.
  • Permissions: the list of things a token is allowed to do. "Full write" means it can change almost anything in the repository.
  • Pull request (PR): a proposal to change a repository. Someone copies the project (a fork), makes edits on a branch, and asks the original project to pull those edits in. Reviewers can discuss and merge it.
  • Fork: your own personal copy of someone else's repository, under your account.
  • Branch: a parallel line of work inside a repository, so edits can happen without disturbing the main line.
  • Dependabot: GitHub's automatic helper that watches the libraries a project uses and opens pull requests to update them when new versions appear.
  • Actor: the account GitHub thinks triggered an event. It is a name badge, not proof of where the code came from.
  • Event: something that happened, such as a push, a new pull request, or an update to an existing pull request. Workflows listen for events.
  • synchronize event: the event GitHub fires when new commits are added to an existing pull request.
  • Pwn Request: a nickname for a class of bug where a workflow runs untrusted code from a pull request with the original repository's privileges. "Pwn" is slang for "take over".
  • Code injection: tricking a program into treating data you supplied as instructions it should run.
  • Supply chain: everything your project depends on, directly or indirectly. If any link is compromised, your project is compromised, even if your own code is fine.
  • Exfiltration: secretly sending data out, for example sending a token to a server the attacker controls.
  • Payload: the piece of code an attacker wants to run on the victim's machine.
  • Backdoor: a hidden way into something, planted so the attacker can use it later.
  • CI/CD: continuous integration and continuous delivery, the automated pipeline that builds, tests and publishes software.
  • VRP: Vulnerability Reward Program, a scheme where a company pays researchers for reporting security problems.
  • OSS Standard tier: the reward level Google uses for open-source software reports.
  • Spear-phishing: a targeted scam message aimed at a specific person, often to steal credentials.
  • Wormable: able to spread by itself from one victim to the next, like a disease.

The setup: what the researcher was looking for

The starting point was a blog post by Hugo Vincent of Synactiv about a trick called Dependabot actor confusion. The researcher read it and went looking for real projects that would fall for the trick. He quickly found Release Drafter.

Release Drafter is a reusable action that drafts release notes for a repository. Thousands of projects use it. In most workflows where it appears, it has at least write access to the repository, and sometimes it sits next to other secrets such as package registry tokens. Because projects use it as a third-party action, they depend on whatever code sits behind the label they wrote down.

That label is the heart of the problem. Many projects use Release Drafter by tag, for example v5, instead of by SHA. Tags are movable. Anyone who can push to the upstream repository can point the tag at different code, and every project that follows the tag picks up the change the next time its workflow runs. The report calls this a supply chain compromise: the upstream action's release process becomes part of every user's attack surface.

The downstream project examined here is google/accompanist, which used the action by tag inside a workflow whose GITHUB_TOKEN had full write permissions. The report was submitted to Google's VRP on that basis, and the same issue was disclosed to the Release Drafter maintainers.

Because the upstream release-drafter/release-drafter repository is not owned by Google, the researcher could not attack it directly for the report. Instead he built a complete mirror of both google/accompanist and release-drafter/release-drafter, so the whole chain could be exercised end to end: from the Dependabot confusion Pwn Request, through obtaining a token, to pushing a malicious tag with an exfiltration payload that fires in the downstream repository.

From the original on adnanthekhan.com

The diagram shows how the mirror environment was configured to exercise the vulnerability path.

Why this particular project mattered

The reasoning that made the finding interesting had three parts, and all three had to hold for the issue to be impactful:

  1. The downstream repository used the release-drafter action by tag.
  2. The downstream repository used the action inside a workflow whose GITHUB_TOKEN had full write permissions.
  3. The upstream workflow could be driven by an unauthenticated outsider through the Dependabot confusion technique.

The first two are properties of google/accompanist; the third is a property of release-drafter/release-drafter. The researcher is explicit that the first two are, on their own, best-practice issues: fixing them would protect Google even if the upstream were compromised. The third is what turned a configuration weakness into an exploitable path.

The report also stresses that the risk of using actions by tag is well known and not new, citing a DEF CON 31 talk by Palo Alto Networks researchers on how GitHub Actions vulnerabilities can be wormable. What made this case notable is the concrete route to moving a tag on a popular action.

Step 1: the vulnerable upstream workflow

The Dependabot post-update workflow in release-drafter/release-drafter ran on pull_request_target, checked out the code from the pull request head, and then used actions/setup-node with cache: yarn. That combination means the package.json file from the pull request is read and processed by the workflow, making it a trivial code injection point. On its own this is a classic Pwn Request, a widely known vulnerability class.

From the original on adnanthekhan.com

A few of those terms deserve unpacking, because they are the whole reason the bug exists.

  • pull_request_target is a trigger that runs a workflow when a pull request arrives, but runs it in the context of the original repository, with the original repository's token and secrets. It exists so maintainers can safely label or comment on pull requests from strangers. It becomes dangerous when the workflow then checks out and runs the stranger's code.
  • Checking out the pull request head means copying the contributor's version of the files into the workflow's working area. Now the workflow is looking at the stranger's files.
  • actions/setup-node is an action that installs Node.js, a JavaScript runtime. The cache: yarn option tells it to cache downloaded packages using yarn, a package manager. To work out what to cache, it reads package.json, the file that lists a project's dependencies. If that file comes from the stranger, the stranger controls what the workflow reads.
  • package.json as an injection point means the attacker can put instructions in that file that the workflow will execute. That is code injection.

The limiting factor was a guard on the job:

Text
if: ${{ github.actor == 'dependabot[bot]' }}

Line by line:

  • if: says this job should only run when the condition that follows is true.
  • ${{ ... }} is GitHub's syntax for inserting a computed value into the workflow file.
  • github.actor is the name of the account GitHub believes triggered the event.
  • == means "is equal to".
  • 'dependabot[bot]' is the exact name of GitHub's Dependabot account. The [bot] suffix marks automated accounts.

So the line reads: only run this job if the account that triggered it is Dependabot. Normally that would make the workflow unexploitable by an outside attacker, because the actor would be the attacker's own account, not Dependabot. Hugo Vincent's technique removes that limitation by producing a synchronize event that is attributed to the Dependabot actor. With it, anyone could drive this workflow and obtain a GITHUB_TOKEN with write access to release-drafter/release-drafter.

Step 2: triggering the workflow as Dependabot

The report does not re-explain the technique in depth and points to the original blog post for that. The steps it lists are:

  1. Fork the target repository.
  2. Enable Dependabot on the fork.
  3. Add the payload to the default branch of the fork (the main branch in most cases).
  4. Create a fork PR from the feature branch created by Dependabot in the fork to the target repository.
  5. Comment @dependabot recreate in the PR Dependabot created within the fork.
  6. Dependabot updates the PR head with the new changes from main; because that branch is also the head branch for the second fork PR, it triggers a synchronize event in the base repository.

Why each step is there:

  1. Fork the target repository. You need your own copy so you can change things without permission from the owner. This is the only access level required: a normal GitHub account.
  2. Enable Dependabot on the fork. Dependabot only acts on repositories where it is switched on. Turning it on in your fork gives you a bot that will open pull requests on your behalf.
  3. Add the payload to the default branch of the fork. The payload is the code you want the victim's workflow to run. Putting it on the default branch means Dependabot will pick it up when it updates its own pull request.
  4. Create a fork PR from the Dependabot feature branch to the target repository. This is the second pull request, the one aimed at the real victim. Its head branch is the same branch Dependabot is working on in your fork.
  5. Comment @dependabot recreate in the PR Dependabot created within the fork. This is a command to the bot: throw away the current version of your pull request and rebuild it from the latest default branch. Since the default branch now contains the payload, the rebuilt branch contains the payload too.
  6. Dependabot updates the PR head with the new changes from main. Because that branch is also the head branch for the second fork PR, the update fires a synchronize event in the base repository.

The effect is that the base repository sees a synchronize event whose actor is Dependabot, satisfying the if: guard, while the code being processed comes from the attacker's fork. The name badge says Dependabot; the code is the attacker's. That mismatch is the whole trick.

In the mirror of the release-drafter repository, the researcher used a GITHUB_TOKEN exfiltration payload followed by a sleep for 30 minutes. The workflow run time and the fact that the synchronize event came from Dependabot are both visible in the run. The attacker account in the mirror was named derpendabot-bot.

From the original on adnanthekhan.com

Step 3: backdooring the tag

With a write-capable GITHUB_TOKEN for the upstream repository in hand, the goal is to move the tag that downstream users rely on. The google/accompanist repository used the action by the v5 tag, so v5 is the tag to backdoor.

In the fork, the researcher committed a change to action.yml that turned the action into a composite action running an exfiltration payload.

From the original on adnanthekhan.com

Two terms here:

  • action.yml is the file that describes an action: its name, its inputs, and what it should run. It is the instruction sheet GitHub reads when a workflow calls the action.
  • Composite action is a type of action made of several steps bundled together. Changing an action into a composite action is a way to make it run commands of your choosing.

Then the v5 tag was force updated to point at the new commit and pushed to the repository. From that moment, any downstream workflow resolving v5 would run the attacker's code. "Force updated" means the tag was moved even though it already pointed somewhere else; Git normally resists this, but a token with write access can insist.

The report notes that a motivated attacker could go further than a composite action. A first step would be to place the payload as obfuscated JavaScript inside the dist file. For most actions that file is several megabytes, and commits behind major version tags are designed to change, so a change of commit reference would not look unusual. The report links release-drafter's v6.0.0 dist/index.js as an example of the file in question.

To avoid collateral damage to repositories that are not the real target, an attacker could encrypt the actual payload with a key that is only present inside the target repository's workflow.

Step 4: the downstream workflow

The Update release workflow in google/accompanist ran on every push to main and used the v5 version of the action.

From the original on adnanthekhan.com

Reviewing previous runs showed that this workflow had a GITHUB_TOKEN with full write access. With that token, an attacker could modify code and releases, and potentially approve and merge their own pull requests.

From the original on adnanthekhan.com

Step 5: end-to-end in the mirror

In the mirror environment, the researcher pushed a change to the main branch of the repository. That triggered the Update release workflow. Instead of running the expected release-drafter action, it ran a simple curl | bash payload.

From the original on adnanthekhan.com

What curl | bash means, for a reader who has never seen it:

  • curl is a command-line tool that downloads something from a web address.
  • | is a pipe: it takes the output of the command on the left and feeds it as input to the command on the right.
  • bash is a shell, a program that reads and executes commands.

So curl | bash downloads a script and immediately runs it. It is a common way to deliver a payload, because the attacker only needs to host a file somewhere and the victim's machine does the rest.

This closes the chain: an outsider drives the upstream workflow through Dependabot actor confusion, obtains a write token, moves the v5 tag to attacker-controlled code, and the next push to main in the downstream repository executes that code with a full-write token.

Root cause

Two mistakes combine.

In the upstream repository, the Dependabot post-update workflow uses pull_request_target, checks out the pull request head, and runs actions/setup-node with cache: yarn, so package.json from the pull request is executed as part of the workflow. The github.actor == 'dependabot[bot]' guard was intended to restrict this to Dependabot, but the actor field reflects who triggered the event, not where the code came from, and the Dependabot confusion technique lets an attacker produce a synchronize event attributed to Dependabot. The guard therefore does not constrain the attacker.

In the downstream repository, the action is used by mutable tag (v5) rather than by SHA, and the consuming workflow holds a GITHUB_TOKEN with full write permissions. Together they mean that a compromise of the upstream release process is a compromise of the downstream repository. The report frames this as the third party's attack surface becoming yours.

Impact

For the upstream action, anyone with a GitHub account could have obtained a GITHUB_TOKEN able to modify the tags associated with the action. Every downstream user consuming the action by tag, rather than by SHA, would then be running attacker-controlled code. The report is careful about the real-world picture: google/accompanist might not be a prime target, because backdooring the action backdoors it for everyone. A workflow that holds an NPM token for a cryptocurrency company is a different matter. The report points to Near's Wallet Selector, which also used the v5 version of release-drafter in bump-version.yml, and whose workflow had access to an NPM token an attacker could steal. The researcher states little doubt that a threat actor with the knowledge and opportunity would have exploited this.

In the google/accompanist case specifically, the full-write GITHUB_TOKEN in the Update release workflow would have allowed modifying code and releases, and potentially approving and merging the attacker's own pull requests. The researcher notes that an overt attack against the upstream was not performed for the report, but that a black hat attacker could have carried one out.

Fix

The upstream maintainers of release-drafter/release-drafter deployed a fix on 1 November, after the researcher sent a reminder email asking whether they had looked into the issue raised a few weeks earlier. The report does not describe the contents of that fix.

On the downstream side, the report names the two changes that would have protected Google independently of the upstream: use the action by SHA instead of a mutable tag, and avoid granting the workflow a GITHUB_TOKEN with full write permissions. The researcher describes these as best practices in their own right. The general conclusion is that third-party actions should be pinned by SHA, because otherwise the third party's attack surface is also yours: any new vulnerability or technique that lets an attacker compromise an upstream action's release process makes every tag-consuming repository immediately vulnerable.

The report also broadens the threat model beyond code vulnerabilities: attackers frequently use spear-phishing against developers to conduct supply chain attacks, citing the Lottie Player incident, where the attacker likely took over $700k in cryptocurrency from a single victim. Targeting developers of popular reusable actions would not be surprising.

Variants to test

  • pull_request_target plus checkout of the PR head plus a package manager cache. Look for workflows that use pull_request_target, check out the pull request head, and then run a step that reads attacker-controlled files, such as actions/setup-node with cache: yarn reading package.json. A positive result is a workflow run where code from the fork executes with the base repository's token.
  • Actor-based guards. Search for conditions such as github.actor == 'dependabot[bot]', github.triggering_actor, or bot-name checks used as a security boundary. A positive result is a way to produce an event attributed to that actor while the code under test comes from your fork, for example through the Dependabot recreate flow described above.
  • Downstream consumption by tag. Enumerate workflows in an organisation that reference third-party actions by tag or branch rather than SHA, and check the permissions of the job that uses them. A positive result is a tag-referenced action inside a job with a write-capable GITHUB_TOKEN or with valuable secrets such as package registry tokens.
  • Tag mutability on the upstream. For any action you depend on, check whether the tag you consume can be moved by a token obtainable through a workflow weakness. A positive result is a write-capable token reachable from an unauthenticated trigger, combined with a tag that downstream users rely on.
  • Payload targeting. Consider whether a compromised action could restrict execution to a single victim, for example by encrypting the payload with a key present only in the target's workflow. A positive result in a test mirror is a payload that stays inert in non-target repositories and fires only in the intended one.

Glossary

  • Action: a reusable building block that a GitHub workflow can call, so people do not rewrite the same steps.
  • Actor: the account GitHub believes triggered an event; a name badge, not proof of where the code came from.
  • Bash: a shell program that reads and executes commands.
  • Branch: a parallel line of work inside a repository.
  • Commit: a saved snapshot of changes in a repository, identified by a fingerprint.
  • Composite action: a type of GitHub action made of several steps bundled together.
  • curl: a command-line tool that downloads something from a web address.
  • Dependabot: GitHub's automatic helper that opens pull requests to update a project's dependencies.
  • Dependabot actor confusion: a technique that makes GitHub attribute an event to Dependabot even though the code involved comes from someone else.
  • Event: something that happened, such as a push or a pull request update; workflows listen for events.
  • Fork: your own personal copy of someone else's repository.
  • GITHUB_TOKEN: a token GitHub creates automatically for each workflow run so the workflow can act on the repository.
  • GitHub Actions: GitHub's built-in automation for running workflows.
  • Marketplace: GitHub's catalogue of published actions.
  • NPM token: a secret that lets a workflow publish packages to npm, a JavaScript package registry.
  • Pipe (|): a shell operator that feeds the output of one command into another.
  • Pull request (PR): a proposal to change a repository, made from a fork or branch.
  • pull_request_target: a workflow trigger that runs in the context of the original repository, with its token and secrets.
  • Pwn Request: a class of bug where a workflow runs untrusted pull request code with the original repository's privileges.
  • Repository (repo): a project's folder on GitHub, with its files and history.
  • SHA (commit hash): a long fingerprint identifying one exact version of code; it cannot be changed.
  • Supply chain: everything your project depends on; if any link is compromised, your project is compromised.
  • Tag: a movable label attached to a version of a repository's code.
  • Token: a short secret string that acts like a temporary key, granting certain permissions.
  • Workflow: one automation recipe stored as a file in a repository, with triggers and jobs.
  • Wormable: able to spread by itself from one victim to the next.

More by Adnan Khan

View all

1 more disclosed report, best first.

More from Google

View all

The newest disclosed reports for this program.

Similar reports

Same bug class and techniques, clearest first.