This repository was archived by the owner on Sep 12, 2026. It is now read-only.
Repository navigation
github, docs - #14
Merged
Merged
github, docs#14
Conversation
The static-checks job fetched hadolint-Linux-x86_64 over plain `curl -sL` and `sudo install`ed it — no checksum, no signature — so a compromised or substituted release asset ran as root against the checkout on every PR. Content-pin the asset instead: `sha256sum -c` against the hash published as hadolint-Linux-x86_64.sha256 in the same release, and install it as the runner user under $HOME/.local/bin (exported via $GITHUB_PATH) rather than sudo into /usr/local/bin. `curl -f` also stops an HTTP error page being silently written out as the "binary". hadolint/hadolint-action was the first choice and does not fit: the one release that digest-pins its own hadolint image (v3.5.0, 06be81b) ships 2.15.1, whose DL3066 fails image/Dockerfile on `USER app` — v3.4.0/2.15.0 does too. The releases that lint clean (v3.1.0, v3.3.0) pull their image by mutable tag, so SHA-pinning the action still leaves the thing it actually executes floating. Hashing the binary pins it end to end.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
What
The
static-checksjob fetched the Hadolint release binary with an unverifiedcurl -sLandsudo installed it into/usr/local/bin:No
sha256sum, no cosign, no gpg anywhere in the file. A substituted orcompromised release asset ran as root against the checkout on every PR.
The job is
contents: read, so there is no repo-write path — but it reads thecheckout and can egress.
Change
sha256sum -cthe asset against the hash published ashadolint-Linux-x86_64.sha256in the same release, before it is ever executed.$HOME/.local/bin(exported through$GITHUB_PATH) instead ofsudointo/usr/local/bin.curl -f, so an HTTP error page is not silently written out as the "binary".env:as a pair, to be bumped together.Why not
hadolint/hadolint-actionIt was the first choice. It does not fit, and pinning it by commit SHA would not
have closed the hole:
image/Dockerfile06be81b)@sha256:9a3944b7…DL3066DL3066DL3066("Non-numeric user-id may not be resolvable by host system") fires onUSER appatimage/Dockerfile:85. So the only release that digest-pins theimage it runs breaks the lint, and every release that lints clean pulls its
image by mutable tag — SHA-pinning the action would leave the thing it
actually executes floating. Hashing the binary pins it end to end.
Verification
sha25656de6d5e…d55010confirmed two ways: computed from a fresh download,and byte-matched against the published
.sha256release asset.DL3066behaviour reproduced per-version withghcr.io/hadolint/hadolint2.12.0 / 2.14.0 / 2.15.0 / 2.15.1 against the real
image/Dockerfile.ubuntu:24.04: checksum OK, non-rootinstall,
hadolint 2.12.0lints the Dockerfile clean.install.actionlint(with shellcheck onrun:blocks) clean across all fourworkflows; YAML re-parsed.
The
apt-get shellcheckhalf is deliberately untouched.