-
Notifications
You must be signed in to change notification settings - Fork 3.6k
chore(deps): bump the github-actions group across 1 directory with 4 updates #3085
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-49b2b0c8f1
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.0.0's breaking change (actions/checkout#2454) refuses to check out fork-PR code from a
pull_request_target-triggered workflow unless the newallow-unsafe-pr-checkout: trueinput is set, so this bump deterministically breaks the docs-preview build for every admin-authorized fork PR — the checkout step throws and the comment job posts a false "Preview build failed" comment. Since this workflow already implements the isolation the guard enforces (admin-gated authorize, secret-free build, artifact handoff), addallow-unsafe-pr-checkout: trueto this checkout step (with a zizmor ignore if needed) or keep this one checkout at v6.Extended reasoning...
What breaks. checkout v7.0.0's headline breaking change (actions/checkout#2454) adds a guard,
assertSafePrCheckout(), that refuses to check out fork-PR head code from apull_request_target- orworkflow_run-triggered workflow unless the newallow-unsafe-pr-checkoutinput is explicitly set totrue(it defaults tofalse). This PR bumps the docs-preview build job's checkout to v7 without setting that input, and this job is exactly the case the guard targets: it runs onpull_request_targetand checks outref: ${{ needs.authorize.outputs.head_sha }}, which the authorize job sets verbatim fromcontext.payload.pull_request.head.sha.The exact code path (verified against the pinned SHA
9c091bb, tag v7.0.0):src/input-helper.ts(lines 75–77) reclassifies a 40-hexrefinput asresult.commitwithresult.ref = ''.src/input-helper.ts(lines 166–176) readsallow-unsafe-pr-checkout(defaultfalse) and callsassertSafePrCheckout()unconditionally during input parsing — before any fetch.src/unsafe-pr-checkout-helper.tsthrows"Refusing to check out fork pull request code from a pull_request_target workflow..."when all three hold:eventName === 'pull_request_target',pull_request.head.repo.id !== repository.id(any fork PR), and the resolved commit matchespull_request.head.sha(theprShaslist also includesmerge_commit_sha).Step-by-step proof. A repository admin opens (or pushes to) a fork PR touching
docs/**,docs_src/**,mkdocs.yml,scripts/docs/**, orpyproject.toml:docs-preview.ymltriggers onpull_request_target;authorizeoutputshead_sha = context.payload.pull_request.head.shaandauthorized = true(admin sender).buildrunsactions/checkout@v7withref: <head_sha>→ reclassified ascommit.pull_request_target✓; head repo id ≠ base repo id (fork) ✓;input.commit === pull_request.head.sha✓ (it was passed through verbatim). All conditions met → the checkout step throws.buildfails;commentruns (always()+ authorized) withDEPLOY_RESULT != 'success'and posts "❌ Preview build failed" on the PR. Before this bump (v6.0.3) the same run built fine.Why nothing else prevents it. The workflow already implements precisely the mitigations the v7 guard exists to enforce — admin-gated
authorizejob, build isolated from all secrets, static site handed todeployvia artifact,enable-cache: false— but the guard cannot see any of that; it keys only on event name + fork head-repo id + commit==head sha, all of which match here. Note also that this dependabot PR's own CI stays green: it's a same-repo PR, so the guard returns early onheadRepoId === baseRepoId. The breakage is silent until the next fork-PR docs change. The/preview-docsslash-command path is unaffected (issue_commentreturns early from the guard), so a manual workaround exists, but the auto-preview path is the workflow's documented primary flow.Scope of the rest of the PR. All other bumped checkout call sites run under
push/pull_request/release/issue_comment/workflow_calltriggers, none of which the guard inspects — they're fine. The other three bumps are also benign: all pinned SHAs match their claimed tags (github-script v9.0.0 =3a2844b, zizmor-action v0.5.7 =192e21d, claude-code-action v1.0.159 =a92e7c7), and github-script v9's breaking changes (removal ofrequire('@actions/github'), injectedgetOctokit) don't intersect with the inline scripts indocs-preview.yml.Fix. Add
allow-unsafe-pr-checkout: trueto the build job's checkout step indocs-preview.yml(likely with a zizmor ignore comment mirroring the existingdangerous-triggersignore), or hold this one checkout at v6. One line either way.