GitHub Actions security checker
Paste a workflow and find script injection, pull_request_target checkouts, unpinned actions, write-all permissions and printed secrets, with fixes.
Checked as you type. Nothing you paste leaves this page.
The file is read in your browser. It is not uploaded.
Everything you type here stays in your browser. Nothing is sent to HardenKit or to anyone else.
How to use the GitHub Actions security checker
- Paste a workflow file or an action.yml, drop it, or load the example.
- Fix critical findings first: they let an outsider run code with your secrets.
- Move each flagged expression into env: and use the variable in the script.
- Pin third-party actions to a full commit SHA, with the version in a comment.
About this tool
A workflow file is code that runs with your repository’s secrets and a token that can often write to it. Two mistakes account for most real compromises. One is pasting text an outsider controls, such as a pull request title or a branch name, into a run: script through ${{ }}, where it becomes part of the script. The other is a pull_request_target job that checks out and runs the pull request’s code.
This checker reads a workflow or a composite action and reports both, along with third-party actions referenced by tag or branch instead of a commit SHA, permissions: write-all, a missing permissions block, secrets written into the file or echoed to the log, ACTIONS_ALLOW_UNSECURE_COMMANDS, curl piped to a shell, and self-hosted runners on pull request triggers.
The rules, severities and wording are the ones HardenKit Scan applies to .github/workflows in a repository; the scanner also matches the actions you use against published advisories. A rule set does not replace a review of what each job can reach, which secrets it is given and who is allowed to trigger it.
Sources
Questions
GitHub replaces ${{ }} expressions with their values before the shell runs the script. If the value is a pull request title or a branch name, whoever wrote it can close the string and add commands, which then run in your job. Pass the value through an environment variable and reference "$VAR" in the script instead.
It runs in the context of the base repository, with its secrets and usually a write token, even when the pull request comes from a fork. That is safe while the job only reads metadata. Once it checks out the pull request head and runs anything from it, such as a build script or a package install, the author of the pull request controls the job.
A tag or branch can be moved to different code at any time by whoever controls the action’s repository, or by whoever compromises it, as happened to tj-actions/changed-files in March 2025. A full 40-character commit SHA names one exact version. Keep the tag in a trailing comment so update tools can raise it.
Start with permissions: contents: read at the top of the file, then grant more in the single job that needs it, such as pull-requests: write for a job that comments. Without a permissions block the token gets the repository default, which is read and write on older repositories.