feat: extend actionlint with optional shellcheck support - #73
Merged
Conversation
Signed-off-by: rldyourmnd <danil@nddev.it.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.
Summary
Extends
actionlint.ymlwith three new optional inputs that add an opt-inshellcheck pass after actionlint. All default to the prior behaviour (shellcheck
off), so existing callers are unaffected.
enable_shellcheck(boolean, defaultfalse) — when true, downloads and runsshellcheck on shell scripts after actionlint.
shellcheck_version(string, default0.11.0) — shellcheck release version(no leading
v).shellcheck_sha256(string, default'') — SHA256 ofshellcheck-v<version>.linux.x86_64.tar.xz. Required whenenable_shellcheckis true (the download step fails closed if empty).
When enabled, two new guarded steps (
if: ${{ inputs.enable_shellcheck }})run after
Run actionlint:linux.x86_64.tar.xztarball, verifies it withsha256sum -c -, andinstalls into
\$RUNNER_TEMP/bin(same runner-writable pattern as theactionlint binary). All values pass through
env:(no${{ inputs }}inrun:).*.shfiles (viagit grep -Il,scoped to the checkout) with
--check-sourced --external-sources.Type of change
Threat-model note
No new third-party action; the only new network fetch is the checksum-verified
shellcheck binary from the official koalaman/shellcheck GitHub releases, verified
with
sha256sum -c -before extraction (same discipline as the actionlintbinary). No permission scope changes. Caller-supplied strings flow through
env:only, never interpolated intorun:. The download step fails closed whenshellcheck_sha256is empty.Permissions diff
No change.
actionlintjob keepscontents: readonly.Runtime-coverage note
actionlint.ymlwasruntime-provenat aproven_digest; editing the filebreaks the digest gate (AGENTS.md). Without a fresh observed
workflow_callrunavailable, this PR downgrades the entry to
static-only(validatorscripts/check_actionlint_contract.py, which still enforces the first-stepLinux X64 runner guard) until a live run re-proves it. This is the documented
honest downgrade path.
Checklist
# vX.Y.Zcomment (none added).timeout-minutespresent (unchanged).persist-credentials: falseon read-only checkout (unchanged).${{ inputs.* }}insiderun:— values pass throughenv:.catalog/capabilities.ymlupdated (risk note +last_verified).catalog/runtime-coverage.ymlupdated (honest downgrade to static-only).docs/generated/*regenerated (no matrix drift).CHANGELOG.mdupdated under[Unreleased]->### Added.-S) and signed off (-s).Validation note
python3 scripts/validate_all.pyreports only the two pre-existing failures onmain(pinned-actionsandcatalog, both from clusterfuzzlite/rust-supply-chainPRs #68/#69 and unrelated to this change). The
runtime-coveragedigestmismatch introduced by editing actionlint is resolved by the downgrade above.
This PR adds no new failures.