Skip to content

fix: use pull_request instead of pull_request_target for run-tests - #117

Open
vtushar06 wants to merge 1 commit into
opencost:mainfrom
vtushar06:fix-pull-request-target-checkout
Open

fix: use pull_request instead of pull_request_target for run-tests#117
vtushar06 wants to merge 1 commit into
opencost:mainfrom
vtushar06:fix-pull-request-target-checkout

Conversation

@vtushar06

Copy link
Copy Markdown
Contributor

One-liner. run-tests doesn't use any secrets, just runs go vet + bats against the public demo URLs, so pull_request_target was giving it elevated access it doesn't need, and now actions/checkout refuses to even check out fork code under that trigger. Switched to plain pull_request, which also happens to fix set-labels's if condition (it was checking for pull_request while the trigger was pull_request_target, so it never actually ran).

Didn't use allow-unsafe-pr-checkout: true, that would bring back the exact risk the checkout guard is there to prevent.

Fixes #116

@vtushar06
vtushar06 requested a review from a team as a code owner July 25, 2026 16:36
Copilot AI review requested due to automatic review settings July 25, 2026 16:36

Copilot AI left a comment

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@vtushar06

Copy link
Copy Markdown
Contributor Author

heads up, you'll see two run-tests entries here, the failing 7s one is the old pull_request_target run using base's current workflow, the passing 1m48s one is the new pull_request trigger from this branch actually running the suite. only the second one exists once this merges

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.

run-tests CI blocks all fork PRs: pull_request_target + checkout hardening

2 participants