You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Switches the Triage workflow trigger from pull_request to pull_request_target so the auto-labeler can actually apply labels and post a commit status on PRs from forks (e.g. #2845), where GITHUB_TOKEN is forced read-only under pull_request.
Safe because neither job in this workflow checks out PR code — both pinned actions (action-semantic-pull-request, multi-labeler) only read PR metadata via the API, with no shell interpolation of untrusted PR fields.
Many online resources suggest that pull_request_target and other dangerous triggers can be used securely by ensuring that the PR's code is not executed, but this is not true: an attacker can often find ways to execute code in the context of the target repository, even if the workflow doesn't explicitly run any code from the PR. Common vectors for this include argument injection (e.g. with xargs), environment injection (e.g. LD_PRELOAD), and local file inclusion (e.g. relinking files to the runner's credentials file or similar).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Switches the Triage workflow trigger from
pull_requesttopull_request_targetso the auto-labeler can actually apply labels and post a commit status on PRs from forks (e.g. #2845), whereGITHUB_TOKENis forced read-only underpull_request.Safe because neither job in this workflow checks out PR code — both pinned actions (
action-semantic-pull-request,multi-labeler) only read PR metadata via the API, with no shell interpolation of untrusted PR fields.