File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 11name : API Diff Check
22
33on :
4- pull_request :
4+ # SECURITY: Using pull_request_target to support fork PRs with write permissions.
5+ # PR code is checked out but only for static analysis - it is never executed.
6+ # If modifying this workflow, ensure PR code is never executed and user inputs are not used unsafely.
7+ pull_request_target :
58 types : [opened, synchronize]
69 paths :
710 - ' pkg/**/*.go'
1720 runs-on : ubuntu-24.04
1821 name : API Diff Check
1922 steps :
23+ # Checkout PR code for static analysis only
2024 - name : Checkout
2125 uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
26+ with :
27+ ref : ${{ github.event.pull_request.head.sha }}
2228
2329 - name : Set up Go
2430 uses : actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
You can’t perform that action at this time.
0 commit comments