Skip to content
RED SAG Skills
hardStudy question · answer published in DevSecOps interview questions, so no pointsci-cddevsecopssupply-chain-security

Risky GitHub Actions trigger

A public repo has this workflow. Why is it dangerous?

on: pull_request_target
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          ref: ${{ github.event.pull_request.head.sha }}
      - run: npm ci && npm test
        env:
          NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions