Repository navigation
ci: lint GitHub Actions workflows with pinned actionlint - #15677
Merged
Merged
Conversation
GitHub silently skips a workflow it rejects, so a bad file (the runner context in job-level env that #15657 shipped) merged and never ran. CI's lint job now installs the pinned actionlint 1.7.12 (archive SHA-256 verified), lints every workflow, and proves the linter still rejects a known-bad fixture. Pregate runs the same check as a stage when a plan lints workflow files; when the pinned binary or shellcheck is missing it reports actionlint as not covered with the remedy. Also quotes the GitHub output and tag variables in release.yml so the six shellcheck SC2086 notes no longer fire.
… proof (#15658) A nonzero exit alone also covers a missing shellcheck or a broken launch, so the proof step now fails unless actionlint rejects the fixture with the expected diagnostic.
atomantic
enabled auto-merge
November 10, 2026 16:50
atomantic
disabled auto-merge
November 10, 2026 17:02
Owner
Author
|
Ready to merge: |
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.
Summary
GitHub silently skips a workflow it rejects, so a bad file can merge and never run. PR #15657 shipped a
runnercontext in job-levelenv, which GitHub refuses;actionlintreports it immediately. This adds actionlint to CI and to pregate.runtime-image-security.yml), lints every workflow, then proves the linter still rejects a known-bad fixture with the expectedcontext "runner" is not allowed herediagnostic.workflow lint (actionlint)stage whenever the plan lints workflow files. If the pinned binary orshellcheckis missing it is reported as not covered, with the remedy, instead of passing silently. The receipt records whether the stage ran.release.yml: quotes$GITHUB_OUTPUTand the tag/variable expansions that produced the six pre-existing SC2086 notes. No shellcheck rule is disabled.scripts/lib/actionlint.jsholds the pin and the probe;scripts/run-actionlint.jsis the shared runner. A parity test keeps theci.ymlliterals equal to the JS constants.Test plan
scripts/run-actionlint.test.js: pin parity withci.yml, version parsing, probe states (missing binary, wrong version, missing shellcheck, available), workflow selection and target resolution.scripts/pregate.test.js: actionlint stage selection, skip under--skip-lint, uncovered entry when the tool is unavailable, and updated stage-order expectations.scripts/ci-test-plan.test.js: a workflow change runs the full lint job.npm run pregatepasses on the committed tree (includesworkflow lint (actionlint)).actionlint1.7.12 (the pinned darwin_arm64 archive, checked against the release checksums file) passes on all six workflows and rejects the fixture with the expected diagnostic.github-actions-pinned,workflow-timeouts,release-ci-permissions, and related) pass.Local review
gpt-6.1-terra, high effort).b9b755f992): one finding, accepted. The fixture proof passed on any nonzero exit, so a missing shellcheck could look like success. Fixed inf1c89e4909: the step now requires the expected runner-context diagnostic.f1c89e4909): clean, no findings.f1c89e4909. No findings were rejected.Closes #15658