From a174b8f5c7efd6574c5c6760bc52b52868241f54 Mon Sep 17 00:00:00 2001 From: chris3ware <36608309+chris3ware@users.noreply.github.com> Date: Thu, 26 Nov 2026 15:57:11 +0000 Subject: [PATCH] add ZIZMOR_GITHUB_TOKEN environment variable --- .github/README.md | 8 ++++++++ plugin.yaml | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/.github/README.md b/.github/README.md index 28058bb..2e2cf86 100644 --- a/.github/README.md +++ b/.github/README.md @@ -63,6 +63,14 @@ same name to a repository to override it. - A `.github/gh-actions-lock.version` file in the consuming repository containing the `gh-actions-lock` version to pin, for example `v0.4.0`. Without it the pre-commit hook fails whenever workflows or actions change. +- **Optional:** Set an environment variable for `ZIZMOR_GITHUB_TOKEN` to enable zizmor online mode. Add this to your shell profile: + + ```sh + export ZIZMOR_GITHUB_TOKEN="$(gh auth token)" + ``` + + Avoid setting `GH_TOKEN` or `GITHUB_TOKEN` locally, because `gh` uses them + for git authentication. Online mode always run in CI. ## Usage diff --git a/plugin.yaml b/plugin.yaml index ea81e31..ce3691b 100644 --- a/plugin.yaml +++ b/plugin.yaml @@ -44,6 +44,12 @@ lint: definitions: - name: zizmor files: [github-action, github-workflow] + environment: + # Token enables online mode for zizmor + # Avoid GH_TOKEN/GITHUB_TOKEN locally as gh uses them for git auth + - name: ZIZMOR_GITHUB_TOKEN + value: ${env.ZIZMOR_GITHUB_TOKEN} + optional: true commands: # pedantic persona enables the stale-action-refs audit rule - name: lint