Skip to content

Commit c3bf92d

Browse files
ionmincuclaude
andcommitted
ci: gate triggers on PR author instead of github.actor
SonarCloud flagged the use of github.actor in the actor gate as forgeable — on a re-run by a maintainer, github.actor becomes that maintainer rather than the original PR author, which would let a malicious PR bypass the gate. Switch to github.event.pull_request.user.login, which is the immutable original author set by GitHub from the authenticated session. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent f83fd60 commit c3bf92d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/integration_tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ jobs:
2323
discover-testcases:
2424
if: |
2525
github.event_name == 'push' ||
26-
(github.event_name == 'pull_request' && github.actor != 'dependabot[bot]') ||
27-
(github.event_name == 'pull_request_target' && github.actor == 'dependabot[bot]')
26+
(github.event_name == 'pull_request' && github.event.pull_request.user.login != 'dependabot[bot]') ||
27+
(github.event_name == 'pull_request_target' && github.event.pull_request.user.login == 'dependabot[bot]')
2828
runs-on: ubuntu-latest
2929
outputs:
3030
testcases: ${{ steps.discover.outputs.testcases }}

0 commit comments

Comments
 (0)