Finds a repo using pull_request_target that also checks out PR code. Forks it and injects malicious build steps.
Submits a PR from the fork to the target repo. GitHub detects the event and schedules the privileged workflow.
Runs in the base repo context, granting the workflow:
actions/checkout fetches code from attacker's fork. Untrusted code is now on the runner alongside elevated credentials.
Malicious steps run as legitimate CI with write access and full access to all declared secrets.