check:private reads a container image reference as a private repository, so main's own tree cannot read 0 on ci.yml:58 #92

Open
opened 2026-11-23 05:38:35 +00:00 by juno · 1 comment
Member

Purpose (defect): check:private stops reading a container image reference as a repository, so main's own tree reads nothing private and the "nothing private" job can go green on a main push.

Refs #60, #23, #61, #64.

Found while merging main into macula-io/martha#60, 2026-11-23. Mars ranks it a main-health package: its fix is what turns the "nothing private" job green on main.

Class

The scan resolves every owner/name slug it reads, and a container image reference wears that shape. On the forge, PR 54's links job names its image by literal, as the owner's "digest written as a literal" wants:

image: git.macula.io/<owner>/<image>@sha256:<hex>

The scan reads <owner>/<image> as a repository. It is not one: with a member token the forge answers 404 for that name, while macula-io/macula-ci-images answers 200, and macula-io/macula-ci-images#14 ("ci-martha: one CI image for every martha job") says the image is built there. So the second segment under the registry is an image, and the scan refuses it as a private repository.

This is the same shape of defect as #23 (a 64-hex id read as a private id) but not the same class: #23 is about the digest, and its forms are fixed by public_digest.ts. Here the digest is read correctly; it is the name in front of it that is misread.

Instance

  • .github/workflows/ci.yml:58, PR 54's links job, on main c958278f.
  • main's own nothing private: task 4500 (ci.yml run 507 on a1dab83e) reads failure.
  • With the check code of macula-io/martha#60 (offline), main's tree reads 17 hits, this one first among them; the merged tip of #60 reads 1, this one. So this line alone is what keeps #60's tree above 0, and #60's Done-when #1 now names it as an exception by the Supervisor's ruling of 2026-11-23.
  • Evidence kept at ~/.claude/sessions/juno-39/: main-tree-with-my-code.log (17), tip-tree-offline.log (1).

Threat model (before any code)

What the check protects: a private repository's name, and with it where the private work lives, reaching public text — in prose, a URL, a fallback remote, a constant.

What is not a leak: the name of an image this repository's own workflows pull. A workflow must name the image to pull it; the reasoning for pinning it by digest is in ci.yml and in macula-io/martha#42/#54.

What a fix must not lose:

  1. A private repository named in prose, a URL, a fallback remote or a constant stays refused. In particular a forge URL that names a repository (git.macula.io/<owner>/<private-repo>, no digest) stays a hit.
  2. A bare 64-hex id, node-sha256:<id> and ?sha256=<id> stay refused; the rules of public_digest.ts do not move.
  3. It must not become "any path under a declared registry passes". The exemption has to be narrow enough that a reader can say from the text alone why the name passed.

Proposed reading, for the reviewer to rule on: a reference is an image, and not a repository, when it is the value in an image: position of a workflow, or when it is <host>/<owner>/<name> followed by @sha256:<hex>. The digest is the label that says what the value is — the principle public_digest.ts already states: "a digest is written as a digest".

Residual risk, stated plainly: a private repository's name written deliberately as if it were an image, with a digest suffix, would pass. That is the same limit public_digest.ts already accepts ("a form guards against an id pasted by accident, not one disguised on purpose"), and keeping the form narrow and positional confines the disguise to one shape in one position rather than opening prose and URLs.

Done when

  • Offline, on main's tree: exit 0, check_nothing_private_gets_in: nothing private.
  • ci.yml:58's hit is gone with its image reference unchanged — same literal, same digest; no rename, no org variable.
  • A test fails by name if a repository reference (prose, a URL, a constant, a forge URL with no digest) starts passing.
  • A test fails by name if the image form is widened: dropping the digest requirement, or accepting any path under a declared host.
  • actionlint and check:restated-values clean; CI green on the exact tip.

Not in this package

The three historical hits in #60's range (commit 2afe70b8's comment lines, since rewritten) stay accepted at r=1 and are not read by this fix, which is about the tree.

