Skip to content

fix(ci): allow fork-PR checkout in label-gated e2e workflow#1017

Merged
DorianZheng merged 1 commit into
mainfrom
fix/e2e-fork-checkout-optin
Jul 22, 2026
Merged

fix(ci): allow fork-PR checkout in label-gated e2e workflow#1017
DorianZheng merged 1 commit into
mainfrom
fix/e2e-fork-checkout-optin

Conversation

@DorianZheng

@DorianZheng DorianZheng commented Jul 22, 2026

Copy link
Copy Markdown
Member

Why

actions/checkout v5.1.0 (2026-07-20) refuses to fetch fork PR code in pull_request_target workflows unless the step opts in via allow-unsafe-pr-checkout: true. Every fork PR now fails e2e at the Checkout step (first hit: #1016, run 29919073197):

Refusing to check out fork pull request code from a 'pull_request_target' workflow. … set 'allow-unsafe-pr-checkout: true' on the actions/checkout step.

What

Opt the e2e-tests Checkout step in. The mitigations the gate asks for already exist in this workflow: fork runs are gated on the maintainer-applied e2e-local label pinned to the approved head SHA (re-label per push), the job holds no secrets, and the token is contents: read with persist-credentials: false.

Note: actionlint ≤1.7.11 flags the input as unknown — stale bundled schema; the input is defined in action.yml at the SHA v5 resolves to.

After merge: remove and re-add the e2e-local label on #1016 to re-run e2e against the fixed workflow definition (pull_request_target reads the workflow from main, so the fix takes effect only once merged).

https://claude.ai/code/session_019NzYgutK3RsJupnSe16M1w

Summary by CodeRabbit

  • Tests
    • Updated end-to-end test workflow configuration to support approved fork-based pull requests.
    • Added safety documentation clarifying the workflow’s restricted execution and permissions.

actions/checkout v5.1.0 (2026-07-20) refuses to fetch fork PR code in
pull_request_target workflows unless the step opts in via
allow-unsafe-pr-checkout: true, failing e2e at the Checkout step for
every fork PR (first hit: PR #1016, run 29919073197).

Opt in: the mitigations the gate asks for are already in place — the
run is label-gated to the maintainer-approved head SHA, the e2e-tests
job holds no secrets, and the token is read-only with
persist-credentials: false.

Claude-Session: https://claude.ai/code/session_019NzYgutK3RsJupnSe16M1w
@DorianZheng
DorianZheng requested a review from a team as a code owner July 22, 2026 12:42
@boxlite-agent

boxlite-agent Bot commented Jul 22, 2026

Copy link
Copy Markdown

📦 BoxLite review — couldn't complete

claude exited 1

stdout:
{"type":"result","subtype":"success","is_error":true,"api_error_status":403,"duration_ms":344,"duration_api_ms":0,"num_turns":1,"result":"Your organization has disabled Claude subscription access for Claude Code · Use an Anthropic API key instead, or ask your admin to enable access","stop_reason":"stop_sequence","session_id":"3d7a6d36-6941-4dde-8f5f-17afc430e9fc","total_cost_usd":0,"usage":{"input_tokens":0,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":0,"server_tool_use":{"web_search_requests":0,"web_fetch_requests":0},"service_tier":"standard","cache_creation":{"ephemeral_1h_input_tokens":0,"ephemeral_5m_input_tokens":0},"inference_geo":"","iterations":[],"speed":"standard"},"modelUsage":{},"permission_denials":[],"terminal_reason":"api_error","fast_mode_state":"off","uuid":"0c02306d-3011-420a-b93c-bb5d473bd3c9"}

stderr:
<empty>

powered by BoxLite

@DorianZheng
DorianZheng merged commit 90ed031 into main Jul 22, 2026
22 of 23 checks passed
@cla-assistant

cla-assistant Bot commented Jul 22, 2026

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


tester seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@DorianZheng
DorianZheng deleted the fix/e2e-fork-checkout-optin branch July 22, 2026 12:42
@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: be03af97-1cc1-44bf-9554-12f74e35d609

📥 Commits

Reviewing files that changed from the base of the PR and between ba70f29 and 104950f.

📒 Files selected for processing (1)
  • .github/workflows/e2e-local.yml

📝 Walkthrough

Walkthrough

The persistent-runner E2E workflow enables allow-unsafe-pr-checkout: true for actions/checkout@v5 and documents the label-gated execution and limited token/secrets model.

Changes

E2E checkout

Layer / File(s) Summary
Enable fork-PR checkout override
.github/workflows/e2e-local.yml
The checkout step enables unsafe fork-PR checkout and adds comments describing the workflow’s safety conditions.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

Suggested reviewers: xhebox

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/e2e-fork-checkout-optin

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Checkov (3.3.8)
.github/workflows/e2e-local.yml

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant