Skip to content
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

MA-16612: replace pull_request_target with pull_request to protect ag… #497

Merged
merged 1 commit into from
Jan 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 1 addition & 17 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
name: 'Pull Request'

# > Про 'pull_request_target' и про риски его использования можно ознакомиться в статье по ссылке ниже
# > https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
#
# При 'pull_request_target' свойство `github.ref` будет соответствовать `refs/head/master`, поэтому необходимо
# вручную перебивать его на `github.event.pull_request.number` там, где это необходимо.
#
# Пример:
# ```
# - uses: actions/checkout@v3
# with:
# ref: refs/pull/${{ github.event.pull_request.number }}/merge
# ```
on: ['pull_request_target']
on: ['pull_request']

concurrency:
group: pr-common-${{ github.event.pull_request.number }}
Expand All @@ -25,8 +13,6 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: refs/pull/${{ github.event.pull_request.number }}/merge

- name: Setting up the repository environment
uses: ./.github/actions/setup
Expand All @@ -50,8 +36,6 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: refs/pull/${{ github.event.pull_request.number }}/merge

- name: Setting up the repository environment
uses: ./.github/actions/setup
Expand Down
Loading