Skip to content

lint GitHub Actions workflows with actionlint and zizmor - #64

Merged
bentsku merged 1 commit into
mainfrom
lint-workflows
Oct 14, 2026
Merged

bentsku merged 1 commit into
mainfrom
lint-workflows

Conversation

@bentsku

@bentsku bentsku commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator

Motivation

Nothing checked the workflow files. actionlint catches syntax, expression and shell errors in workflows, and zizmor catches security issues. Running zizmor on the current workflows reports 5 medium findings.

Changes

  • New lint-workflows.yml: runs actionlint and zizmor on pushes to main and PRs that touch .github/. The actions are pinned by commit SHA, like the other workflows.
  • Fixes for the zizmor findings:
    • excessive-permissions: build.yml now sets permissions: {} at workflow level. test gets contents: read, and release gets contents: read plus the id-token: write it already had, for PyPI trusted publishing.
    • artipacked: both checkouts set persist-credentials: false, so the token isn't left in .git/config for later steps such as make install.
    • dependabot-cooldown: Dependabot waits 7 days after a release before proposing an action update.
  • zizmor doesn't flag this one, but GITHUB_TOKEN was exported to every step of the test job. It's now set only on the Report coverage step, the only one that needs it (coveralls).

Testing

  • actionlint 1.7.7 locally: no errors.
  • zizmor 1.30.1 locally (--offline): no findings, down from 5.
  • This PR's CI runs the new lint workflow. The 3.14 job checks that the coverage upload still works with the narrower token.

🤖 Generated with Claude Code

Adds a workflow that runs actionlint and zizmor when .github changes, and
fixes zizmor's findings:

- deny all token permissions by default and grant each job only what it
  needs
- don't persist the checkout credentials in .git/config
- pass GITHUB_TOKEN only to the coveralls step instead of the whole job
- wait 7 days before Dependabot proposes a new action release

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bentsku
bentsku merged commit f5b0148 into main Oct 14, 2026
8 checks passed
@bentsku
bentsku deleted the lint-workflows branch October 14, 2026 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant