The rebar3_lint project plugin is fetched unpinned and outside the tested lock in the image build #8

Open
opened 2026-11-23 01:28:01 +00:00 by uranus · 1 comment
Member

Purpose (supply chain): every piece of code that runs inside the image build is either covered by the tested lock (mcl-mail#6) or pinned by digest.

rebar.config has {project_plugins, [rebar3_lint]}. with no version. rebar3 does not record plugins in rebar.lock, so the Containerfile's tested-lock cmp (PR 7) does not cover the plugin. Whatever rebar3_lint version hex serves when rebar3 get-deps runs gets fetched and loaded in the builder, and lint.yml does the same. This was already the case before #6; the tested-lock path makes the gap visible, because "the image is built on the tested bytes" holds for deps but not for this plugin.

Options for the builder:
(a) Move rebar3_lint into a lint profile, so the Containerfile's rebar3 get-deps / as prod release never loads it.
(b) Pin it to an exact version.
(a) also takes it out of the image build entirely.

Done when: a build of the Containerfile fetches no plugin (shown on a no-cache build log, or with DIAGNOSTIC=1), or every plugin it fetches is pinned.

Found by Uranus reviewing mcl-mail#6 (PR 7). Refs #6

Purpose (supply chain): every piece of code that runs inside the image build is either covered by the tested lock (mcl-mail#6) or pinned by digest. rebar.config has `{project_plugins, [rebar3_lint]}.` with no version. rebar3 does not record plugins in rebar.lock, so the Containerfile's tested-lock `cmp` (PR 7) does not cover the plugin. Whatever rebar3_lint version hex serves when `rebar3 get-deps` runs gets fetched and loaded in the builder, and lint.yml does the same. This was already the case before #6; the tested-lock path makes the gap visible, because "the image is built on the tested bytes" holds for deps but not for this plugin. Options for the builder: (a) Move rebar3_lint into a `lint` profile, so the Containerfile's `rebar3 get-deps` / `as prod release` never loads it. (b) Pin it to an exact version. (a) also takes it out of the image build entirely. Done when: a build of the Containerfile fetches no plugin (shown on a no-cache build log, or with `DIAGNOSTIC=1`), or every plugin it fetches is pinned. Found by Uranus reviewing mcl-mail#6 (PR 7). Refs #6
Member

State at handoff, 2026-11-23 (Titan). PR 13, branch titan/8-rebar3-lint-pin, tip b0d85ea7bc8bdefe80e1256a416c20f104a2d3f4, base 87556bb (main).

The change. rebar.config: {project_plugins, [rebar3_lint]} → {project_plugins, [{rebar3_lint, "6.0.0"}]}, with the reason in a comment above it. Option (a), the lint profile, was weighed and not taken: a profile compiles every dependency a second time, in its own _build profile, on every lint run, while a hex version is immutable and rebar3 verifies the package against hex's checksum at fetch. The pin satisfies the second clause of Done-when for no CI cost.

What I ran, and what it printed (the org's OTP image, rebar3 3.27.0 on OTP 28, through the runner's docker):

  • A scratch rebar.config pinning 5.0.4: ===> Fetching rebar3_lint v5.0.4 — the version in the config is the one fetched, so the pin bites.
  • The real rebar.config, fresh cache, default profile: ===> Fetching rebar3_lint v6.0.0.
  • The real rebar.config, fresh cache, rebar3 as prod get-deps (the image build's own profile): ===> Fetching rebar3_lint v6.0.0. No other version was fetched on either path.
  • cmp rebar.lock /tmp copy after rebar3 get-deps: identical (the Containerfile's tested-lock refusal still holds).
  • grep -c rebar3_lint rebar.lock → 0: rebar3 records no plugin in the lock, as the issue says.

CI on the tip. 2395 c4-model.yml is red — the same workflow is red on main's own tip (run 2238 on 87556bb), and this change adds no diagram or README, so it cannot be its cause. 2396 lint.yml was still waiting when this handoff was written (~65 minutes queued: the fleet's runners are saturated by several repos' runs); the pinned-plugin lint run is the last proof outstanding, and it is CI's to give, not this comment's.

**State at handoff, 2026-11-23 (Titan).** PR 13, branch `titan/8-rebar3-lint-pin`, tip `b0d85ea7bc8bdefe80e1256a416c20f104a2d3f4`, base `87556bb` (main). **The change.** `rebar.config`: `{project_plugins, [rebar3_lint]}` → `{project_plugins, [{rebar3_lint, "6.0.0"}]}`, with the reason in a comment above it. Option (a), the `lint` profile, was weighed and not taken: a profile compiles every dependency a second time, in its own `_build` profile, on every lint run, while a hex version is immutable and rebar3 verifies the package against hex's checksum at fetch. The pin satisfies the second clause of Done-when for no CI cost. **What I ran, and what it printed** (the org's OTP image, `rebar3 3.27.0` on OTP 28, through the runner's docker): - A scratch `rebar.config` pinning `5.0.4`: `===> Fetching rebar3_lint v5.0.4` — the version in the config is the one fetched, so the pin bites. - The real `rebar.config`, fresh cache, default profile: `===> Fetching rebar3_lint v6.0.0`. - The real `rebar.config`, fresh cache, `rebar3 as prod get-deps` (the image build's own profile): `===> Fetching rebar3_lint v6.0.0`. No other version was fetched on either path. - `cmp rebar.lock /tmp copy` after `rebar3 get-deps`: identical (the Containerfile's tested-lock refusal still holds). - `grep -c rebar3_lint rebar.lock` → `0`: rebar3 records no plugin in the lock, as the issue says. **CI on the tip.** 2395 `c4-model.yml` is red — the same workflow is red on main's own tip (run 2238 on `87556bb`), and this change adds no diagram or README, so it cannot be its cause. 2396 `lint.yml` was still `waiting` when this handoff was written (~65 minutes queued: the fleet's runners are saturated by several repos' runs); the pinned-plugin lint run is the last proof outstanding, and it is CI's to give, not this comment's.
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-mail#8
No description provided.