The Free Software Media System - Server Backend & API
Mitigate pull_request_target privilege escalation
Andrew Rabert01eb56f04753
diff --git a/.github/workflows/ci-compat.yml b/.github/workflows/ci-compat.ymlindex 23a82a1b2b..8e3717b332 100644--- a/.github/workflows/ci-compat.yml+++ b/.github/workflows/ci-compat.yml@@ -1,6 +1,6 @@name: ABI Compatibilityon:- pull_request_target:+ pull_request:permissions: {}@@ -77,7 +77,7 @@ jobs:pull-requests: write # to create or update comment (peter-evans/create-or-update-comment)name: ABI - Difference- if: ${{ github.event_name == 'pull_request_target' }}+ if: ${{ github.event_name == 'pull_request' }}runs-on: ubuntu-latestneeds:- abi-headdiff --git a/.github/workflows/ci-openapi.yml b/.github/workflows/ci-openapi.ymlindex 08eedd54f7..3d04ac5e0b 100644--- a/.github/workflows/ci-openapi.yml+++ b/.github/workflows/ci-openapi.yml@@ -5,7 +5,7 @@ on:- mastertags:- 'v*'- pull_request_target:+ pull_request:permissions: {}@@ -78,7 +78,7 @@ jobs:pull-requests: writename: OpenAPI - Difference- if: ${{ github.event_name == 'pull_request_target' }}+ if: ${{ github.event_name == 'pull_request' }}runs-on: ubuntu-latestneeds:- openapi-head@@ -109,7 +109,7 @@ jobs:publish-unstable:name: OpenAPI - Publish Unstable Spec- if: ${{ github.event_name != 'pull_request_target' && !startsWith(github.ref, 'refs/tags/v') && contains(github.repository_owner, 'jellyfin') }}+ if: ${{ github.event_name != 'pull_request' && !startsWith(github.ref, 'refs/tags/v') && contains(github.repository_owner, 'jellyfin') }}runs-on: ubuntu-latestneeds:- openapi-headdiff --git a/.github/workflows/commands.yml b/.github/workflows/commands.ymlindex 2c4efcc8ca..2adb8f1010 100644--- a/.github/workflows/commands.yml+++ b/.github/workflows/commands.yml@@ -4,7 +4,7 @@ on:types:- created- edited- pull_request_target:+ pull_request:types:- labeled- synchronizediff --git a/.github/workflows/project-automation.yml b/.github/workflows/project-automation.ymlindex 7b29d3c817..9a9f3214a7 100644--- a/.github/workflows/project-automation.yml+++ b/.github/workflows/project-automation.yml@@ -4,7 +4,7 @@ on:push:branches:- master- pull_request_target:+ pull_request:issue_comment:permissions: {}diff --git a/.github/workflows/pull-request-conflict.yml b/.github/workflows/pull-request-conflict.ymlindex e6a9bf0caa..b003636a6e 100644--- a/.github/workflows/pull-request-conflict.yml+++ b/.github/workflows/pull-request-conflict.yml@@ -4,7 +4,7 @@ on:push:branches:- master- pull_request_target:+ pull_request:issue_comment:permissions: {}@@ -16,7 +16,7 @@ jobs:steps:- name: Apply labeluses: eps1lon/actions-label-merge-conflict@1df065ebe6e3310545d4f4c4e862e43bdca146f0 # v3.0.3- if: ${{ github.event_name == 'push' || github.event_name == 'pull_request_target'}}+ if: ${{ github.event_name == 'push' || github.event_name == 'pull_request'}}with:dirtyLabel: 'merge conflict'commentOnDirty: 'This pull request has merge conflicts. Please resolve the conflicts so the PR can be successfully reviewed and merged.'