Navigation Menu

Skip to content

Can pull requests change actions? #27084

Discussion options

You must be logged in to vote

Pull requests can have their branch either in the source repo (yours) or a forked repo.

  • Only users with write access to your repo can push to and create new branches in your repo, so it is assumed that they are trustworthy.

  • If the head branch is in a forked repo (external contributor), there is no access to secrets in the workflow. They will simply be not set. This applies to on: pull_request

  • With on: pull_request_target as trigger, secrets can be accessed, but the workflow of the base branch is used (so the version trusted by you). Any changes done to .github/workflows/ by the PR are ignored, which should prevent malicious users from leaking secrets. Note that also the code of the …

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants