From 9cce3d8190ff07c576afd0dd548e446dd4b62abe Mon Sep 17 00:00:00 2001 From: versnic <37933264+versnic@users.noreply.github.com> Date: Sat, 7 Nov 2026 15:04:09 +0100 Subject: [PATCH] docs: note the pull_request_target safety invariant in pr-labels --- .github/workflows/pr-labels.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/pr-labels.yml b/.github/workflows/pr-labels.yml index 4b33a01..f7c6ef7 100644 --- a/.github/workflows/pr-labels.yml +++ b/.github/workflows/pr-labels.yml @@ -10,6 +10,11 @@ name: Pull request labels # from forks. It is safe here because the job never checks out or runs code # from the pull request: it only reads the title, through an environment # variable, never interpolated into the script. +# +# Keep it safe: never add a checkout of the pull request to this workflow, and +# never interpolate ${{ github.event.* }} straight into a run: block — pass +# untrusted fields through env, as below. Either change would let any GitHub +# user run code or shell commands with this job's write token. on: pull_request_target: # zizmor: ignore[dangerous-triggers] no pull request code is checked out or run types: [opened, edited, reopened]