Skip to content

Static checker for GitHub Actions

Catch broken and insecure workflows before they run

jactionlint checks your workflows, composite actions and dependabot.yml. It type-checks expressions, validates the inputs of actions and runs shellcheck on your scripts. It finds script injection, risky triggers and tokens with more permissions than they need, and fixes what it can.

mise use -g jactionlint

Install with mise, or with Homebrew, PyPI, Docker or Go. All methods →

test.yaml
yaml
on:
  push:
    branch: main
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: echo "${{ github.event.head_commit.message }}"
      - run: echo "${{ matrix.os }}"
  1. 1:1concurrency-limitsworkflow has no "concurrency:", so every run of it executes at the same time even when a newer run supersedes the older ones. add a top-level "concurrency:" with a "group:" and "cancel-in-progress: true"
  2. 3:5workflow-syntaxunexpected key "branch" for "push" section. expected one of "branches", "branches-ignore", "paths", "paths-ignore", "tags", "tags-ignore", "types", "workflows"
  3. 5:3missing-timeout"timeout-minutes" is not set at this job. Set it to avoid wasting runner minutes when the job hangs. Set "default-minutes" in the "missing-timeout" rule options of the configuration to turn on the --fix fix
  4. 5:3missing-permissionsneither the workflow nor this job sets "permissions:" so the GITHUB_TOKEN gets the default permissions of the repository. set "permissions:" at workflow-level or job-level (use "permissions: {}" for no permissions) because the "missing-permissions" rule is enabled
  5. 8:15unpinned-usesaction "actions/checkout@v4" must be pinned to a full-length commit SHA like "{owner}/{repo}@{sha}" because the "unpinned-uses" rule is enabled
  6. 8:15artipackedactions/checkout leaves the GITHUB_TOKEN in the git config of the workspace, where a later step such as an artifact upload can publish it. set "persist-credentials: false" under "with:" unless a later step needs to push
  7. 9:24template-injection"github.event.head_commit.message" is potentially untrusted. avoid using it directly in inline scripts. instead, pass it through an environment variable. see https://docs.github.com/en/actions/reference/security/secure-use#good-practices-for-mitigating-script-injection-attacks for more details
  8. 10:24undefined-propertyproperty "os" is not defined in object type {}
  • Correctness
  • Security
  • Policy
Try it in the playground →

What it checks

Bugs, security holes and policy gaps in one pass

jactionlint started as a fork of actionlint and covers its checks, and its security rules follow the audits of zizmor. Every finding names its rule, and jactionlint --explain <rule> tells you why it matters and how to fix it.

Automatic fixes

Fixes, not just findings

jactionlint --fix repairs the findings that have a mechanical fix, and --diff shows the change without writing it. On test.yaml above, it passes the untrusted message through an environment variable, gives the token read-only permissions and stops actions/checkout from keeping the token.

  • Safe fixes keep what the workflow does. --fix=unsafe also applies the ones that may change it.
  • With the online checks, --fix pins each action to the commit of its tag.
  • A finding that a baseline hides is fixed too, which pays the baseline down.
How fixes work →
Terminal

jactionlint --diff test.yaml

diff
--- a/test.yaml
+++ b/test.yaml
@@ -1,10 +1,17 @@
 on:
   push:
     branch: main
+
+permissions:
+  contents: read
 jobs:
   test:
     runs-on: ubuntu-latest
     steps:
       - uses: actions/checkout@v4
-      - run: echo "${{ github.event.head_commit.message }}"
+        with:
+          persist-credentials: false
+      - run: echo "${HEAD_COMMIT_MESSAGE}"
+        env:
+          HEAD_COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
       - run: echo "${{ matrix.os }}"

Adoption

Turn it on without a cleanup sprint

The default profile can fail the first run on a repository that never followed it. Start with the bugs, record the rest and let the build fail only on what is new.

  1. jactionlint --profile correctness

    Fix the bugs first

    The correctness profile has the checks of actionlint and the bug detectors of jactionlint. Its findings are mistakes, not debt.

  2. jactionlint --baseline-write

    Record the rest

    The default profile adds the security and policy rules. Write the findings that are left to a baseline.

  3. jactionlint --baseline

    Fail only on new findings

    Pay the baseline down at your own pace. An ignore comment silences a finding that you accept for good.

Integrations

In CI, in Git hooks and in your browser

The jactionlint action checks every push and pull request. Add this workflow to a repository, and pin the action to the commit of a release the way the default profile asks of every action.

.github/workflows/jactionlint.yaml
yaml
name: jactionlint
on:
  push:
    branches: [main]
  pull_request:
permissions: {}
concurrency:
  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
  cancel-in-progress: true
jobs:
  jactionlint:
    runs-on: ubuntu-latest
    timeout-minutes: 10
    permissions:
      contents: read
    steps:
      - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
        with:
          persist-credentials: false
      - uses: jdx/jactionlint@72c00452809bcca05b8bc12acdcf15dd7a9c1c5e # v2.6.0

This workflow passes the default profile itself.

Switching

Coming from actionlint or zizmor?

From actionlint

jactionlint is a fork of rhysd/actionlint and reads its config file. --profile correctness keeps the checks that you have, and the default profile adds the security and policy rules when you are ready for them.

Coming from actionlint →

From zizmor

Each audit of zizmor 1.30.1 has a rule, under the same ID in every case but one. # zizmor: ignore[...] comments keep working, and --migrate-ignores rewrites them.

jactionlint and zizmor →

Run it on your repository

One command installs it. Run jactionlint at the root of a repository, with no configuration.

mise use -g jactionlint

Install with mise, or with Homebrew, PyPI, Docker or Go. All methods →

MIT LicenseCopyright © 2026jdx.dev