vulns.co
/
GKData.io MCP

Back to Gadgets

pull_request_target checks out pull request code

pull_request_target is a GitHub Actions trigger that runs in the context of the base repository, not the fork, so the workflow can see secrets and the base token that a fork pull_request run would not. That context is dangerous when the workflow checks out…

Tags: supply-chain, github-actions, ci, github

Typical severity: P2-P4

What it becomes

Low alone when the workflow does not run pull request code, and it becomes exposure of secrets or a repository write when pull_request_target checks out that code and runs it with base-repository privileges.

Where to look

  • workflow files on the default branch
  • triggers on pull_request_target
  • checkout steps whose ref is the pull request head

Chains

  • Secret exposure: The workflow uses pull_request_target, checks out pull request code, and that code runs where base-repository secrets are available.
  • Repository write: The same checkout runs with the base repository token, so pull request code acts as the repository rather than as the fork.

Notes

  • Describe the condition. Do not add a workflow that executes untrusted code, and do not run a test against a repository the program has not put in scope.
  • A missing integrity check on a published artifact is closer to OWASP Top 10:2025 A08. A03 is the supply-chain failure around the pipeline. Name the one you mean.