Repository navigation
Description
Problem
The last independent review of PR #3 (head aa9d707) approved it and left four small points:
- No CI step runs hadolint, actionlint or shellcheck on the files of this repository. Issue feat: build and publish the devtools image from debian sid #1 says that the Dockerfile passes hadolint, but no check enforces it, so a later change can break it unseen.
# check=error=trueenforces only the BuildKit checks. - The push job's metadata step declares the
latestand date tags but uses only the labels, so theorg.opencontainers.image.versionlabel of each platform image can showlatestinstead of the date tag that the publish job sets. - A comment in
.github/workflows/image.yml(about line 52) gives an old image size. - One header comment line of
Dockerfile(line 7) is 131 characters; the others wrap at about 100.
Change
- Add a lint job to the workflow that runs on every pull request: hadolint on each Dockerfile, actionlint and zizmor on the workflows, and shellcheck on
test/*.sh, with the tools from the devtools image or pinned actions, and a job timeout. - The push job's metadata step gives the version label the date tag.
- Correct the size comment (or remove the number) and rewrap the Dockerfile comment.
Proof
- The lint job fails on a pull request that adds a hadolint finding, and passes on main.
docker buildx imagetools inspect --rawof a pushed platform image shows the date tag inorg.opencontainers.image.version.
Alternatives check of 2026-11-19: not-applicable.
Class: ci, no search.
Tool: none found.
Proposed design
Problem statement
PR #3 passed review and left four points open. No CI step runs hadolint, actionlint, zizmor or shellcheck on this repository, so a later change to the Dockerfile, a workflow or a test script can break a lint unseen. The push job's metadata step declares the latest tag before the date tag, so the org.opencontainers.image.version label of each platform image can show latest. A workflow comment gives a stale image size, and one Dockerfile comment line is 131 characters. The change adds a lint job, gives the version label the date tag, and fixes the two comments.
Acceptance criteria
Requirement: Lint job on pull requests and main
The image workflow SHALL run a lint job on every pull request and on every push to the default branch.
Scenario: The lint job runs on a pull request and on main
- WHEN A live check opens a pull request and pushes to the default branch.
- THEN Both runs show the
lintjob, and its hadolint, actionlint, zizmor and shellcheck steps each exit 0.
Requirement: hadolint checks every Dockerfile
The lint job SHALL run hadolint on each Dockerfile of the repository.
Scenario: A pull request adds a hadolint finding
- WHEN A pull request adds the instruction
RUN cd /tmptoDockerfileand a live check runs thelintjob. - THEN The
lintjob fails and its hadolint step prints rule DL3003 forDockerfile.
Requirement: actionlint and zizmor check the workflows
The lint job SHALL run the maintained kjanat/actionlint fork and zizmor on every file under .github/workflows/.
Scenario: A pull request adds an unpinned action
- WHEN A pull request adds a step with
uses: actions/checkout@v4to.github/workflows/image.ymland a live check runs thelintjob. - THEN The
lintjob fails and its zizmor step reports anunpinned-usesfinding for.github/workflows/image.yml.
Requirement: shellcheck checks the test scripts
The lint job SHALL run shellcheck on every test/*.sh script.
Scenario: A pull request adds a shellcheck finding
- WHEN A pull request adds
echo $UNQUOTEDtotest/tools.shand a live check runs thelintjob. - THEN The
lintjob fails and its shellcheck step prints SC2086 fortest/tools.sh.
Requirement: Read-only lint job
The lint job MUST grant the workflow token read scope only.
Scenario: zizmor finds no excessive permission
- WHEN A live check runs
zizmor .github/workflows/image.yml. - THEN zizmor exits 0 and reports no
excessive-permissionsfinding.
Requirement: Lint job timeout
The lint job MUST set timeout-minutes: 15.
Scenario: A hung lint step is cancelled after fifteen minutes
- WHEN A live check runs the
lintjob with a step that sleeps for 16 minutes. - THEN GitHub Actions cancels the
lintjob, and the run shows that the job exceeded the maximum execution time of 15 minutes.
Requirement: Version label uses the date tag
The push job MUST set org.opencontainers.image.version to the date tag of each platform image.
Scenario: Inspect a pushed platform image
- WHEN A live check pulls
<image>@sha256:<platform digest>from main and runsdocker image inspect --format '{{ index .Config.Labels "org.opencontainers.image.version" }}' <image>@sha256:<platform digest>. - THEN The command prints the date tag, not
latest.
Requirement: Workflow comment states no image size
The image workflow MUST NOT state an image size in a comment.
Scenario: No size unit in a workflow comment
- WHEN A live check runs
grep -nE '^[[:space:]]*#.*[0-9]+ ?(MB|MiB|GB|GiB)' .github/workflows/image.yml. - THEN The command prints no line.
Requirement: Dockerfile comments wrap at 100 characters
The Dockerfile MUST wrap every explanatory comment line at 100 characters.
Scenario: No explanatory Dockerfile comment line exceeds 100 characters
- WHEN A live check runs
awk '/^[[:space:]]*#/ && !/^[[:space:]]*# (syntax|check)=/ && length > 100 { print FNR": "length }' Dockerfile. - THEN The command prints no line.
Existing Tool Considered
hadolint (each Dockerfile), the maintained kjanat/actionlint fork (GitHub Actions workflows), zizmor (workflow security) and shellcheck (shell scripts) are the open, maintained tools that cover the lint needs. mise.toml:14-16 records that upstream rhysd/actionlint has had no release since 1.7.12, so the fork is the maintained actionlint. The devtools image already installs hadolint, the fork and shellcheck (Dockerfile:32-33, Dockerfile:78, README.md:51-52), so their versions stay in mise.toml/mise.lock and apt; it holds no zizmor, whose documentation names the official image ghcr.io/zizmorcore/zizmor (https://docs.zizmor.sh/installation, fetched 2026-11-19). The tools lack the metadata version-label fix and the two comment fixes, which the change does in the workflow and the Dockerfile.
Key questions
- Do the files that this issue edits exist at the refined commit?: Yes. The commit holds
Dockerfile,.github/workflows/image.ymlandtest/tools.sh, so no other issue must land first. [sources: .github/workflows/image.yml, test/tools.sh] - Which workflow file holds the
lintjob?:.github/workflows/image.yml, because that workflow already runs on every pull request and on each push to main (.github/workflows/image.yml:4-6), so the job needs no new trigger. (best practice) [sources: .github/workflows/image.yml:4, .github/workflows/image.yml:5, .github/workflows/image.yml:6]- Chosen: Add the job to
.github/workflows/image.yml. The workflow already runs on pull requests and on main, and it holds the image build and the test scripts. - Rejected: Add a new
.github/workflows/lint.yml. It repeats the trigger block and the concurrency group of the image workflow.
- Chosen: Add the job to
- Which open, maintained tools cover the lint needs?: hadolint for Dockerfiles, the maintained
kjanat/actionlintfork for GitHub Actions workflows, zizmor for workflow security and shellcheck for shell scripts.mise.toml:14-16records that upstreamrhysd/actionlinthas had no release since 1.7.12, so the fork is the maintained actionlint. (best practice) [sources: mise.toml:14, mise.toml:16, mise.lock:124, README.md:51, README.md:52]- Chosen: hadolint, the
kjanat/actionlintfork, zizmor and shellcheck. Each tool targets one file type, and the fork is the maintained actionlint (mise.toml:14-16). - Rejected: Upstream
rhysd/actionlint. It has had no release since 1.7.12 (mise.toml:14-16), so it does not know the current runner labels. - Rejected: One general-purpose linter. No single maintained tool covers Dockerfile, workflow and shell lint with the same rules.
- Rejected: Custom scripts. The project would build and keep code that the tools already provide.
- Chosen: hadolint, the
- How does the
lintjob run the four tools?: Onelintjob onubuntu-24.04runs each tool in a container with the workspace mounted read-only. hadolint, actionlint and shellcheck come from the project's published devtools imageghcr.io/dan-petty/devtools:latest@sha256:<digest>(README.md:13-16), so their versions stay inmise.toml/mise.lockand apt and actionlint is the maintainedkjanat/actionlintfork (mise.toml:14-16). zizmor comes from its official imageghcr.io/zizmorcore/zizmor@sha256:<digest>because the devtools image does not contain it (https://docs.zizmor.sh/installation, fetched 2026-11-19). The job setspermissions: contents: read. (best practice) [sources: README.md:13, README.md:16, mise.toml:16, https://docs.zizmor.sh/installation]- Chosen: Devtools image for hadolint, actionlint and shellcheck; zizmor's official image. The devtools image is the project's single source for the three tool versions and holds the maintained actionlint fork; zizmor is absent, and its documentation names the official image.
- Rejected: Official images for all four. Upstream
rhysd/actionlintis stale (mise.toml:14-16), the repository names no official image for the fork, and four digests copy three tool versions into the workflow againstREADME.md:45. - Rejected: Install the tools at run time. The install is unpinned and slower than a pinned image.
- Rejected: The devtools image alone. It holds no zizmor.
- Which runner label does the
lintjob use?:ubuntu-24.04, the GitHub-hosted label that the image workflow andREADME.md:34already use. (best practice) [sources: .github/workflows/image.yml:36, .github/workflows/image.yml:39, README.md:34]- Chosen:
ubuntu-24.04. The jobs of the image workflow use this label, so the lint job follows the same pin. - Rejected:
ubuntu-26.04. Only.github/workflows/clear-status.yml:16uses it, not the image workflow. - Rejected: A self-hosted runner. The repository holds no runner setup.
- Chosen:
- How does the push job's metadata step give the version label the date tag?: Remove the
latesttag from the push job's metadatatagslist. The push job uses onlysteps.meta.outputs.labelsand pushes by digest, and the publish job giveslatestto the attested manifest list after the attestation, so the date tag becomes the only tag and the version label. (best practice) [sources: .github/workflows/image.yml:185, .github/workflows/image.yml:186, .github/workflows/image.yml:204, .github/workflows/image.yml:376, .github/workflows/image.yml:401]- Chosen: Remove the
latesttag from the push job. The push job uses only the labels, so thelatesttag there is dead weight and lowers the date tag. - Rejected: Give the date tag a higher
priority. It keeps a dead tag and makes the label depend on the priority order. - Rejected: Set
org.opencontainers.image.versionin thelabelsinput. It repeats the date expression in two places, so the two can diverge.
- Chosen: Remove the
- Should the workflow comment keep an image size?: Remove the size number from the comment. A corrected number goes stale after the next image change. (best practice) [sources: .github/workflows/image.yml:52]
- Chosen: Remove the number. No number can go stale.
- Rejected: Correct the number. A corrected number goes stale after the next image change.
- What timeout does the
lintjob set?:timeout-minutes: 15. The devtools image is large (the workflow comment at line 52 gives 4.6 GB), so 15 minutes leaves room for the pull and four linters; the default is 360 minutes. (best practice) [sources: .github/workflows/image.yml:52, .github/workflows/image.yml:344]- Chosen: 15 minutes. Leaves room for the devtools image pull and four linters, and stops a hung job well short of the 360-minute default.
- Rejected: 10 minutes. Tight for a pull of the large devtools image.
- Rejected: 30 minutes. Holds a runner too long for a lint job.
- Rejected: No timeout. The default is 360 minutes, which is too long.
- At which column do the Dockerfile comment lines wrap?: 100 columns for the explanatory comment lines. The header comment lines at
Dockerfile:4-9wrap at about 100, and line 7 is the 131-character outlier. The# syntax=and# check=lines (Dockerfile:1-2) are parser directives and must stay on one line, so the check exempts them. (proposed)- Chosen: 100 characters for explanatory comments, parser directives exempt. The other header lines wrap at about 100, and the parser directives cannot wrap.
- Rejected: 100 characters for every comment line. The
# syntax=directive is longer than 100 characters and cannot wrap. - Rejected: 120 characters. The 131-character line would still fail and the limit would not match the other lines.
- Rejected: Keep the 131-character line. The review asked for the rewrap.
- Does hadolint check the test Dockerfiles too?: Yes. The
lintjob runs hadolint onDockerfile,test/tools.Dockerfileandtest/copy-probe.Dockerfile. (best practice) [sources: .github/workflows/image.yml:79, .github/workflows/image.yml:85, test/tools.Dockerfile, test/copy-probe.Dockerfile]- Chosen: Each Dockerfile. The issue says each Dockerfile, and the workflow builds the two test Dockerfiles.
- Rejected: Only the root
Dockerfile. It leavestest/tools.Dockerfileandtest/copy-probe.Dockerfileunchecked.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
devops-cli-service commentedon Nov 19, 2026
Both items touch the devtools Dockerfile, but item 1 builds the image while the candidate adds lint checks and fixes the version label.[-]ci: lint the repository files in CI and fix the image version label[/-][+]ci: Add lint to CI and fix the image version label[/+]devops-cli-service commentedon Nov 19, 2026
The job shortened the title of this item. The summary had 63 characters, and the limit is 60. The type and the scope stay.
ci: lint the repository files in CI and fix the image version labelci: Add lint to CI and fix the image version labeldevops-cli-service commentedon Nov 19, 2026
Next step: the alternatives check records a verdict. See the section Proposed design of the body.
devops-cli-service commentedon Nov 19, 2026
Next step: the stage job writes the plan of the item. See the section Proposed design of the body.