Skip to content
Access control Write-up Advanced

The (In)security Landscape of AI-Powered GitHub Actions (Part 2/2)

The AI GitHub Actions from OpenAI and Anthropic decided whether a triggering actor was a trusted bot purely by checking whether the actor name ended in a bot suffix, so any external GitHub App could pass the gate. An attacker could also impersonate a permitted bot by registering an App with the same available name, or use Dependabot as a confused deputy, and then feed prompt injection into the AI to reach secrets and tools.

Shay Berkovich Follow

Published on wiz.io

AI-powered GitHub Actions from vendors like OpenAI, Anthropic, and Google are now running in thousands of public workflows. We set out to map the shared responsibility model for these actions and we found:

Shay Berkovich, on wiz.io

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.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely authorisation was decided by string comparison on the actor name (a bot suffix or an exact App name) rather than verifying that the App is actually installed on and permitted for the repository.

Impact

An external attacker could trigger AI execution without write access and, through prompt injection, cause the model to read and expose dynamically created cloud, registry or SSH credential files in workflow logs; verbosity modes made this leak easier, and the text notes defences are only probabilistic.

What the attacker needed

Workflow allows all or named bots; attacker can create a GitHub App; allowed bot name is unreserved; or Dependabot is trusted by the workflow

The fix

OpenAI added a more granular bot-user setting and removed Dependabot from the trusted zone, while Anthropic updated its documentation; the authors also recommend author-association checks and avoiding verbosity mode in public repositories.

How it was found

  1. Enable the relaxed bot setting in the workflow, either allowing all bots or naming a specific bot.
  2. Create an external GitHub App, giving it the exact name of an allowed bot if one is available.
  3. Generate a token for that App and act on the repository so the workflow sees it as the triggering actor.
  4. Alternatively, trigger Dependabot on a pull request or issue so it appears as the author.
  5. Supply prompt-injected content that makes the AI read local credential files and print them.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

These AI helpers run inside GitHub workflows and are meant to only obey trusted people or bots. The check looked only at the name of whoever triggered the run, so anyone could make a bot account with a matching name and be treated as trusted. Once inside, they could type instructions that trick the AI into reading and printing secret files.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More by Shay Berkovich

View all

3 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.