GitHub Actions trust
pull_request_target runs in the base repository, which can include secrets and a privileged token. It becomes dangerous when that workflow checks out pull request code and runs it. Describe the condition. Do not run untrusted code on a repository you are not…
Tags: supply-chain, github-actions, ci
Level: advanced
Method
Read the workflow files you are allowed to see
Look at on: triggers, permissions:, and which secrets the job can reach. A public default workflow is not a finding.
Tools: browser
Separate pull_request from pull_request_target
pull_request from a fork runs with a restricted token. pull_request_target does not. The trigger name is the first fact.
Tools: browser
See what code the job executes
A checkout of the pull request head, or a script taken from the PR, inside a pull_request_target job is the dangerous shape. A job that only reads the PR title is a different, smaller question.
Tools: browser
OIDC to cloud
If the workflow requests an OIDC token for a cloud role, note which ref and event the cloud trust policy allows. A policy that trusts every pull request is the design note.
Tools: browser
Artifacts
An artifact uploaded by an untrusted job and downloaded by a privileged job is a handoff. Record the two jobs. Do not plant a file in a repository you do not own.
Tools: browser
Stay inside the program
CI is in scope only when the program says so. Reading a public workflow is not permission to open a pull request that runs it.
Tools: browser
Field notes
- OWASP Top 10:2025 A03 is the supply-chain category. A missing integrity check on one artifact is closer to A08.
- pinning third-party actions to a commit is a control. A floating tag is a lead, not automatically a paid bug.
- Do not print secrets in a log to prove they exist.