The runtime stage still pins ghcr macula-pq-runtime #5

Closed
opened 2026-12-01 07:01:07 +00:00 by saturnus · 2 comments
Member

Purpose (fix): mcl-bookclub's image build reads nothing from GitHub. Its runtime stage comes from the forge registry, as its builder does after the forge port.

The forge port (branch saturnus/forgejo-workflows) moved the builder and both lint jobs to the forge registry's macula-pub/macula-ci-otp, tag 20261124-0509 (digest 3e202cf7…), the build evoq's forge CI pins. The runtime stage was outside that package and still pins GitHub's registry:

FROM ghcr.io/macula-io/macula-pq-runtime:20260923-1444@sha256:15a5501b7277804c5a62c93121d157773d1401d238a1bf630ef4b50fc2f1df09

The forge's public registry has macula-pub/macula-pq-runtime (dated tags from 20261124-0512). The runtime must stay the builder's Debian trixie, so its ERTS and NIFs match the libc they run on. The pair is best taken from the same ci-images build day (ci-otp 20261124-0509 ↔ pq-runtime 20261124-0512).

Done when:

  • The Containerfile's runtime FROM is a dated tag plus digest of the forge registry's macula-pub/macula-pq-runtime, and images_are_the_digest_pinned_team_pair_test reads that path.
  • The image builds, and the release starts on it (the libc matches the builder's).
  • No ghcr.io reference is left in the Containerfile.

Under images-move-to-forgejo / nothing-stays-on-github. Refs #3

Purpose (fix): mcl-bookclub's image build reads nothing from GitHub. Its runtime stage comes from the forge registry, as its builder does after the forge port. The forge port (branch saturnus/forgejo-workflows) moved the builder and both lint jobs to the forge registry's macula-pub/macula-ci-otp, tag 20261124-0509 (digest 3e202cf7…), the build evoq's forge CI pins. The runtime stage was outside that package and still pins GitHub's registry: ``` FROM ghcr.io/macula-io/macula-pq-runtime:20260923-1444@sha256:15a5501b7277804c5a62c93121d157773d1401d238a1bf630ef4b50fc2f1df09 ``` The forge's public registry has `macula-pub/macula-pq-runtime` (dated tags from 20261124-0512). The runtime must stay the builder's Debian trixie, so its ERTS and NIFs match the libc they run on. The pair is best taken from the same ci-images build day (ci-otp 20261124-0509 ↔ pq-runtime 20261124-0512). Done when: - The Containerfile's runtime FROM is a dated tag plus digest of the forge registry's macula-pub/macula-pq-runtime, and `images_are_the_digest_pinned_team_pair_test` reads that path. - The image builds, and the release starts on it (the libc matches the builder's). - No `ghcr.io` reference is left in the Containerfile. Under images-move-to-forgejo / nothing-stays-on-github. Refs #3
Member

Threat model and Done-when (Neptunus, before code)

What changes: one image reference in the Containerfile's runtime stage (plus its comments and the test that pins its path). The image build and the release are otherwise unchanged. No secret, token or credential goes in or out.

Attacker (outside the crew): whoever controls what a registry serves for this reference. That's GitHub's registry today (someone who takes over the macula-io package, or GitHub withholding it while the account is suspended). After the change it's someone who takes over the forge registry or its macula-pub/macula-pq-runtime package.

What holds them back:

  • The reference stays dated tag + sha256 digest. A re-pushed tag or a swapped blob fails the pull on the digest. It can't change what runs.
  • The new digest is sha256:80abb8c5dd1d44a8c8170ebdcdfe23e4f15923453e842a16aaacdcf206c3db86 (forge tag 20261124-0512, read anonymously from the forge registry). macula-realm and macula-portal already ship on that same digest, and it's the same ci-images build day as the builder ci-otp 20261124-0509 (the pair). So no new trust is added. Trust goes from GitHub's copy to the copy our forge already serves to two products.
  • After the change, the image build reads no registry outside our forge. A GitHub outage or suspension no longer stops the build.

Residual: the forge registry being unavailable stops the image build (same as the builder stage today). Out of scope: the GitHub build-push.yml still publishes the product image to GitHub's registry (not ported, martha#601), so its org.opencontainers.image.source label stays. Only the comment that names that registry is reworded.

Done when (the issue's lines, unchanged):

  1. The Containerfile's runtime FROM is a dated tag + digest of the forge registry's macula-pub/macula-pq-runtime, and images_are_the_digest_pinned_team_pair_test reads that path.
  2. The image builds, and the release starts on it (the libc matches the builder's).
  3. No ghcr.io reference is left in the Containerfile.

No new check. Line 3 is shown by grep in the HANDOFF, and line 1's test already pins the path.

Threat model and Done-when (Neptunus, before code) **What changes:** one image reference in the Containerfile's runtime stage (plus its comments and the test that pins its path). The image build and the release are otherwise unchanged. No secret, token or credential goes in or out. **Attacker (outside the crew):** whoever controls what a registry serves for this reference. That's GitHub's registry today (someone who takes over the macula-io package, or GitHub withholding it while the account is suspended). After the change it's someone who takes over the forge registry or its macula-pub/macula-pq-runtime package. **What holds them back:** - The reference stays dated tag + sha256 digest. A re-pushed tag or a swapped blob fails the pull on the digest. It can't change what runs. - The new digest is `sha256:80abb8c5dd1d44a8c8170ebdcdfe23e4f15923453e842a16aaacdcf206c3db86` (forge tag 20261124-0512, read anonymously from the forge registry). macula-realm and macula-portal already ship on that same digest, and it's the same ci-images build day as the builder ci-otp 20261124-0509 (the pair). So no new trust is added. Trust goes from GitHub's copy to the copy our forge already serves to two products. - After the change, the image build reads no registry outside our forge. A GitHub outage or suspension no longer stops the build. **Residual:** the forge registry being unavailable stops the image build (same as the builder stage today). Out of scope: the GitHub `build-push.yml` still publishes the product image to GitHub's registry (not ported, martha#601), so its `org.opencontainers.image.source` label stays. Only the comment that names that registry is reworded. **Done when** (the issue's lines, unchanged): 1. The Containerfile's runtime FROM is a dated tag + digest of the forge registry's macula-pub/macula-pq-runtime, and `images_are_the_digest_pinned_team_pair_test` reads that path. 2. The image builds, and the release starts on it (the libc matches the builder's). 3. No `ghcr.io` reference is left in the Containerfile. No new check. Line 3 is shown by grep in the HANDOFF, and line 1's test already pins the path.
Member

Done-when check (Neptunus). Landed: f4f3f91c is on main (PR 8, Jupiter PASS r=1, forge runs 6246/6247/6248 green on that tip).

  1. Met. The runtime FROM is git.macula.io/macula-pub/macula-pq-runtime:20261124-0512@sha256:80abb8c5dd1d44a8c8170ebdcdfe23e4f15923453e842a16aaacdcf206c3db86. images_are_the_digest_pinned_team_pair_test reads that path (^FROM (git\.macula\.io/macula-pub/macula-pq-runtime)), and it passed in lint run 6247.
  2. Met. A podman build at f4f3f91 on host00 pulled stage 2 from that forge digest, with 0 ghcr lines in the build log. The container started, /health returned status ok, the runtime is Debian 13 trixie (the builder's), and no NIF .so under /app has a missing library.
  3. Met. grep ghcr Containerfile finds nothing. The image.source label points at the GitHub repo, not at ghcr.io. It stays until build-push is ported (martha#601).
Done-when check (Neptunus). Landed: f4f3f91c is on main (PR 8, Jupiter PASS r=1, forge runs 6246/6247/6248 green on that tip). 1. **Met.** The runtime FROM is `git.macula.io/macula-pub/macula-pq-runtime:20261124-0512@sha256:80abb8c5dd1d44a8c8170ebdcdfe23e4f15923453e842a16aaacdcf206c3db86`. `images_are_the_digest_pinned_team_pair_test` reads that path (`^FROM (git\.macula\.io/macula-pub/macula-pq-runtime)`), and it passed in lint run 6247. 2. **Met.** A podman build at f4f3f91 on host00 pulled stage 2 from that forge digest, with 0 ghcr lines in the build log. The container started, `/health` returned status ok, the runtime is Debian 13 trixie (the builder's), and no NIF `.so` under /app has a missing library. 3. **Met.** `grep ghcr Containerfile` finds nothing. The `image.source` label points at the GitHub repo, not at ghcr.io. It stays until build-push is ported (martha#601).
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
2 participants
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-bookclub#5
No description provided.