Thanks to visit codestin.com
Credit goes to github.com

Skip to content

CI Update actions/checkout to v7 - #34365

Merged
ogrisel merged 1 commit into
scikit-learn:mainfrom
betatim:upgrade-checkout-action
Jun 22, 2026
Merged

CI Update actions/checkout to v7#34365
ogrisel merged 1 commit into
scikit-learn:mainfrom
betatim:upgrade-checkout-action

Conversation

@betatim

@betatim betatim commented Jun 22, 2026

Copy link
Copy Markdown
Member

What does this implement/fix? Explain your changes.

Update the actions/checkout action to v7 from v6. This makes it harder to checkout code from a fork instead of the main repo when running with pull_request_target trigger. See https://github.com/actions/checkout#checkout-v7

We aren't effected by this restriction, but it seems like an easy thing to do in order to prevent accidents.

AI usage disclosure

I used AI assistance for:

  • Code generation (e.g., when writing an implementation or fixing a bug)

xref #34006

This makesi t harder to checkout code from a fork instead of the main
repo when running with `pull_request_target` trigger.

@lorentzenchr lorentzenchr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM once CI is green

@ogrisel

ogrisel commented Jun 22, 2026

Copy link
Copy Markdown
Member

I triggered the CUDA CI on this PR since one of the workflow that uses pull_request_target.

@ogrisel
ogrisel enabled auto-merge (squash) June 22, 2026 14:42
@ogrisel
ogrisel merged commit b2958e8 into scikit-learn:main Jun 22, 2026
63 of 65 checks passed
@betatim
betatim deleted the upgrade-checkout-action branch June 22, 2026 14:55
@lesteve

lesteve commented Jul 23, 2026

Copy link
Copy Markdown
Member

Not that it really matters but the problematic pattern is a combination of:

  • pull_request_target
  • checkout explicitly checking the author PR branch (by default pull_request_target checkout uses main so that you don't run the user code with elevated permissions)

We don't do this in scikit-learn so we are kind of fine but yeah it's easy to forget the details. Probably everything is explained here.

prady0t pushed a commit to prady0t/scikit-learn that referenced this pull request Sep 2, 2026
@jeremiedbb jeremiedbb mentioned this pull request Sep 8, 2026
14 tasks
jeremiedbb pushed a commit to jeremiedbb/scikit-learn that referenced this pull request Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants