Thanks to visit codestin.com
Credit goes to github.com

Skip to content

chore(deps): bump the github-actions group across 1 directory with 4 updates#3085

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/github_actions/github-actions-49b2b0c8f1
Open

chore(deps): bump the github-actions group across 1 directory with 4 updates#3085
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/github_actions/github-actions-49b2b0c8f1

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Jul 10, 2026

Copy link
Copy Markdown
Contributor

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore <dependency name> major version will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
  • @dependabot ignore <dependency name> minor version will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
  • @dependabot ignore <dependency name> will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
  • @dependabot unignore <dependency name> will remove all of the ignore conditions of the specified dependency
  • @dependabot unignore <dependency name> <ignore condition> will remove the ignore condition of the specified dependency and ignore conditions

…updates

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: anthropics/claude-code-action
  dependency-version: 1.0.159
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
- dependency-name: actions/github-script
  dependency-version: 9.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: zizmorcore/zizmor-action
  dependency-version: 0.5.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file github_actions Pull requests that update GitHub Actions code labels Jul 10, 2026
Comment on lines +119 to 122
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
ref: ${{ needs.authorize.outputs.head_sha }}
persist-credentials: false

Copy link
Copy Markdown
Contributor

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 new allow-unsafe-pr-checkout: true input 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), add allow-unsafe-pr-checkout: true to 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 a pull_request_target- or workflow_run-triggered workflow unless the new allow-unsafe-pr-checkout input is explicitly set to true (it defaults to false). 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 on pull_request_target and checks out ref: ${{ needs.authorize.outputs.head_sha }}, which the authorize job sets verbatim from context.payload.pull_request.head.sha.

The exact code path (verified against the pinned SHA 9c091bb, tag v7.0.0):

  1. src/input-helper.ts (lines 75–77) reclassifies a 40-hex ref input as result.commit with result.ref = ''.
  2. src/input-helper.ts (lines 166–176) reads allow-unsafe-pr-checkout (default false) and calls assertSafePrCheckout() unconditionally during input parsing — before any fetch.
  3. src/unsafe-pr-checkout-helper.ts throws "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 matches pull_request.head.sha (the prShas list also includes merge_commit_sha).

Step-by-step proof. A repository admin opens (or pushes to) a fork PR touching docs/**, docs_src/**, mkdocs.yml, scripts/docs/**, or pyproject.toml:

  1. docs-preview.yml triggers on pull_request_target; authorize outputs head_sha = context.payload.pull_request.head.sha and authorized = true (admin sender).
  2. build runs actions/checkout@v7 with ref: <head_sha> → reclassified as commit.
  3. Guard evaluation: event is 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.
  4. build fails; comment runs (always() + authorized) with DEPLOY_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 authorize job, build isolated from all secrets, static site handed to deploy via 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 on headRepoId === baseRepoId. The breakage is silent until the next fork-PR docs change. The /preview-docs slash-command path is unaffected (issue_comment returns 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_call triggers, 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 of require('@actions/github'), injected getOctokit) don't intersect with the inline scripts in docs-preview.yml.

Fix. Add allow-unsafe-pr-checkout: true to the build job's checkout step in docs-preview.yml (likely with a zizmor ignore comment mirroring the existing dangerous-triggers ignore), or hold this one checkout at v6. One line either way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file github_actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants