Skip to content

GitHub Actions (CI/CD automation) checklist

Copy this list into a pull request, design review or project kickoff and tick what applies. Rules are grouped by level and sorted by score (criteria). Each links to the file that explains it and cites its sources. Automatable names tools that can check the rule in CI (see the file's "How to enforce" section).

Also apply the general checklist.

This file is generated by python3 scripts/rank.py fix from the guidelines. Don't edit it by hand.

  • GHA-1 (9) Set the GITHUB_TOKEN to read-only at the top of each workflow, and grant write permissions only to the jobs that need them. (specific/github-actions) Automatable: CodeQL queries for GitHub Actions, GitHub Actions repository settings, OpenSSF Scorecard checks, zizmor audit rules.
  • GHA-2 (9) Pin third-party actions and reusable workflows to a full-length commit SHA, or lock them with a workflow dependency lockfile. (specific/github-actions) Automatable: CodeQL queries for GitHub Actions, GitHub Actions repository settings, OpenSSF Scorecard checks, zizmor audit rules.
  • GHA-3 (9) Never expand untrusted input, such as ${{ github.event.pull_request.title }}, directly in a run: script. Pass it through an intermediate environment variable. (specific/github-actions) Automatable: actionlint checks, CodeQL queries for GitHub Actions, OpenSSF Scorecard checks, zizmor audit rules.
  • GHA-4 (8) Use pull_request rather than pull_request_target unless fork pull requests need secrets or write access, and never execute pull request code in a pull_request_target or workflow_run workflow. (specific/github-actions) Automatable: CodeQL queries for GitHub Actions, OpenSSF Scorecard checks, zizmor audit rules.
  • GHA-5 (8) Authenticate to cloud providers with OpenID Connect instead of long-lived cloud secrets, and restrict the trust policy to specific repositories, branches or environments. (specific/github-actions)
  • GHA-6 (7) Avoid self-hosted runners in public repositories. Where you use them, prefer ephemeral just-in-time runners. (specific/github-actions) Automatable: zizmor audit rules.
  • GHA-7 (7) Enable Dependabot version updates for the github-actions ecosystem. (specific/github-actions) Automatable: Dependabot alerts for actions, OpenSSF Scorecard checks.
  • GHA-11 (7) Deploy through environments with protection rules: required reviewers, allowed deployment branches, and secrets scoped to the environment. (specific/github-actions)
  • GHA-8 (6) Treat restored caches as untrusted input: never cache secrets, and write caches only from workflows with trusted triggers. (specific/github-actions) Automatable: CodeQL queries for GitHub Actions, zizmor audit rules.
  • GHA-9 (6) Require approval from designated code owners for changes to .github/workflows. (specific/github-actions)
  • GHA-12 (6) Share CI logic through reusable workflows (whole jobs) and composite actions (steps) instead of copying YAML between workflows and repositories. (specific/github-actions)
  • GHA-13 (6) Use concurrency groups to cancel superseded runs on the same branch and to stop deployments to the same environment from running at once. (specific/github-actions) Automatable: zizmor audit rules.

Conditional (1–5)

  • GHA-10 (5) Pass secrets to reusable workflows by name instead of with secrets: inherit. (specific/github-actions) Automatable: zizmor audit rules.