Skip to content

Commit 1ebe754

Browse files
kevinmessiaenclaude
andcommitted
ci: opt in to fork PR checkout for integration tests
actions/checkout v7 (backported to v4.4.0/v5.1.0/v6.1.0) refuses to check out fork PR code under pull_request_target without an explicit allow-unsafe-pr-checkout opt-in, so integration tests fail at the checkout step on every external contributor's PR. Set the flag on the three integration-test checkout steps and document the compensating controls. The CI environment now requires approval from the open-source-maintainers team before secrets are injected (server-enforced, per-run), which replaces the "safe for build" label as the primary gate; the label check and the immutable head.sha pin remain as defence in depth. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 3baf5ec commit 1ebe754

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

.github/workflows/integration-tests.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,14 @@ jobs:
8383
with:
8484
ref: ${{ github.event.pull_request.head.sha || github.ref }}
8585
persist-credentials: false
86+
# Deliberate opt-in: this job installs and executes fork-authored
87+
# code (make install, pytest) with live provider API keys in scope.
88+
# Compensating controls: the `ci` environment requires a reviewer to
89+
# approve each run before secrets are injected (server-enforced,
90+
# per-run), the authorize job requires a fresh `labeled` event for
91+
# external contributors, and the immutable head.sha pin keeps the
92+
# reviewed commit identical to the executed one.
93+
allow-unsafe-pr-checkout: true
8694
- uses: astral-sh/setup-uv@d31148d669074a8d0a63714ba94f3201e7020bc3 # v8.3.0
8795
with:
8896
enable-cache: true
@@ -135,6 +143,9 @@ jobs:
135143
with:
136144
ref: ${{ github.event.pull_request.head.sha || github.ref }}
137145
persist-credentials: false
146+
# Deliberate opt-in — see test-agents-functional for the full
147+
# rationale and compensating controls.
148+
allow-unsafe-pr-checkout: true
138149
- uses: astral-sh/setup-uv@d31148d669074a8d0a63714ba94f3201e7020bc3 # v8.3.0
139150
with:
140151
enable-cache: true
@@ -173,6 +184,9 @@ jobs:
173184
with:
174185
ref: ${{ github.event.pull_request.head.sha || github.ref }}
175186
persist-credentials: false
187+
# Deliberate opt-in — see test-agents-functional for the full
188+
# rationale and compensating controls.
189+
allow-unsafe-pr-checkout: true
176190
- uses: astral-sh/setup-uv@d31148d669074a8d0a63714ba94f3201e7020bc3 # v8.3.0
177191
with:
178192
enable-cache: true

0 commit comments

Comments
 (0)