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 }}Discussion 0
Join free to post in the discussion.
Related questions
- CI vs Continuous DeliveryDevOps Engineer
- What set -euo pipefail doesDevOps Engineer
- Where GitHub Actions workflows liveDevOps Engineer
- GitLab CI stagesDevOps Engineer
- Why keep a Jenkinsfile in the repoDevOps Engineer
- What Trivy scans forDevOps Engineer
- Parking unfinished changesDevOps Engineer
- Copying one fix to a release branchDevOps Engineer