-
Notifications
You must be signed in to change notification settings - Fork 48.4k
[ci] Don't use pull_request_target #32708
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
Comparing: fe8c106...399224e Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: (No significant changes) |
poteto
added a commit
that referenced
this pull request
Mar 21, 2025
Missed these ones earlier. --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/32707). * #32708 * __->__ #32707
`pull_request_target` gives access to repository secrets and permissions for use from forks, for example to add a comment. > Due to the dangers inherent to automatic processing of PRs, GitHub’s standard pull_request workflow trigger by default prevents write permissions and secrets access to the target repository. However, in some scenarios such access is needed to properly process the PR. To this end the pull_request_target workflow trigger was introduced. > The reason to introduce the pull_request_target trigger was to enable workflows to label PRs (e.g. needs review) or to comment on the PR. (via https://securitylab.github.com/resources/github-actions-preventing-pwn-requests/) In this case there is no reason for us to allow this, so let's just use the normal `pull_request` trigger which is less permissive.
poteto
added a commit
that referenced
this pull request
Mar 21, 2025
Missed one --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/32709). * #32708 * __->__ #32709
poteto
added a commit
to reactjs/react.dev
that referenced
this pull request
Mar 21, 2025
Defaults permissions to none for all workflows, and only request extra permissions when needed. Similar to facebook/react#32708, prefer the less permissive `pull_request` trigger instead.
poteto
added a commit
to reactjs/react.dev
that referenced
this pull request
Mar 21, 2025
Defaults permissions to none for all workflows, and only request extra permissions when needed. Similar to facebook/react#32708, prefer the less permissive `pull_request` trigger instead.
poteto
added a commit
to reactjs/react.dev
that referenced
this pull request
Mar 21, 2025
* [ci] Fix permissions and don't use pull_request_target Defaults permissions to none for all workflows, and only request extra permissions when needed. Similar to facebook/react#32708, prefer the less permissive `pull_request` trigger instead. * [ci] Pin 3rd party actions to specific hash
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.
pull_request_target
gives access to repository secrets and permissions for use from forks, for example to add a comment.(via https://securitylab.github.com/resources/github-actions-preventing-pwn-requests/)
In this case there is no reason for us to allow this, so let's just use the normal
pull_request
trigger which is less permissive.Stack created with Sapling. Best reviewed with ReviewStack.