@@ -235,7 +235,7 @@ jobs:
235
235
with :
236
236
role-to-assume : ${{ secrets.AWS_ROLE_TO_ASSUME }}
237
237
aws-region : us-east-1
238
- role-session-name : security- scan-${{ matrix.target }}-${{matrix.branch}}
238
+ role-session-name : scan-${{ matrix.target }}-${{matrix.branch}}
239
239
240
240
- name : Publish Scan Invoked metric
241
241
run : |
@@ -248,7 +248,9 @@ jobs:
248
248
- name : Checkout branch
249
249
uses : actions/checkout@v4
250
250
with :
251
- ref : ${{ matrix.branch }}
251
+ # For fork-origin PRs, we can't directly use matrix.branch as the branch does not exist in the
252
+ # Code Editor repo. The branch only exists in the fork.
253
+ ref : ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || matrix.branch }}
252
254
submodules : recursive
253
255
254
256
- name : Update security scan script from main
@@ -440,7 +442,7 @@ jobs:
440
442
with :
441
443
role-to-assume : ${{ secrets.AWS_ROLE_TO_ASSUME }}
442
444
aws-region : us-east-1
443
- role-session-name : security- scan-global-dependencies-${{matrix.branch}}
445
+ role-session-name : scan-global-dependencies-${{matrix.branch}}
444
446
445
447
- name : Publish Scan Invoked metric
446
448
run : |
@@ -453,7 +455,9 @@ jobs:
453
455
- name : Checkout branch
454
456
uses : actions/checkout@v4
455
457
with :
456
- ref : ${{ matrix.branch }}
458
+ # For fork-origin PRs, we can't directly use matrix.branch as the branch does not exist in the
459
+ # Code Editor repo. The branch only exists in the fork.
460
+ ref : ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || matrix.branch }}
457
461
submodules : recursive
458
462
459
463
- name : Update security scan script from main
0 commit comments