Stop the release check workflow from executing pull request code - #261
Merged
Merged
Conversation
Ckk3
marked this pull request as ready for review
August 31, 2026 21:58
Ckk3
added a commit
that referenced
this pull request
Aug 31, 2026
* Drop Python 3.8/3.9 support and require Python 3.10+ * Migrate BigInt scalar to StrawberryConfig.scalar_map * Update relay types and tests for newer strawberry-graphql * Update dependencies and lint configuration * add RELEASE.md * fix release-file-check action * Stop the release check workflow from executing pull request code (#261) fix release-file-check action * Drop Python 3.8/3.9 support and require Python 3.10+ * Migrate BigInt scalar to StrawberryConfig.scalar_map * Update relay types and tests for newer strawberry-graphql * Update dependencies and lint configuration * add RELEASE.md * Remove comments from scalars.py
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
The release check workflow runs on
pull_request_target, which executes with the baserepository's secrets and token. It then checked out the pull request's own code and ran
./.github/release-check-actionfrom it, so a fork could replace that action and have it executein a trusted context — the "pwn request" pattern.
actions/checkoutnow refuses this by default, which currently breaks the release check for everypull request opened from a fork:
The action only needs to read
RELEASE.md. This changes the job to check out the base repository,so the action itself is trusted code, and to take only
RELEASE.mdfrom the pull request, whereit is parsed as data:
Because the fork's ref is never passed to
actions/checkout,allow-unsafe-pr-checkoutis notneeded.
Also in this PR:
permissions: contents: readat the workflow level. Thesend-commentjob posts throughits own API and does not use
GITHUB_TOKEN, so nothing needs more than read access.actions/checkoutfrom v2 to v4 in both jobs, which clears the Node 20 deprecationwarning.
This is kept separate from
#260 because
pull_request_targetalways runs the workflow from the base branch, so the fix has to land on
mainbefore any pullrequest can benefit from it. This PR touches no path that triggers the release check, so it is not
blocked by the bug it fixes.
Types of Changes
Issues Fixed or Closed by This PR
Checklist
Summary by Sourcery
Secure the release check workflow by running trusted base-branch code and treating pull request release metadata as data.
Bug Fixes:
Enhancements:
CI: