Repository navigation
ci: lint the workflows and fix what it finds - #552
Merged
Merged
Conversation
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.
Adds static analysis of the workflows, and fixes what it found.
dpp-coregot the same in its #455; the engine's five workflows had never been through either tool.The new workflow
workflow-lint.ymlruns zizmor (security) and actionlint (correctness) on every pull request, onmain, weekly (Monday 05:00 UTC) and on demand. It is not path-filtered, so either job can be made a required check without blocking pull requests that leave.github/alone; that is a ruleset decision and this PR does not make it. The defaultregularpersona gates;pedanticdoes not.Both tools are downloaded from their release and checked against a SHA-256 recorded in the workflow: zizmor 1.30.1 and actionlint 1.7.12, the versions
dpp-corepins, with the digests GitHub publishes for those assets. Dependabot cannot see either pin, so moving one is a deliberate edit on its own PR. zizmor gets the workflow's own read-only token for its online audits (whether a pinned commit belongs to the repository it names, published advisories, whether a version comment matches its pin).What the tools reported, and what changed
A local run over the five workflows on
main(zizmor offline,regularpersona) gave 27 findings. The first CI run of the new jobs, which is the first time the online audits andshellchecksaw these files, added eight more. All are fixed.artipacked: the checkout keeps the job tokenactions/checkoutsteps (22 inci.yml, one each inadvisories.ymlandrelease.yml; onlyfuzz.ymlset it)persist-credentials: falseon all 24. No job needs the credentials: the onegit fetchin CI (scripts/migrations-check.sh) reads a public repository and is already|| true.dependabot-cooldowncargo,dockerandgithub-actionsentriescooldown: default-days: 7, as indpp-coredtolnay/rust-toolchainpinned to a commit upstream no longer has (found by hand; the audit for it is online-only)4cda84d5…, a commit on upstream'sstablebranch from 2026-07-16; GitHub's compare againstmasterreports it diverged, 1 ahead and 14 behindmastercommit683b588c…,master's head today. Every use already passedtoolchain:, so the same code runs. No branch-name comment, since it would go stale.release.ymlgrantedpackages: writeto the whole workflowrelease.ymlpublishjob, the only job there. Its effective permissions are unchanged.ref-version-mismatch(online), 7 sitesSwatinem/rust-cachepin,c8037a86… # v2v2.9.3, reached through Dependabot's grouped bump #512, andv2is a moving tag that points atv2.9.3. Nowd1527c8f… # v2.9.3, as indpp-core. This movesrust-cacheback one unreleased upstream commit, "include a virtual workspace's root Cargo.toml in the cache key". The engine's root manifest is virtual, so until the next release an edit to that file alone may not change a cache key;Cargo.lockis still in the key.shellcheckSC2012 (via actionlint)fuzz.yml,ls "$corpus" | wc -lfind "$corpus" -mindepth 1 -maxdepth 1 | wc -l: the same count of the same plain files.One change that no tool asked for: eight pinned actions carried a major-only comment (
# v7,# v4,# v6), which is true only while upstream leaves that tag alone. Each is now the exact release tag of the commit it pins (checkoutv7.0.1,upload-artifactv7.0.2,setup-nodev7.1.0,setup-buildx-actionv4.4.1,login-actionv4.7.0,metadata-actionv6.2.0,build-push-actionv7.4.0), each looked up withgit ls-remoteagainst the upstream repository. It belongs here because of the cooldown above: a release moves its major tag at once while Dependabot now waits a week to propose it, and over that week theref-version-mismatchaudit would fail every run.dpp-corecomments exact versions for the same reason.Left alone
pedanticmode also reports 9superfluous-actions(actions a shell command could replace) and 2unpinned-images(container images pinned by tag, not by digest). Neither is gated, in the engine or in core.Checked
just checkexits 0 on the branch tip: 1636 of 1636 tests, includingci-guard-checkandfuzz-targets-check, the two guard scripts that read the workflow files.regular) and actionlint report nothing on the workflows as changed here; before, zizmor exited 13. The online findings above were not visible offline, which is why the first commit failed these two jobs.run:that interpolatesgithub.event.issue.title, a step output that does not exist and a misspelt context.Not run locally: zizmor's online audits (no token goes to a downloaded binary) and
shellcheck, so the second CI run is the confirmation.bench.ymlbench.ymlreachedmainafter this branch was cut and came in with the merge ofmain, still on the oldrust-toolchaincommit andrust-cacheatc8037a86… # v2, so the online audit failed on it. The last commit pins it as the other workflows are pinned here:rust-toolchain683b588c…,rust-cached1527c8f… # v2.9.3, and exact release comments oncheckout(v7.0.1) andupload-artifact(v7.0.2).