Repository navigation
Build image on pull_request instead of pull_request_target - #106
Open
gvozdetsky wants to merge 1 commit into
Open
gvozdetsky wants to merge 1 commit into
gvozdetsky wants to merge 1 commit into
Conversation
GitHub blocks pull_request_target on public repositories by default
from 2026-12-02. It also ran 'git checkout ${{ github.head_ref }}' in a
shell with the Quay credentials available, so a branch name could
inject commands.
Check out the PR head by SHA and skip pull requests from forks, which
get no secrets under pull_request.
This was referenced Oct 26, 2026
Contributor
Author
|
About the red checks: |
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.
GitHub blocks
pull_request_targeton public repositories by default from 2026-12-02 (currently in evaluate mode, see https://docs.github.com/en/actions/reference/security/securely-using-pull_request_target). After that date the image build would stop running for every PR.pull_requestinstead ofpull_request_target.actions/checkoutinstead ofgit fetch+git checkout ${{ github.head_ref }}. The old step put the branch name, which the PR author chooses, straight into a shell running withQUAY_QUARRY_*and the job token available.pull_request, so the Quay login would fail. To build a fork's image, a maintainer pushes the branch to this repository.update-container-tags.yamlalready runs onpull_requestand isn't changed.Note for admins: Dependabot-triggered
pull_requestruns only see Dependabot secrets. If Dependabot PRs should build images, addQUAY_QUARRY_USERandQUAY_QUARRY_PASSWORDas Dependabot secrets too.Same change in the shared workflow: toolforge/github-actions#6.