Pin both base images by digest and assert the resolve carries its hashes (images-to-forge P1e) #1

Open
pluto wants to merge 3 commits from pluto/p1-pin into main
Member

P1e of the images-to-forge package (macula-io/martha#601), under DECIDED 2026-11-22 "images should move to forgejo".

What it pins

  • Containerfile: both FROMs by @sha256 at the FROM line. The tag stays beside each digest as a comment, so a reader can see which tag the digest was taken at; the ARGs that carried the tag are gone.
  • scripts/assert_mix_lock_has_hashes.sh, run from .github/workflows/ci.yml after mix deps.get: every :hex entry in the resolve must carry the checksum hex published with it, and the check fails when the lock names no hex entry at all.

Why
A tag can be moved, so a build that names one builds other bytes later. A lock written before Elixir 1.14 stops at "hexpm" and pins a name and a version, not bytes, and the signer that builds releases refuses a tree on exactly that.

Proof
The checker passes a real lock 39/39 and refuses a stripped checksum, an empty lock and a missing one.

The branch also merges main (which carries this repository's workflow port) so the pin fast-forwards onto it. ci.yml auto-merged the port's guards and this branch's step; both sides were read back after the merge.

P1e of the images-to-forge package (macula-io/martha#601), under DECIDED 2026-11-22 "images should move to forgejo". **What it pins** - `Containerfile`: both `FROM`s by `@sha256` at the `FROM` line. The tag stays beside each digest as a comment, so a reader can see which tag the digest was taken at; the ARGs that carried the tag are gone. - `scripts/assert_mix_lock_has_hashes.sh`, run from `.github/workflows/ci.yml` after `mix deps.get`: every `:hex` entry in the resolve must carry the checksum hex published with it, and the check fails when the lock names no hex entry at all. **Why** A tag can be moved, so a build that names one builds other bytes later. A lock written before Elixir 1.14 stops at `"hexpm"` and pins a name and a version, not bytes, and the signer that builds releases refuses a tree on exactly that. **Proof** The checker passes a real lock 39/39 and refuses a stripped checksum, an empty lock and a missing one. The branch also merges `main` (which carries this repository's workflow port) so the pin fast-forwards onto it. `ci.yml` auto-merged the port's guards and this branch's step; both sides were read back after the merge.
Merge forge main into pluto/p1-pin (images-to-forge P1e, macula-io/martha#601)
Some checks failed
c4 model / c4-model-1 (pull_request) Successful in 5s
c4 model / c4-model (pull_request) Successful in 0s
ci / guard-1 (pull_request) Has been skipped
ci / guard (pull_request) Successful in 0s
ci / gates (OTP 28.4.3 / Elixir 1.18.4) (pull_request) Failing after 4s
ci / elixir in . (container) (pull_request) Has been skipped
ci / elixir in . (pull_request) Failing after 3s
ci / Dependency advisories (pull_request) Failing after 0s
ci / image (amd64) (pull_request) Has been cancelled
ci / attest (pull_request) Has been cancelled
6ae0d1e324
ci: the container job checks out in plain shell, no marketplace action (macula-io/martha#601)
Some checks failed
ci / gates (OTP 28.4.3 / Elixir 1.18.4) (pull_request) Successful in 12m4s
ci / guard-1 (pull_request) Has been skipped
c4 model / c4-model-1 (pull_request) Successful in 2s
c4 model / c4-model (pull_request) Successful in 0s
ci / elixir in . (pull_request) Failing after 3s
ci / guard (pull_request) Successful in 0s
ci / elixir in . (container) (pull_request) Has been skipped
ci / Dependency advisories (pull_request) Failing after 0s
ci / image (amd64) (pull_request) Has been skipped
ci / attest (pull_request) Failing after 0s
80e4dfd000
actions/checkout@v4 is a JavaScript action, and this job runs in its own
container — a macula-ci image, which carries no node — so the action died at
step 0 with exitcode 127 ("node": executable file not found).

The replacement step is BYTE-IDENTICAL in every repository on the forge: the
token reaches git through GIT_CONFIG_COUNT/GIT_CONFIG_KEY_0/GIT_CONFIG_VALUE_0
(http.extraHeader) in the environment, never through a URL or on a command
line; the run's own sha is fetched and checked out; and the step refuses any
tree that is not that sha. It is also the candidate for option B, one script
baked into macula-ci-images (a follow-up there, not tonight).

The rest of the job loses its marketplace actions under the same rule: the
two actions/cache steps (the instance runner keeps no cache for a plain-shell
step) and actions/upload-artifact (its only consumer is the image job, which
runs on github.com only).

This follows the no-marketplace CI rule (DECIDED 2026-11-22 "do both").
Some checks failed
ci / gates (OTP 28.4.3 / Elixir 1.18.4) (pull_request) Successful in 12m4s
ci / guard-1 (pull_request) Has been skipped
c4 model / c4-model-1 (pull_request) Successful in 2s
c4 model / c4-model (pull_request) Successful in 0s
ci / elixir in . (pull_request) Failing after 3s
ci / guard (pull_request) Successful in 0s
ci / elixir in . (container) (pull_request) Has been skipped
ci / Dependency advisories (pull_request) Failing after 0s
ci / image (amd64) (pull_request) Has been skipped
ci / attest (pull_request) Failing after 0s
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin pluto/p1-pin:pluto/p1-pin
git switch pluto/p1-pin
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
macula-services/mcl-kanban!1
No description provided.