Repository navigation
lint GitHub Actions workflows with actionlint and zizmor - #64
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
lint-workflows.yml: runs actionlint and zizmor on pushes tomainand PRs that touch.github/. The actions are pinned by commit SHA, like the other workflows.excessive-permissions:build.ymlnow setspermissions: {}at workflow level.testgetscontents: read, andreleasegetscontents: readplus theid-token: writeit already had, for PyPI trusted publishing.artipacked: both checkouts setpersist-credentials: false, so the token isn't left in.git/configfor later steps such asmake install.dependabot-cooldown: Dependabot waits 7 days after a release before proposing an action update.GITHUB_TOKENwas exported to every step of the test job. It's now set only on theReport coveragestep, the only one that needs it (coveralls).Testing
--offline): no findings, down from 5.🤖 Generated with Claude Code