Update checkout validation

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Francesco Renzi
2026-11-30 10:53:56 +01:00
parent f548e57e54
commit a4ddf0647e
6 changed files with 268 additions and 74 deletions

View File

@@ -5,6 +5,7 @@
## What's new
- Safer fork pull request handling: checkout now refuses to check out fork pull request code by default when the workflow is triggered by `pull_request_target` or `workflow_run`. These triggers run with the base repository's `GITHUB_TOKEN`, secrets, and runner access, where executing a fork's code commonly leads to "pwn request" vulnerabilities.
- When a fork pull request triggers a `workflow_run`, checkout only accepts explicit commit SHAs in the workflow commit's history for the same repository by default. Pins other than the workflow commit need a GitHub API comparison with `contents: read` permission. If the comparison cannot verify the pin, use a trusted branch ref instead.
- To opt in after [reviewing the risks](https://gh.io/securely-using-pull_request_target), set the new `allow-unsafe-pr-checkout: true` input.
- Migrated `actions/checkout` to ESM to support new versions of the `@actions/*` packages.
- Updated direct and transitive dependencies, including security fixes for known vulnerabilities.