Repository navigation
ci: least-privilege tokens, pinned actions and a workflow linter - #573
Merged
Merged
Conversation
LeMyst
marked this pull request as ready for review
September 28, 2026 18:18
LeMyst
force-pushed
the
ci/harden-workflows
branch
from
September 28, 2026 20:27
429be2d to
3684331
Compare
zizmor reported 116 findings on the workflows; none remain at low severity or above. - release.yaml: the workflow-wide token could write contents, pull requests and packages and mint OIDC tokens in every job, including the eleven build jobs that run npm and cargo build scripts from dependencies. It is read-only now, and each job asks for what it uses: release-please (contents, pull-requests), upload_artifacts (contents), publish_crates (id-token), docker (packages). test.yml gets a read-only token too. - Every action is pinned to a commit SHA with its version in a comment, which Dependabot keeps updating. dtolnay/rust-toolchain now takes the toolchain as an input, taiki-e/install-action takes `tool: cross`. - Checkouts no longer leave the token in .git/config. - `npm ci` instead of `npm install` in release and RPM builds, so the shipped assets come from the lockfile. - The release tag reaches `gh release edit` through the environment rather than being spliced into the script. - timeout-minutes on every release job. - New workflow-lint.yml runs actionlint and zizmor on changes under .github/. fedora:latest in rpm.yaml stays unpinned on purpose, with an inline zizmor ignore saying why. Co-Authored-By: Claude Opus 5.5 <[email protected]>
LeMyst
force-pushed
the
ci/harden-workflows
branch
from
September 28, 2026 20:29
3684331 to
9c29c0b
Compare
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.
Closes #572.
What changes
Token permissions (
release.yaml)test.ymlalso gets a read-only default.Pinning. Every
uses:points at a commit SHA with# vX.Y.Zbeside it, the form Dependabot'sgithub-actionsupdater maintains.dtolnay/rust-toolchain@stablebecomes thev1commit withtoolchain: stableas an input.taiki-e/install-action@crossbecomesv2.87.21withtool: cross.Smaller fixes
persist-credentials: falseon all checkouts.claude-code-actioninstalls its own git credential and handles a checkout without one.npm ciin the release, source tarball, crates.io and RPM builds.gh release editthroughenv.timeout-minuteson every release job, sized from the v0.37.0 run. The longest job, the notarized macOS x86_64 build, took 24 minutes; it gets 90 because notarization may wait 30.New
workflow-lint.ymlruns on changes under.github/:install-action. Online audits use the job's read-only token. Informational findings are left out.fedora:latestinrpm.yamlstays unpinned on purpose, with an inlinezizmor: ignoreand the reason next to it.Testing
actionlint1.7.12: no output.--min-severity=low, offline): "No findings to report" (116 before). The online audits will run for the first time in this PR's ownWorkflow lintcheck.1.7.12.🤖 Generated with Claude Code