From 444bdc0bf9808b7e5db2006b7d0c19dbdd274b89 Mon Sep 17 00:00:00 2001 From: jmeridth Date: Sat, 26 Sep 2026 08:07:10 -0500 Subject: [PATCH] ci: lint workflows with actionlint and zizmor ## What/Why Lint every workflow in this repo on each PR with actionlint and zizmor. Every repo that calls these workflows inherits their bugs, so this becomes the required `lint` check on `main`. ## Proof it works - Local run on this branch: actionlint and zizmor both pass. - Local check with a deliberately bad workflow (`pull_request_target`, an unpinned `actions/checkout@v4`, a template injection, and a syntax error): actionlint exited 1, and zizmor reported `dangerous-triggers`, `template-injection`, and `unpinned-uses` errors (exit 14). The file was deleted before committing. ## Risk + AI role Low. CI only. Claude Opus 5.5 wrote the workflow and verified both pins: actionlint 1.7.12 by Docker image digest, and zizmor-action v0.6.4 by commit SHA running zizmor 1.30.1. ## Review focus - actionlint is pinned by image digest (`docker://...@sha256:`). I have not confirmed Dependabot bumps `docker://` references in workflows, so this pin may need manual updates. Signed-off-by: jmeridth --- .github/workflows/lint.yaml | 39 +++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/lint.yaml diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml new file mode 100644 index 0000000..7ba3e98 --- /dev/null +++ b/.github/workflows/lint.yaml @@ -0,0 +1,39 @@ +name: lint + +on: + pull_request: + branches: [main] + +permissions: {} + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + +jobs: + lint: + runs-on: ubuntu-24.04 + permissions: + contents: read # Clone the repository + steps: + - uses: step-security/harden-runner@e14015d583714f6e62063499dc959a02595150a1 # v2.21.1 + with: + egress-policy: audit + + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + + - name: actionlint + uses: docker://rhysd/actionlint@sha256:b1934ee5f1c509618f2508e6eb47ee0d3520686341fec936f3b79331f9315667 # 1.7.12 + with: + args: -color + + # Plain output that fails the job; no code scanning upload, so no + # security-events permission. Reads .github/zizmor.yml. + - name: zizmor + uses: zizmorcore/zizmor-action@cc914d7f3750a2d13d75c7f184a1060aa0e9d482 # v0.6.4 + with: + version: 1.30.1 + advanced-security: false + annotations: true