File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -61,15 +61,17 @@ jobs:
6161 tests :
6262 name : Tests
6363 runs-on : ubuntu-latest
64- # SECURITY: Use environment protection for external contributors
65- environment : ${{ github.event.pull_request.head.repo.full_name != github.repository && 'external-testing' || '' }}
64+ # SECURITY: Use environment protection for external contributors only
65+ # Push events and internal PRs run without environment protection
66+ # External PRs require manual approval via 'external-testing' environment
67+ environment : ${{ (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) && '' || 'external-testing' }}
6668 # Run tests with secrets for:
6769 # 1. Push to main (trusted), OR
68- # 2. PR from same repository (trusted)
69- # For external PRs: environment protection requires manual approval
70+ # 2. PR from same repository (trusted), OR
71+ # 3. External PR ( requires manual approval via environment protection)
7072 if : |
7173 github.event_name == 'push' ||
72- ( github.event.pull_request.head.repo.full_name == github.repository)
74+ github.event_name == 'pull_request_target'
7375
7476 steps :
7577 - name : Checkout sources
You can’t perform that action at this time.
0 commit comments