ci: the node24 leaf is one layer, so the runner-image builder accepts it #24

Merged
noel merged 1 commit from ci/node24-one-layer into main 2026-10-25 21:08:22 +00:00
Owner

Follow-up to #23 (CVE-2026-111497). The runner-image builder (scripts/forgejo-runner-image in noel/infra) refused #23's leaf: "built image is not the base plus one layer from the pinned source". It accepts only the base plus exactly one layer.

Cause

#23's leaf had a separate check-only RUN after the ENV PATH, and it produced a second layer in two ways:

  1. npm 24 writes a V8 compile cache to /tmp/node-compile-cache, 442 kB in the first build.
  2. With /tmp on a tmpfs, BuildKit with the containerd image store still emits a layer for a RUN that writes nothing. That layer is the standard empty diff, sha256:5f70bf18….

Change

  • The checks now run at the end of the install RUN, with PATH set to the value the ENV then records.
  • That RUN mounts a tmpfs at /tmp, so npm's cache leaves no bytes.
  • The ENV PATH moves after the RUN.
  • The assertions themselves are unchanged.

Checks

scripts/forgejo-runner-image dry-run (noel/infra main da7046d8) on this commit, against the local sha256:1f0ae8ac… parent:

Step Result
Build (--network none, --no-cache) exit 0; base plus 1 layer (34 layers)
Manifest / config sha256:f85418d9… / sha256:a517aa48…
Installed verifier (verify-installed-system-hz-node24.py, uid 1000, read-only root, no network) passed, 13 commands, Codewire consumers at main 8f5eecdd
Credentials read / registry written none / none

After merge, the image is rebuilt from the merge commit, then promoted and adopted through the owner-approved steps.

Follow-up to #23 (CVE-2026-111497). The runner-image builder (`scripts/forgejo-runner-image` in noel/infra) refused #23's leaf: "built image is not the base plus one layer from the pinned source". It accepts only the base plus exactly one layer. ## Cause #23's leaf had a separate check-only `RUN` after the `ENV PATH`, and it produced a second layer in two ways: 1. npm 24 writes a V8 compile cache to `/tmp/node-compile-cache`, 442 kB in the first build. 2. With `/tmp` on a tmpfs, BuildKit with the containerd image store still emits a layer for a `RUN` that writes nothing. That layer is the standard empty diff, `sha256:5f70bf18…`. ## Change - The checks now run at the end of the install `RUN`, with `PATH` set to the value the `ENV` then records. - That `RUN` mounts a tmpfs at `/tmp`, so npm's cache leaves no bytes. - The `ENV PATH` moves after the `RUN`. - The assertions themselves are unchanged. ## Checks `scripts/forgejo-runner-image dry-run` (noel/infra main da7046d8) on this commit, against the local `sha256:1f0ae8ac…` parent: | Step | Result | |---|---| | Build (`--network none`, `--no-cache`) | exit 0; base plus 1 layer (34 layers) | | Manifest / config | `sha256:f85418d9…` / `sha256:a517aa48…` | | Installed verifier (`verify-installed-system-hz-node24.py`, uid 1000, read-only root, no network) | passed, 13 commands, Codewire consumers at main 8f5eecdd | | Credentials read / registry written | none / none | After merge, the image is rebuilt from the merge commit, then promoted and adopted through the owner-approved steps.
The runner-image builder accepts only the base plus exactly one layer. The
leaf had a separate check-only RUN, which produced a second layer: first
npm 24's V8 compile cache in /tmp/node-compile-cache (442 kB), and with a
tmpfs /tmp, BuildKit's empty layer for a RUN that writes nothing. The checks
now run at the end of the install RUN under the new PATH, with /tmp a tmpfs.
noel merged commit 6a1e5c6bc3 into main 2026-10-25 21:08:22 +00:00
noel deleted branch ci/node24-one-layer 2026-10-25 21:08:23 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
noel/act-node-docker!24
No description provided.