GitHub Actions Workflow Auditor
Your workflow file is a list of commands GitHub runs with your secrets. Read it before you trust it.
A GitHub Actions workflow is the file that tells GitHub what to run, when, and with which secrets. It lives in .github/workflows/ and runs on GitHub’s runners with your repository’s permissions and secrets. Paste yours here and this auditor reads it in your browser — never uploaded — and flags unpinned actions, pull_request_target checkouts of PR code, secrets interpolated into run: commands, write-all permissions, script injection from pull-request data, missing timeouts, and deprecated actions. The companion article audit your GitHub Actions workflows walks through a real workflow by hand. Also see the Agent Transcript Auditor and the MCP Config Auditor.
Last updated:
1. Audit a workflow
Results
🔒 The audit runs entirely in your browser: the workflow is never uploaded, never stored, and never sent anywhere. A workflow file can hold live secrets — that is exactly why it stays on your machine.
What a GitHub Actions workflow is
A workflow is a YAML file in .github/workflows/: a name, an on trigger (push, pull_request, schedule, workflow_dispatch, …), an optional top-level permissions: block, and a jobs: mapping. Each job runs on a runner (runs-on: ubuntu-latest) and has a list of steps — each step is either a uses: (run an action) or a run: (run a shell command).
An action reference looks like actions/checkout@v4: owner, repository, and a ref after the @. The ref can be a tag (@v4), a branch (@main), or a full commit SHA. Only the SHA names exact code: tags and branches move, and whoever can move them can change what your workflow runs. Third-party actions — anything outside actions/* and github/* — run arbitrary code with your secrets, so they deserve the strictest pinning.
Secrets reach a workflow as ${{ secrets.NAME }} expressions. GitHub expands them before the step runs — which is safe in an env: value, where the shell receives the secret as data, and dangerous in a run: line, where the secret is expanded into the command itself. The same expansion is what makes ${{ github.event.pull_request.title }} dangerous in run:: the title comes from the pull request, so a hostile title is shell code waiting to run.
Permissions decide what a leaked token can do. The default for a repository is usually write, so a workflow with no permissions: block runs every job with write access. A top-level permissions: write-all is the loudest version of the same mistake: every job gets every permission, whether it needs it or not. The fix is boring and effective — contents: read at the top, and write permissions only on the job that needs them.
What this auditor does — and what it does not
It parses the workflow in your browser with a YAML parser and runs 12 rules over every job and step: unpinned actions (first-party and third-party), pull_request_target checkouts, secrets and PR data interpolated into run: commands, write-all and broad write permissions, a missing permissions block, checkout without persist-credentials: false, missing timeout-minutes, missing concurrency on deploy jobs, and deprecated actions and workflow commands. Results are a 0–100 score with a verdict, findings grouped by severity with a fix for each, a jobs table, and a findings CSV export. The hardened demo shows the same workflow with every finding fixed, scoring 100.
It does not judge intent: a finding is a pattern, not a verdict. It does not know what an action does once it runs — a well-known action can still be compromised, and a flagged permission can be exactly what a release job needs. It does not fetch anything, does not run any workflow, and does not send anything anywhere. A clean audit is not a guarantee: it only checks the workflow you gave it.
The demo is a synthetic CI workflow with two jobs — test and deploy — built to trip the rules on purpose: a pull_request_target trigger with a checkout, unpinned actions, a secret in run:, write-all permissions, a PR title interpolated into a shell command, and no timeouts or concurrency guard. One click fills the input and shows a Critical verdict on the first screen. The hardened demo loads the same workflow fixed, and scores 100.
Be honest about what a finding means
A finding means “this pattern matched”, not “something bad happened”. A contents: write permission on the job that publishes your release, an unpinned action you update deliberately, or a missing timeout on a job that takes five seconds may all be exactly what you intended. Read each finding with its evidence — the quoted action, permission or run: line — and with the context only you have, then decide.
And a clean audit is not a clean bill of health. This tool sees only the workflow you gave it: it cannot see an action that was clean when you pinned it and compromised since, a step that downloads and runs something else, or a secret that lives in a file this workflow references. “No findings” means no risky pattern was found here — not that the workflow is safe.
Key facts
| pull_request_target | A trigger that runs the workflow from the base branch, with write permissions and access to secrets — on code from the pull request. Checking the PR out inside it lets PR code run with those permissions. |
| Unpinned action (@v4) | An action referenced by a tag, such as @v4 or @main, instead of a full commit SHA. Tags move: the code you audited today may not be the code that runs tomorrow. |
| Script injection | PR-controlled data — a title, body, comment or branch name — interpolated into a run: script, where the shell parses it as code. GitHub documents it in its security hardening guide. |
| permissions | The block that decides what the workflow’s token can do: contents, pull-requests, id-token, and more, each read, write or none. The repository default applies when the block is missing. |
| persist-credentials | An actions/checkout option. Left on (the default), the checkout stores a credential on the runner for later steps — including any step that runs code from the PR. |
| timeout-minutes | A per-job limit on how long the job may run. Without it, a hung step runs until GitHub’s 6-hour default kills it. |
| concurrency | A guard that groups runs — by branch or environment — so only one runs at a time. Without it, two deploys can race each other. |
| Format reference | Security hardening for GitHub Actions — GitHub Docs |
Frequently asked questions
Why does the audit run in my browser instead of on a server?
Because a workflow file can hold live secrets. The file lists every step your CI runs, with the tokens that authenticate them, in plaintext. Sending that to a server to audit it would create the exact exposure the audit is meant to catch. Parsing it locally means the secrets never leave your machine.
My workflow has findings — is it unsafe?
Not necessarily. A finding is a pattern that matched, and many matches are intended: a contents: write permission on the job that publishes your release, an unpinned action you update deliberately, a missing timeout on a job that takes seconds. Open the finding, read the quoted evidence, and ask whether the line is what you wanted. The ones to act on first are the Criticals: a pull_request_target workflow that checks out PR code, and a secret or PR title interpolated into a run: command.
How do I pin an action to a commit SHA?
Open the action’s repository on GitHub, pick the release you use, and copy the full commit SHA shown next to it — then write actions/checkout@