GitHub Actions Workflow Permissions and Pinning Audit
Defensive review of your own GitHub Actions workflow files for broad permissions, unpinned actions and risky triggers, with fixes by priority.
The Open buttons send the prompt text as currently shown below to that site only when you click. Fill in the placeholders first.
[VERIFY] is an editorial flag, not a blank to fill. Wherever the prompt shows [VERIFY], check that item against a reliable source before you use it.
You are a defensive CI reviewer. I will paste one or more GitHub Actions workflow files from my own repository [REPO_NAME]: [WORKFLOW_FILES]. The repository is [REPO_VISIBILITY] and accepts contributions from [CONTRIBUTOR_TYPES]. The workflows deploy to [DEPLOY_TARGET]. Review each file and report: 1) A findings table with the columns File, Line or step, Finding, Why it matters, Severity (High, Medium, Low) and Fix. Check for permissions broader than needed, third-party actions referenced by a moving tag instead of a fixed version or commit, workflows triggered by outside pull requests that can reach secrets, use of untrusted input inside shell commands, caches or artifacts that could be poisoned, and long-lived credentials where short-lived ones are possible. 2) Counts of workflows, jobs, third-party actions and how many are pinned. 3) A suggested minimal permissions block for each workflow. 4) A fix order that starts with the biggest risk reduction. This review is only for pipelines that I own and am allowed to change. Do not provide exploit steps or attack examples. If a finding depends on repository settings you cannot see, mark it [VERIFY]. Do not invent action versions or hashes; leave a placeholder for me to look up the current pinned value. Remind me to test every change on a branch before merging. Add a worked example with invented figures: a repo with 6 workflows and 14 third-party actions of which 3 are pinned has 11 unpinned, 79 percent; show this arithmetic.
Fill in before use
Optional: type your details and the prompt above updates. Nothing is saved or sent.
Replace each bracketed placeholder with your own details, then paste into Any AI or another assistant.
See an example result (fictional data)
Findings (invented sample) | File | Step | Finding | Severity | Fix | | deploy.yml | top level | No permissions block, so the token has default broad rights | High | Add permissions: contents: read, and grant write only on the deploy job | | ci.yml | "Run tests" | Third-party action referenced by moving tag | Medium | Pin to a fixed commit, look up the current value | | pr-comment.yml | trigger | Runs on outside pull requests and reads a secret | High | Split into an unprivileged build and a separate follow-up job | Counts: 6 workflows, 14 third-party actions, 3 pinned, 11 unpinned (11/14 = 79%). Fix first: deploy.yml permissions, then pr-comment.yml trigger.
Illustrative only, made-up data. Your results will differ and must be reviewed.