Skip to content

Commit eb30b2d

Browse files
authored
fix: restrict pull_request_target prettier workflow to same-repo PRs (#4888)
1 parent 1d36a6d commit eb30b2d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.github/workflows/prettier.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ concurrency:
1010

1111
jobs:
1212
format:
13+
# ---------------------------------------------------------
14+
# SAFETY CHECK:
15+
# Only run for PRs from the SAME repository.
16+
# Fork PRs are skipped entirely to prevent RCE via npm install.
17+
# ---------------------------------------------------------
18+
if: ${{ github.event.pull_request.head.repo.fork == false }}
1319
permissions:
1420
contents: write
1521
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)