Skip to content

ci: lint workflows with jactionlint, shellcheck and zizmor - #2207

Merged
viceice merged 1 commit into
mainfrom
viceice/ci/mise-lint
Nov 20, 2026
Merged

viceice merged 1 commit into
mainfrom
viceice/ci/mise-lint

Conversation

@viceice

@viceice viceice commented Nov 20, 2026

Copy link
Copy Markdown
Member

Changes

  • Pin jactionlint, shellcheck and zizmor in mise.toml, and run them in the lint job, like the other containerbase repos.
  • Fix what they report:
    • Cancel in-progress runs only for pull requests, so a push to main doesn't cancel a running release.
    • Set timeout-minutes on build and release.
    • Check out without persisted credentials.
    • Pass the token and owner to docker login through env.
    • Create or update the release with gh release instead of ncipollo/release-action.

Context

Please select one of the following:

  • This closes an existing Issue, Closes: #
  • This doesn't close an Issue, but I accept the risk that this PR may be closed if maintainers disagree with its opening or implementation

AI assistance disclosure

Did you use AI tools to create any part of this pull request?

Please select one option and, if yes, briefly describe how AI was used (e.g., code, tests, docs) and which tool(s) you used.

  • No — I did not use AI for this contribution.
  • Yes — minimal assistance (e.g., IDE autocomplete, small code completions, grammar fixes).
  • Yes — substantive assistance (AI-generated non‑trivial portions of code, tests, or documentation).
  • Yes — other (please describe):

Use of AI in replying to PR comments

Who answers review comments:

  • @viceice will read and reply directly. Name the account.
  • An agent will draft replies and @username will read them before they are posted. Name the account.
  • An agent will draft replies and reply autonomously. This is heavily discouraged, and we prefer that there are humans in the loop
  • Nobody has explicitly committed to replying.

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please select one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified tests

Drafted by Claude Code (Claude Opus 5.5, low effort) on behalf of @viceice.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <michael.kriese+claude-code@mend.io>
@viceice
viceice enabled auto-merge (squash) November 20, 2026 14:25
@qodo-code-review

qodo-code-review Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

PR Summary by Qodo

Lint GitHub Actions workflows and harden release CI

✨ Enhancement ⚙️ Configuration changes 🕐 10-20 Minutes

Grey Divider

AI Description

• Add pinned workflow, shell, and security linting to the CI lint job.
• Limit run cancellation to pull requests and reduce credential exposure in build and release jobs.
• Replace the release action with GitHub CLI create-or-update logic.
Merge Risk 🟡 Medium

Blast radius 🔴 High 💥 2 capabilities

  • 2 affected capabilities span independent functional scopes: GitHub release delivery, container image delivery.
  • This capability is the end-to-end build-and-publish behavior from the workflow's build job to GHCR.
  • It is independent of GitHub release metadata: the workflow performs registry login and invokes the docker-builder action as a separate external delivery operation.
  • Release metadata publication is a distinct end-to-end outcome from container image publication: it uses the computed VERSION and GitHub CLI against GitHub Releases, while image delivery uses GHCR and docker-builder.
  • The separate external destination and user-visible outcome support an independent functional scope.
  • The fault affects the release publication outcome only.
  • It does not directly change image contents or registry publication; those are performed by the preceding build job through a separate external destination.
Sources

.github/workflows/build.yaml[10-12]

concurrency:
  group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
  cancel-in-progress: ${{ github.event_name == 'pull_request' }}
Behavioral complexity 🔴 High 🧩 Concurrent ordering

  • Before: the workflow cancelled in-progress runs for both pull requests and pushes, giving the shared workflow group a single active run.
  • After: cancellation is enabled only for pull requests, so successive main pushes may execute build and release jobs concurrently.
  • New correctness condition: registry tag publication and GitHub release creation/update must remain consistent when older and newer runs overlap and complete in either order.
  • This is a newly affected ordering invariant, not merely routine use of an existing concurrency primitive.
Sources

.github/workflows/build.yaml[10-12]

concurrency:
  group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
  cancel-in-progress: ${{ github.event_name == 'pull_request' }}
Potential damage 🟡 Medium 🩹 Incorrect results

  • A stale image digest or tag can be published after a newer run, causing consumers resolving the image tag to receive an older build.
  • This is an incorrect artifact result, not automatically irreversible data loss.
  • The repository does not show a rollback or tag-reconciliation step.
  • A later successful build can republish the intended image tag, but consumers that already pulled or deployed the stale digest may require redeployment.
  • Repair depends on the external registry action and consumer adoption timing; reverting the workflow does not repair an already published tag.
Sources

.github/workflows/build.yaml[10-12]

concurrency:
  group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
  cancel-in-progress: ${{ github.event_name == 'pull_request' }}
Assessed commit 702cd53
Diagram

graph TD
  M["Pinned mise tools"] --> L["Lint job"] --> B["Build job"] --> R["Release job"]
  L --> S["Shellcheck reviewdog"]
  L --> J["jactionlint"]
  L --> Z["zizmor"]
Loading
High-Level Assessment

Keep the checks in the existing lint job so failures block publishing without adding another workflow. The GitHub CLI replacement preserves create-or-update release behavior while removing the release-action dependency.

Files changed (2) +53 / -11

Other (2) +53 / -11
build.yamlExpand CI linting and harden build and release jobs +49/-11

Expand CI linting and harden build and release jobs

• Adds ShellCheck reporting, jactionlint, and zizmor to the lint job. Limits cancellation to pull requests, adds job timeouts, disables persisted checkout credentials, passes the Docker token through the step environment, and replaces the release action with GitHub CLI create-or-update logic.

.github/workflows/build.yaml

mise.tomlPin CI lint tool versions +4/-0

Pin CI lint tool versions

• Pins jactionlint, ShellCheck, and zizmor for installation by mise in the lint job.

mise.toml

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1)

Grey Divider


Remediation recommended

1. Release lookup failures hide their cause 🐞 Bug
Description
gh release view discards its error output and treats every nonzero exit as proof that the release
is missing. If the lookup fails because of an API, authentication, or permission error, the step
attempts gh release create instead and can report that command’s failure rather than the original
error.
Code

.github/workflows/build.yaml[116]

+          if gh release view "v${VERSION}" > /dev/null 2>&1; then
Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The release step interprets every failed lookup as an absent release, hiding API and authentication failures behind a create attempt.

## Fix Focus Areas
- .github/workflows/build.yaml[114-120]

## Recommended Fix
Check whether the lookup specifically returned not found before creating the release. For any other lookup failure, surface the original error and fail the step; retain the existing edit and create behavior for successful lookups and confirmed absence.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Dismiss ↗ | View ↗


Grey Divider

Tip of the day
💡 Did you know, you can turn on the rule miner and Qodo learns your standards from review history

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@viceice
viceice merged commit 1f0ef89 into main Nov 20, 2026
4 checks passed
@viceice
viceice deleted the viceice/ci/mise-lint branch November 20, 2026 14:28
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