Runbook Lab

Reusable workflow secrets: what actionlint and zizmor catch

By Abdelrhman Fikri · Published 2026-12-06

actionlint checks secrets across a reusable workflow call, but only when three things line up: the called workflow is a local ./ file, the caller passes secrets by name, and the called workflow lists its secrets under on.workflow_call.secrets. Then it reports a forgotten required secret, a misspelled secret name and a secret the callee uses without declaring it. actionlint exits 1 on each of them.

Break any one of those conditions and it exits 0. A callee with no secrets: block gets no secret checks at all, secrets: inherit passes silently, and a workflow from another repository is never opened. zizmor fills a different gap: it warns about secrets: inherit and toJSON(secrets), but it doesn’t look for missing secrets. I built eleven small caller and callee pairs and ran both tools on each one.

The test setup

Each case is its own tiny git repo with two files: release.yml, which runs on push and calls deploy.yml with uses: ./.github/workflows/deploy.yml. The callee needs one secret, DEPLOY_TOKEN. The repo matters because actionlint resolves ./.github/workflows/... from the repository root, so every case gets a git init in the test script.

1.7.12
zizmor 1.33.1

The [exit N] lines below are added by my test script. Neither tool prints them. actionlint also prints the offending source line with a caret under each error, and I cut those lines from most outputs to keep them short. zizmor ran with --offline --quiet, so no network calls and no progress lines.

Three mistakes actionlint does catch

The callee declares its secret like this:

    secrets:
      DEPLOY_TOKEN:
        required: true

First case: the caller passes with: but forgets secrets: completely.

$ actionlint -no-color
.github/workflows/release.yml:10:11: secret "DEPLOY_TOKEN" is required by "./.github/workflows/deploy.yml" reusable workflow [workflow-call]
[exit 1]

Second: the caller passes it under a misspelled name, DEPLOY_TOKN. actionlint reports two errors for one typo, and the second one names the secret it expected:

.github/workflows/release.yml:10:11: secret "DEPLOY_TOKEN" is required by "./.github/workflows/deploy.yml" reusable workflow [workflow-call]
.github/workflows/release.yml:14:7: secret "DEPLOY_TOKN" is not defined in "./.github/workflows/deploy.yml" reusable workflow. defined secret is "DEPLOY_TOKEN" [workflow-call]

Third: the callee declares DEPLOY_TOKEN but its step also reads secrets.SLACK_WEBHOOK. This error lands in deploy.yml, not in the caller:

.github/workflows/deploy.yml:17:30: property "slack_webhook" is not defined in object type {actions_runner_debug: string; actions_step_debug: string; deploy_token: string; github_token: string} [expression]

The wording is generic, but the type list is useful. It shows exactly which secrets the callee can see: the declared one, GITHUB_TOKEN and the two debug flags.

zizmor printed nothing about secrets in any of these three cases. The only finding it showed was a low-severity self-repository hint, which gets its own section further down.

A callee with no secrets block passes everything

Now the same callee with the secrets: block deleted. The step still reads ${{ secrets.DEPLOY_TOKEN }}, and the caller still passes nothing:

$ actionlint -no-color
[exit 0]

That’s by design. The actionlint docs explain that when on.workflow_call has no secrets: key, it assumes the workflow inherits secrets from its caller, because it can’t know whether some caller uses secrets: inherit. So nothing is checked on either side. An exit 0 that means “not checked” rather than “fine” is the same trap as kubeconform’s -ignore-missing-schemas flag, which turns a missing schema into a silent skip (see the kubeconform CI guide).

What happens on GitHub is the part you’d want CI to catch. GitHub’s secrets docs say an expression that references a secret that isn’t set returns an empty string. Your deploy script gets DEPLOY_TOKEN="" and the step decides what that means. I didn’t run this on GitHub, so that’s the documented behaviour, not something I watched happen.

The same caller mistake twice: exit 1 when the callee declares its secret, exit 0 when it doesn't. Commands run for real on the test machine; the typing is animated.

The fix is three lines. Declare every secret the callee reads under on.workflow_call.secrets, and actionlint starts checking every caller in the repo.

secrets: inherit is quiet in actionlint, not in zizmor

For this case the caller uses secrets: inherit and the callee does something worse, ALL_SECRETS: ${{ toJSON(secrets) }}. actionlint is happy with both:

$ actionlint -no-color
[exit 0]

zizmor flags both, at medium severity (findings trimmed to the headline and summary lines):

warning[overprovisioned-secrets]: excessively provisioned secrets
warning[secrets-inherit]: secrets unconditionally inherited by called workflow
4 findings (1 suppressed, 1 unsafe fixes): 0 informational, 1 low, 2 medium, 0 high
[exit 13]

According to the workflow syntax reference, inherit passes every secret the caller can reach: organization, repository and environment secrets. With toJSON(secrets) in the callee, all of them land in one environment variable. zizmor’s audit docs recommend replacing inherit with an explicit secrets: block that forwards only what the callee needs, which also turns actionlint’s checks back on.

Workflows from another repository get no checks