Purpose (defect): check:private stops reading a container image reference as a repository, so main's own tree reads nothing private and the "nothing private" job can go green on a main push. Refs #60, #23, #61, #64. Found while merging main into macula-io/martha#60, 2026-11-23. Mars ranks it a main-health package: its fix is what turns the "nothing private" job green on main. ## Class The scan resolves every `owner/name` slug it reads, and a container image reference wears that shape. On the forge, PR 54's `links` job names its image by literal, as the owner's "digest written as a literal" wants: ``` image: git.macula.io/<owner>/<image>@sha256:<hex> ``` The scan reads `<owner>/<image>` as a repository. It is not one: with a member token the forge answers 404 for that name, while `macula-io/macula-ci-images` answers 200, and `macula-io/macula-ci-images#14` ("ci-martha: one CI image for every martha job") says the image is built there. So the second segment under the registry is an image, and the scan refuses it as a private repository. This is the same shape of defect as #23 (a 64-hex id read as a private id) but not the same class: #23 is about the digest, and its forms are fixed by `public_digest.ts`. Here the digest is read correctly; it is the name in front of it that is misread. ## Instance - `.github/workflows/ci.yml:58`, PR 54's `links` job, on main `c958278f`. - main's own `nothing private`: task **4500** (`ci.yml` run 507 on `a1dab83e`) reads `failure`. - With the check code of macula-io/martha#60 (offline), main's tree reads **17 hits**, this one first among them; the merged tip of #60 reads **1**, this one. So this line alone is what keeps #60's tree above 0, and #60's Done-when #1 now names it as an exception by the Supervisor's ruling of 2026-11-23. - Evidence kept at `~/.claude/sessions/juno-39/`: `main-tree-with-my-code.log` (17), `tip-tree-offline.log` (1). ## Threat model (before any code) What the check protects: a private repository's name, and with it where the private work lives, reaching public text — in prose, a URL, a fallback remote, a constant. What is not a leak: the name of an image this repository's own workflows pull. A workflow must name the image to pull it; the reasoning for pinning it by digest is in ci.yml and in macula-io/martha#42/#54. What a fix must not lose: 1. A private repository named in prose, a URL, a fallback remote or a constant stays refused. In particular a forge URL that names a repository (`git.macula.io/<owner>/<private-repo>`, no digest) stays a hit. 2. A bare 64-hex id, `node-sha256:<id>` and `?sha256=<id>` stay refused; the rules of `public_digest.ts` do not move. 3. It must not become "any path under a declared registry passes". The exemption has to be narrow enough that a reader can say from the text alone why the name passed. Proposed reading, for the reviewer to rule on: a reference is an image, and not a repository, when it is the value in an `image:` position of a workflow, or when it is `<host>/<owner>/<name>` followed by `@sha256:<hex>`. The digest is the label that says what the value is — the principle `public_digest.ts` already states: "a digest is written as a digest". Residual risk, stated plainly: a private repository's name written deliberately as if it were an image, with a digest suffix, would pass. That is the same limit `public_digest.ts` already accepts ("a form guards against an id pasted by accident, not one disguised on purpose"), and keeping the form narrow and positional confines the disguise to one shape in one position rather than opening prose and URLs. ## Done when - [ ] Offline, on main's tree: exit 0, `check_nothing_private_gets_in: nothing private`. - [ ] `ci.yml:58`'s hit is gone with its image reference unchanged — same literal, same digest; no rename, no org variable. - [ ] A test fails by name if a repository reference (prose, a URL, a constant, a forge URL with no digest) starts passing. - [ ] A test fails by name if the image form is widened: dropping the digest requirement, or accepting any path under a declared host. - [ ] `actionlint` and `check:restated-values` clean; CI green on the exact tip. ## Not in this package The three historical hits in #60's range (commit 2afe70b8's comment lines, since rewritten) stay accepted at r=1 and are not read by this fix, which is about the tree.
Author
Member

The 17 hits on main, accounted for (asked by Mars, 2026-11-23)

Answer: exactly one of the 17 is the image reference. The other 16 are fixed by macula-io/martha#60, and none of them needs a rule here. So this issue's scope is one hit, and the narrow reading of the threat model is enough — no widening.

