bad-workflow.yml — a synthetic fixture, not a customer's repository.| Severity | Rule | Location | Field | What it means | How to fix |
|---|---|---|---|---|---|
| HIGH | FG001 |
line 9 | uses |
Action 'actions/checkout' uses mutable ref 'v4', not a pinned commit SHA | Pin to a full 40-character commit SHA: uses: owner/repo@<40-hex-sha> # v1.2.3 |
| HIGH | FG002 |
line 9 | checkout.ref |
pull_request_target workflow checks out a PR-controlled ref | Avoid running PR code under pull_request_target; use pull_request with least-privilege permissions, or never execute checked-out PR code in the privileged job. |
| HIGH | FG003 |
line 13 | run |
Untrusted github.event text interpolated into a run: script | Pass untrusted data through env: and reference it as "$VAR" instead of interpolating ${{ ... }} into the shell. |
| HIGH | FG005 |
line 18 | env.API_PASSWORD |
Possible hardcoded credential in env key 'API_PASSWORD' (value masked) | Use repository/organization secrets via ${{ secrets.NAME }} and rotate any credential that was committed. |
| MEDIUM | FG004 |
line 4 | permissions |
Workflow uses permissions: write-all | Use permissions: contents: read (or the minimum set) and elevate only the specific job that needs more. |
| MEDIUM | FG006 |
line 15 | run |
Remote content piped directly to a shell | Fetch, verify a checksum, then execute a reviewed local copy, or vendor the script into the repository. |
| LOW | FG007 |
line 9 | checkout |
actions/checkout does not set persist-credentials: false | Set persist-credentials: false on the checkout step unless a later step genuinely needs the token. |
Source and test suite: github.com/sidsri14/flowguard