This issue was found by a Codex global scan of the repository at commit 19f9265.
The label-removal workflow runs on pull_request_target, grants pull-requests: write, and invokes a third-party action by a mutable tag:
|
pull_request_target: |
|
types: |
|
- labeled |
|
|
|
jobs: |
|
remove_label: |
|
permissions: |
|
contents: read |
|
pull-requests: write |
|
runs-on: ubuntu-latest |
|
if: github.repository_owner == 'deepmodeling' && github.event.label.name == 'Test CUDA' |
|
steps: |
|
- uses: actions-ecosystem/action-remove-labels@v1 |
This workflow does not check out or execute fork code, so the risk is much narrower than the common pull_request_target anti-pattern. Still, a mutable third-party action in a privileged workflow is a supply-chain risk.
Suggested fix: replace the action with a small gh api / GitHub Script step using the built-in token, or pin actions-ecosystem/action-remove-labels to a reviewed commit SHA instead of @v1.
This issue was found by a Codex global scan of the repository at commit 19f9265.
The label-removal workflow runs on
pull_request_target, grantspull-requests: write, and invokes a third-party action by a mutable tag:deepmd-gnn/.github/workflows/remove_test_cuda_label.yml
Lines 4 to 16 in 19f9265
This workflow does not check out or execute fork code, so the risk is much narrower than the common
pull_request_targetanti-pattern. Still, a mutable third-party action in a privileged workflow is a supply-chain risk.Suggested fix: replace the action with a small
gh api/ GitHub Script step using the built-in token, or pinactions-ecosystem/action-remove-labelsto a reviewed commit SHA instead of@v1.