Skip to content

ci: enforce actionlint (pinned, repo ShellCheck) and fix its 20 findings - #1278

Merged
bpalermo merged 1 commit into
upgrade/ci-stuck-run-watchdogfrom
upgrade/ci-actionlint
Oct 5, 2026
Merged

bpalermo merged 1 commit into
upgrade/ci-stuck-run-watchdogfrom
upgrade/ci-actionlint

Conversation

@bpalermo

@bpalermo bpalermo commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner

Stack 2/3 (#1276 → #1278 → #1279).

Problem (confirmed)

actionlint was not enforced. Running rhysd/actionlint:1.7.12 (Docker) on main at df3a1136 reported 20 findings. All are fixed here or scoped away:

category count where fix
[expression] 4 ci.yaml test, race ×2, netns github.head_ref (branch-name text from the PR author) was interpolated into bazel --build_metadata=BRANCH_NAME=… inside run:. It now comes from job-level env: BRANCH_NAME, used as "$BRANCH_NAME", the same way proxy.yml already did it.
[shellcheck] SC2046 14 e2e.yaml gateway-http, mesh-http $(img …) relied on word splitting to expand into --set flags. They are now built into an array and passed as "${images[@]}". I expanded the old and new forms side by side: the argument lists are identical.
[shellcheck] SC2024 1 e2e.yaml cloud-provider-kind Here the warning is wrong: the log redirect is meant to run as the runner user, not as root. Targeted # shellcheck disable=SC2024 with that reason.
[shellcheck] SC2016 1 publish-verify.yaml issue step Literal Markdown fences inside a printf format. The fix in the file itself (a targeted directive) is in #1277, because publish-verify.yaml is reviewed on its own. Until #1277 merges, .github/actionlint.yaml ignores exactly this message for that one file. Drop the entry after #1277 lands.

No blanket disables were used.

Enforcement

  • //bazel/actionlint pins actionlint 1.7.12. It uses the official release archives per platform, with the sha256 from actionlint_1.7.12_checksums.txt in MODULE.bazel, following the //bazel/oras pattern. It runs actionlint with the ShellCheck binary the lint aspects use (@aspect_rules_lint//lint:shellcheck_bin, 0.11.0), so a run: block and a scripts/*.sh are held to the same version. Running with -pyflakes= keeps the result from depending on the host.
  • :actionlint_test is part of bazel test //.... It lints a copy of //:ci_definitions that has a .git marker. That marker matters: actionlint checks a workflow's with: against a local composite action's inputs only inside a project. Without it, the sandboxed test silently skipped that check. I verified this with a deliberate bogus-input: passed to ./.github/actions/setup-bazel: without the marker the test passed; with it the test fails.
  • The test also asserts the pinned version, so an archive bump has to move EXPECTED with it.
  • ci.yaml job actionlint is unconditional, like envoy-api-parity, because changes excludes proxy.yml and proxy-release.yml from control_plane. It is listed in the ci gate's needs. It runs locally, with no RBE and no BuildBuddy key.
  • make actionlint (bazel run //bazel/actionlint) lints the working tree. Added to the command lists in CLAUDE.md and AGENTS.md.
  • Not covered: the run: blocks inside .github/actions/*/action.yml. actionlint only lints workflow files; it checks composite inputs (above), not composite scripts.

Proof

  • bazel test //bazel/actionlint:actionlint_test:
    • red on main's workflows: the same 19 findings, plus the 1 now ignored;
    • green on this branch.
  • make actionlint: actionlint 1.7.12 (shellcheck 0.11.0): 10 workflow file(s) → clean.
  • Docker rhysd/actionlint:1.7.12 on this branch: 0 findings.
  • bazel build --config=lint --@aspect_rules_lint//lint:fail_on_violation //bazel/... //scripts:all: clean.
  • make format-check: clean.
  • //e2e:kind_pin_test and //website:site_test: pass.
  • This PR changes e2e.yaml (the helm args). The nightly suite was dispatched on the top of the stack, ci: run the soak harness test in bazel test; drop dead warm-up targets; pin cloud-provider-kind #1279, which contains this commit: run 37367311728. Results will be added as a comment.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr

@bpalermo
bpalermo added this pull request to stack #1280 October 5, 2026 20:02
@bpalermo bpalermo changed the title ci: enforce actionlint; fix its findings ci: enforce actionlint (pinned, repo ShellCheck) and fix its 20 findings Oct 5, 2026
@bpalermo
bpalermo marked this pull request as ready for review October 5, 2026 20:04
actionlint was run by hand and never enforced; v1.7.12 reported 20 findings:

- [expression] x4, ci.yaml: `github.head_ref` (attacker-controlled branch
  text) interpolated into the bazel --build_metadata lines of test, race (x2)
  and netns. It now reaches them as $BRANCH_NAME from job-level env, as
  proxy.yml already does.
- [shellcheck] SC2046 x14, e2e.yaml gateway-http/mesh-http: `$(img ...)`
  relied on word splitting to expand into --set flags. Built as an array
  instead; the argument list is byte-identical (checked by expanding both).
- [shellcheck] SC2024 x1, e2e.yaml: `sudo cloud-provider-kind > log` — the
  redirect is meant to run as the runner user; targeted directive with that
  reason.
- [shellcheck] SC2016 x1, publish-verify.yaml: literal Markdown backticks in
  a printf format. Ignored for that one file in .github/actionlint.yaml until
  the release-verification workflow's own PR carries a targeted directive.

Enforcement: //bazel/actionlint pins actionlint 1.7.12 (official release
archives per platform, sha256 from the release checksums, the //bazel/oras
pattern) and runs it with the ShellCheck binary the lint aspects use.
:actionlint_test (in //...) lints a copy of //:ci_definitions given a .git
marker, because actionlint only checks a workflow's inputs against a local
composite action's metadata inside a project (verified: an undefined input to
./.github/actions/setup-bazel fails it). A new unconditional `actionlint` job
in ci.yaml runs it and is in the `ci` gate's needs. `make actionlint` runs it
on the working tree.

actionlint does not lint the composite actions' own `run:` blocks.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
@bpalermo
bpalermo force-pushed the upgrade/ci-actionlint branch from 88d33a5 to 1b8fadd Compare October 5, 2026 22:05
@bpalermo
bpalermo merged commit 90ca82f into main Oct 5, 2026
44 checks passed
@bpalermo
bpalermo deleted the upgrade/ci-actionlint branch October 5, 2026 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant