Skip to content

Commit 212cb63

Browse files
committed
[ci] Don't use pull_request_target
`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.
1 parent 7a44ebf commit 212cb63

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

.github/workflows/compiler_discord_notify.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: (Compiler) Discord Notify
22

33
on:
4-
pull_request_target:
4+
pull_request:
55
types: [opened, ready_for_review]
66
paths:
77
- compiler/**

.github/workflows/runtime_discord_notify.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: (Runtime) Discord Notify
22

33
on:
4-
pull_request_target:
4+
pull_request:
55
types: [opened, ready_for_review]
66
paths-ignore:
77
- compiler/**

.github/workflows/shared_label_core_team_prs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: (Shared) Label Core Team PRs
22

33
on:
4-
pull_request_target:
4+
pull_request:
55

66
permissions: {}
77

0 commit comments

Comments
 (0)