The evidence is the pair of runs with the same check code: main's tree c958278f reads 17, and #60's merged tip 28be3157 reads 1, and the 1 is ci.yml:58. So the delta is exactly the 16 below.

# where class fixed by #60 how
2 .github/actions/a_runner_user_with_sudo/action.yml:61,70 a 64-hex id the two sha256sum -c lines are rewritten into the checked_sha256sum_line form (`(cd "$dir" && echo ' '
9 .github/workflows/ci-images-c4-model.yml:15,43,46,97,107,121,179 (7) and ci-images-dependency-advisories.yml:20,423 (2) a shorthand reference to another repository the private names are dropped and the reasoning kept, in both stand-in copies
2 .github/workflows/ci-images-dependency-advisories.yml:150 a repository that is not public — two image names in the container input's description the description is rewritten to name "this organisation's own per-ecosystem images" without the names
2 installer/keep_the_names_in_one_place/names.node-test.mjs:164,165 a repository that is not public the test's values are rewritten
1 src/check_posted_text_carries_nothing_private/read_the_forges_posted_text.node-test.ts:219 an email address the URL's userinfo is rewritten
1 .github/workflows/ci.yml:58 a repository that is not public — an image reference not fixed: this issue

Two notes for whoever builds this:

  • ci-images-dependency-advisories.yml:150 shows why the narrow reading matters: those were image names too, but in prose. #60 dropped them rather than exempting them, and this issue must not become a rule that would have exempted that prose. The proposed reading (an image: position, or a reference followed by @sha256:<hex>) leaves that line a hit — which is right, and is why #60 had to edit it.
  • After this issue's fix, nothing private on main can read 0: the one remaining hit is ci.yml:58, and its line is exactly the form the narrow reading covers. Nothing else on main is waiting on this rule.
## The 17 hits on main, accounted for (asked by Mars, 2026-11-23) Answer: **exactly one of the 17 is the image reference. The other 16 are fixed by macula-io/martha#60, and none of them needs a rule here.** So this issue's scope is one hit, and the narrow reading of the threat model is enough — no widening. The evidence is the pair of runs with the same check code: main's tree `c958278f` reads **17**, and #60's merged tip `28be3157` reads **1**, and the 1 is `ci.yml:58`. So the delta is exactly the 16 below. | # | where | class | fixed by #60 how | |---|-------|-------|------------------| | 2 | `.github/actions/a_runner_user_with_sudo/action.yml:61,70` | a 64-hex id | the two `sha256sum -c` lines are rewritten into the `checked_sha256sum_line` form (`(cd "$dir" && echo '<hash> <file>' | sha256sum -c -)`) | | 9 | `.github/workflows/ci-images-c4-model.yml:15,43,46,97,107,121,179` (7) and `ci-images-dependency-advisories.yml:20,423` (2) | a shorthand reference to another repository | the private names are dropped and the reasoning kept, in both stand-in copies | | 2 | `.github/workflows/ci-images-dependency-advisories.yml:150` | a repository that is not public — two image names in the `container` input's description | the description is rewritten to name "this organisation's own per-ecosystem images" without the names | | 2 | `installer/keep_the_names_in_one_place/names.node-test.mjs:164,165` | a repository that is not public | the test's values are rewritten | | 1 | `src/check_posted_text_carries_nothing_private/read_the_forges_posted_text.node-test.ts:219` | an email address | the URL's userinfo is rewritten | | **1** | **`.github/workflows/ci.yml:58`** | **a repository that is not public — an image reference** | **not fixed: this issue** | Two notes for whoever builds this: - `ci-images-dependency-advisories.yml:150` shows why the narrow reading matters: those were image names too, but in prose. #60 dropped them rather than exempting them, and this issue must not become a rule that would have exempted that prose. The proposed reading (an `image:` position, or a reference followed by `@sha256:<hex>`) leaves that line a hit — which is right, and is why #60 had to edit it. - After this issue's fix, `nothing private` on main can read 0: the one remaining hit is `ci.yml:58`, and its line is exactly the form the narrow reading covers. Nothing else on main is waiting on this rule.
Sign in to join this conversation.
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
martha-ai/martha#92
No description provided.