Edge Schema
- 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 (not the fork) 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 (read access is the minimum required to fork).
- Forkability: The repository can be forked by the role holder:
- Public repos: Always forkable by anyone on GitHub.
- Private/internal repos: Requires both the organization setting
members_can_fork_private_repositories = trueAND the repository settingallow_forking = true.
- Pwn-requestable workflow: The repository has at least one workflow with
is_pwn_requestable = true.
Branch Targeting
- If the
pull_request_targettrigger has abranches:filter (e.g.,branches: [main]), edges are drawn only to matching branches and the repository. - If unconstrained, edges are drawn to the repository and all of its branches.
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_TOKEN with the workflow’s declared permissions (often
write) - 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: writein itspermissions:block. Theid-tokenpermission defaults tononeand is never implicitly granted — even when the workflow has nopermissions:block at all. Thepermissionsproperty on the GH_WorkflowJob node can be inspected to verify this. - GITHUB_TOKEN permissions: The
permissions:block controls what theGITHUB_TOKENcan do (e.g., push commits, create releases), but has no effect on secret access, OIDC token requests (governed separately byid-token), or arbitrary code execution. A workflow withcontents: readis still fully exploitable via pwn request for secret exfiltration and lateral movement — only write-back to the repository is limited.