Skip to content

Allow unsafe pr checkout#2391

Open
brownbaerchen wants to merge 5 commits into
mainfrom
allow-unsafe-pr-checkout
Open

Allow unsafe pr checkout#2391
brownbaerchen wants to merge 5 commits into
mainfrom
allow-unsafe-pr-checkout

Conversation

@brownbaerchen

Copy link
Copy Markdown
Collaborator

This is the same as #2378, but no longer across forks. Otherwise, the changes don't take effect because we are still running with pull_request_target and the tests just fail.

I now understand copilot's comments in @2378: For triggering the codebase CI, we don't need the actual code that we want to test. It's suffices to checkout the current main, which contains the action that tells codebase what to check out.
So, by not specifying any ref in checkout, we checkout the base branch, which is safe as it is part of the main repo. This launches the action on codebase and codebase does whatever the PR includes. This may be malicious, but it can't extract secrets from us.

We can still choose if we want to always manually trigger workflows from external contributors or only from first time contributors, but I think this solution is good enough either way.

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.

@JuanPedroGHM

Copy link
Copy Markdown
Member

That is a smart idea. I would still keep setup to require approval for first time external people, but not checking their branch to launch the Codebase jobs is a good plan.

@github-project-automation github-project-automation Bot moved this from Todo to Merge queue in Roadmap Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Merge queue

Development

Successfully merging this pull request may close these issues.

3 participants