chore(cli-integ): integ workflow cannot check out pull requests from forks - #1846
Merged
Merged
Conversation
v7 refuses to check out a pull request head from a fork unless `allow-unsafe-pr-checkout` is set. The integ workflow deliberately runs fork code from `pull_request_target`, so opt in explicitly and document why it is safe here.
Contributor
Dependency ReviewThe following issues were found:
License Issues.github/workflows/integ.yml
OpenSSF Scorecard
Scanned Files
|
aws-cdk-automation
enabled auto-merge
August 18, 2026 11:57
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1846 +/- ##
==========================================
- Coverage 90.35% 90.30% -0.05%
==========================================
Files 80 80
Lines 12159 12159
Branches 1727 1725 -2
==========================================
- Hits 10986 10980 -6
- Misses 1139 1145 +6
Partials 34 34
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
rix0rrr
approved these changes
Aug 18, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This unblocks the CLI integration test workflow, which can no longer check out the head commit of a pull request from a fork.
actions/checkoutnow refuses that by default, on both v6 and v7, because checking out fork code from apull_request_targetworkflow means running untrusted code in a privileged context. Our integ workflow does exactly that on purpose: it exists to run a contributor's changes against real AWS environments, so checking out the fork head is the whole point and the workflow cannot function without it. We therefore opt back in withallow-unsafe-pr-checkoutand leave a comment recording why.This is safe for the same reasons it was before the input existed. The workflow already pins the checkout to
head.sharather thanhead.refto avoid a TOCTOU attack where the branch is moved after approval, obtaining OIDC credentials for a throwaway test environment is the intended outcome, and every other credential the workflow touches sits behind a GitHub environment protection rule that requires a maintainer to approve the run.The bump from v6 to v7 is incidental tidiness rather than a requirement — the new input is available in both — but since we are touching this step anyway it may as well move to the current major.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license