-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Bump the github-actions group across 1 directory with 6 updates #3234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
dependabot
wants to merge
1
commit into
main
Choose a base branch
from
dependabot/github_actions/github-actions-8a4519436a
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔴 actions/checkout v7's new fork-PR guard (actions/checkout#2454) will make the
buildjob's checkout step fail for any fork-opened PR: the step runs underpull_request_targetwithrefset to the PR head SHA, which v7 refuses unlessallow-unsafe-pr-checkout: trueis set. Since this checkout of PR code is the workflow's deliberate, admin-gated and secret-isolated design (per the header comment), addallow-unsafe-pr-checkout: trueto this step, noting theauthorizejob as the compensating control.Extended reasoning...
What breaks. actions/checkout v7.0.0's headline breaking change (actions/checkout#2454, also backported to v6.1.0) adds a guard that refuses to check out a fork PR's head when the workflow was triggered by
pull_request_targetorworkflow_run, unless the newallow-unsafe-pr-checkout: trueinput is set. Thebuildjob indocs-preview.ymlis triggered bypull_request_targetand explicitly checks out the PR head viaref: ${{ needs.authorize.outputs.head_sha }}— exactly the pattern the new guard blocks. After this bump, every admin-authorized auto-preview of a PR opened from a fork fails at the checkout step withRefusing to check out fork pull request code from a pull_request_target workflow.Why the v7.0.1 relaxation doesn't help. v7.0.1 (actions/checkout#2518) skips the guard only when the
refinput is left at its default. Verified against the pinned commit3d3c42e: insrc/input-helper.ts,isDefaultCheckout = isWorkflowRepository && !core.getInput('ref')— this job setsrefexplicitly, soassertSafePrCheckoutstill runs.Step-by-step proof (traced through the pinned v7.0.1 source). A maintainer with admin opens a docs PR from their fork; the
authorizejob approves it and outputshead_sha = context.payload.pull_request.head.sha. In thebuildjob's checkout step:input-helper.ts:refinput is non-empty →isDefaultCheckoutis false → the guard runs.unsafe-pr-checkout-helper.ts:eventName === 'pull_request_target'matches; the 40-hexrefinput is reclassified asinput.commit.pull_request.head.shafrom the event payload intoprShas; the workflow passed precisely that SHA, socommitMatchesPrHeadShais true.pull_request.head.repo.id !== repository.id(fork) andallow-unsafe-pr-checkoutis unset (defaultfalseinaction.yml) → the step throws and the build job fails.Why this is a deliberate capability, not an accident. The workflow's header comment documents this design explicitly: the build executes PR code, is gated by the
authorizejob (admin sender for auto-preview, admin/maintainer for/preview-docs), and is isolated from Cloudflare secrets — PR code never shares a runner with the deploy token. The exact risk v7's guard targets is already mitigated by an intentional, layered design, so the guard's failure here is a false positive for this workflow.Scope. Same-repo PRs are unaffected (
head.repo.id === repository.idreturns early), and theissue_comment/preview-docspath is unaffected (event name mismatch). No other workflow bumped in this PR checks out a PR head underpull_request_target/workflow_run, so this is the only affected location — but fork-opened PRs are common for maintainers, and the auto-preview path would regress silently until someone hits it.Fix. Add
allow-unsafe-pr-checkout: trueto this checkout step (with a brief comment — and a zizmor ignore if the new zizmor version flags it — documenting that theauthorizegate plus secret isolation are the compensating controls), then merge the bump.