Skip to content

github-actions

GitHub Actions workflows: valid syntax and expressions, security audits, and pinned actions. Guide: Security.

A scope has file paths **/.github/workflows/*.{yml,yaml} or **/action.{yml,yaml}.

Checks every GitHub Actions workflow with actionlint: syntax, expressions, action inputs, and shell steps.

Runs at the commit stage.

A workflow error surfaces on the first push after the change, in CI, where it costs a round trip.

Fix the line actionlint names.

A workflow expression with the unknown context ${{ unknown.value }} reports an error. Use a supported context and property there instead.

gspot ignore github-actions/actionlint --paths "<path>" --reason "<why>"
gspot ignore github-actions/actionlint --rule <rule> --reason "<why>"

Checks each workflow for a job timeout, a pinned runner, a reason above continue-on-error, no expression or piped download in run:, no test retry, no secret in the top-level env, a concurrency group that fits its triggers and cancels only pull request runs, and retention-days on uploads.

Runs at the commit stage.

A hung job or a moving runner image costs a day to find, and an expression in run: becomes shell code.

Apply the fix that the message names.

A job with no timeout-minutes reports job-timeout. Add timeout-minutes: 30 to the job.

Rule What it checks What to do
job-timeout Each job that runs steps sets timeout-minutes. Set timeout-minutes on the job.
latest-runner No job runs on a -latest runner image. Pin a runner image, such as ubuntu-24.04.
continue-on-error A comment above each continue-on-error says why the failure is allowed. Put a reason comment above this continue-on-error.
run-expression No run: script holds a GitHub Actions expression. Pass this expression through the env of the step, and read it as a quoted shell variable.
pull-request-concurrency A workflow that runs for pull requests has a concurrency group. Add a top-level concurrency group whose key includes the ref.
cancel-outside-pull-requests A workflow that also runs outside pull requests cancels only its pull request runs. This workflow also runs outside pull requests, so cancel-in-progress: true cancels those runs. Set it to ${{ github.event_name == 'pull_request' }}.
artifact-retention Each actions/upload-artifact step sets retention-days. Set retention-days on this upload-artifact step.
test-retry No step retries a test, through a test runner flag or a retry action. A test that passes only on a retry has a bug. Remove the retry and fix the test.
curl-pipe-shell No run: script pipes a download into a shell. Nobody can read a script that runs as it downloads. Download it to a file, check it, then run it.
workflow-secret-env The top-level env of a workflow holds no secret. Move this secret into the env of the step that needs it.
gspot ignore github-actions/workflow-shape --paths "<path>" --reason "<why>"
gspot ignore github-actions/workflow-shape --rule job-timeout --reason "<why>"

Audits GitHub Actions workflows and composite actions with zizmor for template injection, excessive permissions, and dangerous triggers.

Runs at the commit stage.

A workflow runs with the repository’s credentials; an injectable expression can hand them to a stranger.

Apply the fix zizmor names.

A workflow that puts pull request text straight into a shell command reports template-injection. Pass the text through a step environment variable, and quote its expansion.

gspot ignore github-actions/zizmor --paths "<path>" --reason "<why>"
gspot ignore github-actions/zizmor --rule <rule> --reason "<why>"
Rule file Installed when
.gspot/rules/GITHUB-ACTIONS.md Always
Tool Version
actionlint 1.7.12
shellcheck 0.11.0
zizmor 1.31.1

.gspot/configurations/github-actions/zizmor.yml