I pointed a caller at example-org/shared-workflows/.github/workflows/deploy.yml@ plus a 40-character SHA and passed no secrets at all:

$ actionlint -no-color
[exit 0]
$ zizmor --offline --no-progress --quiet .
No findings to report. Good job!
[exit 0]

The repository doesn’t exist. Both tools are fine with it. The actionlint docs say its input and secret checks only work for local reusable workflows, the ones starting with ./. If your shared workflows live in a central repo, a missing secret only shows up when the run starts on GitHub.

Two caller-side mistakes actionlint catches

The job that calls a reusable workflow can’t set environment:. GitHub’s docs say the environment belongs on the job inside the called workflow. actionlint knows:

.github/workflows/release.yml:11:5: when a reusable workflow is called with "uses", "environment" is not available. only following keys are allowed: "name", "uses", "with", "secrets", "needs", "if", and "permissions" in job "deploy" [syntax-check]

That list of keys is incomplete. GitHub’s reusable workflow reference also allows strategy and concurrency on a calling job, among others. I added a matrix over two environments plus a concurrency group to the fixed pair, and actionlint accepted it with exit 0. So the message lags behind the docs, but the check itself didn’t give a false positive.

The second one: a workflow-level env: value passed into with:. GitHub’s reference says the caller’s workflow-level env is not passed to the called workflow, and actionlint goes further: the env context isn’t available in with: at all.

.github/workflows/release.yml:15:24: context "env" is not allowed here. available contexts are "github", "inputs", "matrix", "needs", "strategy", "vars". see https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability for more details [expression]

Use vars or a literal instead.

zizmor wants $/, actionlint rejects it

On every local call, zizmor 1.33.1 printed this hint (trimmed):

help[self-repository]: use GitHub's dedicated self-repository syntax
  --> ./.github/workflows/release.yml:10:11
10 |     uses: ./.github/workflows/deploy.yml
   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use '$/...' instead of './...'
[exit 12]

GitHub announced the $/ syntax on 30 July 2026. It resolves to your own repository at the commit that is running, and it works for reusable workflow calls. actionlint 1.7.12 came out on 30 March 2026, and it was still the latest release on 6 December 2026. I made the change zizmor asked for:

.github/workflows/release.yml:10:11: reusable workflow call "$/.github/workflows/deploy.yml" at "uses" is not following the format "owner/repo/path/to/workflow.yml@ref" nor "./path/to/workflow.yml". see https://docs.github.com/en/actions/learn-github-actions/reusing-workflows for more details [workflow-call]
[exit 1]

So with default settings you can’t make both tools exit 0 on a local reusable workflow call. Exit code 12 means the worst finding is low severity, and any non-zero exit fails a CI step. My choice for now is to keep ./ and tell zizmor to ignore that one audit for the caller file:

# actionlint 1.7.12 rejects the "$/" self-repository syntax, so keep "./" for now
# and silence only that one audit, only for the caller file.
rules:
  self-repository:
    ignore:
      - release.yml

Saved as .github/zizmor.yml in the fixed repo, it gave:

No findings to report. Good job! (1 ignored, 1 suppressed)
[exit 0]

--min-severity=medium also gets the exit code to 0, and it still failed the secrets: inherit case with exit 13. I prefer the config file because it hides one audit, not a whole severity level.

The pair I’d start from

Flowchart: a caller job with uses. A workflow in another repository gets no secret checks from either tool. A local workflow called with secrets: inherit passes actionlint, and zizmor warns. A callee with no workflow_call.secrets block passes actionlint because it assumes inheritance. Only a callee that declares its secrets gets exit 1 for a missing, misspelled or undeclared secret.

The callee declares its input and its secret, and fails fast if the secret is empty:

name: deploy (reusable)
on:
  workflow_call:
    inputs:
      environment:
        type: string
        required: true
    secrets:
      DEPLOY_TOKEN:
        required: true

permissions: {}

jobs:
  deploy:
    runs-on: ubuntu-latest
    environment: ${{ inputs.environment }}
    steps:
      - name: Fail fast if the token is empty
        env:
          DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
        run: |
          if [ -z "$DEPLOY_TOKEN" ]; then
            echo "::error::DEPLOY_TOKEN is empty for this environment"
            exit 1
          fi
      - name: Deploy
        env:
          DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
          TARGET: ${{ inputs.environment }}
        run: ./scripts/deploy.sh "$TARGET"

The empty check is there because required: true isn’t enough. GitHub’s reuse docs say it only checks that the caller passes the secret, not that the secret has a value. The same page warns that an environment secret the caller doesn’t pass resolves to an empty string with no error in the run.

The caller passes the secret by name:

jobs:
  deploy:
    uses: ./.github/workflows/deploy.yml
    with:
      environment: production
    secrets:
      DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}

actionlint exited 0 on this pair and zizmor exited 0 with the config file above. To run actionlint before every commit instead of waiting for CI, the actionlint pre-commit guide has the hook, along with the script injection and runner label checks. What neither tool can tell you is whether the secret exists in the repo or the environment on GitHub. That only shows up in the first real run, and I didn’t do one here.