Edge Schema
- Source: GH_RepoRole
- Destination: GH_Repository, GH_Branch
- Traversable: ✅
General Information
The traversable GH_CanPwnRequest edge indicates that a repository role can exploit a pwn-requestable workflow to execute arbitrary code with the base branch’s secrets,GITHUB_TOKEN permissions, and OIDC identity. This is a computed edge that combines workflow analysis with repository access and fork policy evaluation.
Pwn Request Conditions
A workflow is considered pwn-requestable (is_pwn_requestable = true) when all of the following are true:
pull_request_targettrigger: The workflow is triggered bypull_request_target, which runs in the context of the base branch and has access to the base branch’s secrets and permissions.- Attacker-controlled checkout: A step uses
actions/checkoutwith arefparameter pointing to the pull request head, meaning attacker-supplied code from the fork replaces the trusted repository contents. Detected ref patterns:${{ github.event.pull_request.head.sha }}${{ github.event.pull_request.head.ref }}${{ github.head_ref }}
Edge Drawing Conditions
An edge is drawn from a GH_RepoRole to the repository and its branches when:- Read access: The role has a GH_ReadRepoContents edge to the repository.
- Forkability: The repository can be forked by the role holder.
- Pwn-requestable workflow: The repository has at least one workflow with
is_pwn_requestable = true.
Attack Impact
An attacker who exploits a pwn request gains code execution in the workflow runner with access to:- Repository secrets scoped to the base branch
- Organization secrets accessible by the repository
GITHUB_TOKENwith the workflow’s declared permissions- OIDC tokens if
id-token: writeis set, enabling cloud identity assumption via GH_CanAssumeIdentity - Environment secrets if the workflow job targets a deployment environment
Caveats
- OIDC traversal requires
id-token: write: The attack chain from GH_CanPwnRequest through GH_CanAssumeIdentity to a cloud role is only valid if the pwn-requestable workflow or job explicitly declaresid-token: write. GITHUB_TOKENpermissions: Thepermissions:block controls what the token can do, but does not limit secret access, OIDC token requests, or arbitrary code execution.