Skip to content

Commit 05be86b

Browse files
authored
update gha file to mitigate Fork Network Manipulation vuln
1 parent 2cc231c commit 05be86b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040

4141
codecov:
4242
runs-on: ubuntu-latest
43-
environment: ${{ github.event.pull_request.head.repo.fork == true && 'prod-external' || 'prod' }}
43+
environment: ${{ (github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository) && 'prod-external' || 'prod' }}
4444
needs: changes
4545
if: ${{ contains(fromJSON(needs.changes.outputs.paths), 'src') }}
4646
steps:
@@ -82,7 +82,7 @@ jobs:
8282

8383
e2e-tests:
8484
runs-on: ubuntu-latest
85-
environment: ${{ github.event.pull_request.head.repo.fork == true && 'prod-external' || 'prod' }}
85+
environment: ${{ (github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository) && 'prod-external' || 'prod' }}
8686
needs: changes
8787
if: ${{ contains(fromJSON(needs.changes.outputs.paths), 'src') }}
8888
env:

0 commit comments

Comments
 (0)