internal/clan golden-render secretlint reds main: #1801's cache.idss.nz-1 public key is embedded in the gateway render but was never added to goldenRenderAllowList #1824

Closed
opened 2026-09-24 15:11:07 +00:00 by matou-build-agent · 4 comments

Symptom

TestGoldenRenderLint_NoSecretInTheConfigRepo and TestGoldenRenderLint_CatchesPlantedSecretsAndShapes (internal/clan/secretlint_test.go) FAIL on clean origin/main (verified at c2e17818):

machines/gateway/gateway-guest.nix: long base64 blob outside a vars/ path — "jryaAm0uulUbamaQ5/9Shb9SkpMW3rVv49FkzRNOf7E="
machines/vmguest/configuration.nix: long base64 blob outside a vars/ path — "jryaAm0uulUbamaQ5/9Shb9SkpMW3rVv49FkzRNOf7E="

This reds go test ./internal/clan/ (and thus nix develop .#go-ci's go test ./...) for every worker on main.

Cause

#1801 (7018fb3f) pinned Mātou's binary cache: internal/clan/matoucache.go embeds the cache.idss.nz-1 public key (jryaAm0u…) into renderGatewayGuest (and thus the vmguest render) so standing nodes trust the cache. That key is a DELIBERATE public value (a Nix binary-cache public signing key, not a secret), but it was never added to goldenRenderAllowList() in internal/clan/secretlint_test.go, so the golden-render secret scan flags it as a "long base64 blob outside a vars/ path". The second test then fails because the real flag pre-empts the planted-secret assertion.

Proposed fix

Add a reasoned goldenRenderAllowList entry for the cache.idss.nz-1 public key: Shape: shapeBase64Blob, PathContains the gateway/vmguest render (or a value-based allow), with a reason that a Nix binary-cache PUBLIC signing key carries no private material and is embedded by design (matoucache.go, #1801, ADR 0275) — never loosening a detector. Then confirm both TestGoldenRenderLint_* go green.

Found while working #1821 (standing re-supply re-render); unrelated to that slice — filing so main goes green independently.

Relates to #1801, ADR 0275, internal/clan/secretlint_test.go, internal/clan/matoucache.go.

## Symptom `TestGoldenRenderLint_NoSecretInTheConfigRepo` and `TestGoldenRenderLint_CatchesPlantedSecretsAndShapes` (`internal/clan/secretlint_test.go`) FAIL on clean `origin/main` (verified at c2e17818): ``` machines/gateway/gateway-guest.nix: long base64 blob outside a vars/ path — "jryaAm0uulUbamaQ5/9Shb9SkpMW3rVv49FkzRNOf7E=" machines/vmguest/configuration.nix: long base64 blob outside a vars/ path — "jryaAm0uulUbamaQ5/9Shb9SkpMW3rVv49FkzRNOf7E=" ``` This reds `go test ./internal/clan/` (and thus `nix develop .#go-ci`'s `go test ./...`) for every worker on main. ## Cause #1801 (`7018fb3f`) pinned Mātou's binary cache: `internal/clan/matoucache.go` embeds the `cache.idss.nz-1` public key (`jryaAm0u…`) into `renderGatewayGuest` (and thus the vmguest render) so standing nodes trust the cache. That key is a DELIBERATE public value (a Nix binary-cache public signing key, not a secret), but it was never added to `goldenRenderAllowList()` in `internal/clan/secretlint_test.go`, so the golden-render secret scan flags it as a "long base64 blob outside a vars/ path". The second test then fails because the real flag pre-empts the planted-secret assertion. ## Proposed fix Add a reasoned `goldenRenderAllowList` entry for the `cache.idss.nz-1` public key: `Shape: shapeBase64Blob`, `PathContains` the gateway/vmguest render (or a value-based allow), with a reason that a Nix binary-cache PUBLIC signing key carries no private material and is embedded by design (matoucache.go, #1801, ADR 0275) — never loosening a detector. Then confirm both `TestGoldenRenderLint_*` go green. Found while working #1821 (standing re-supply re-render); unrelated to that slice — filing so main goes green independently. Relates to #1801, ADR 0275, `internal/clan/secretlint_test.go`, `internal/clan/matoucache.go`.
Author
Member

This was generated by AI during triage.

Ruled by agent under ADR 0174 — veto anytime.

Ruling: bug + ready-for-agent.

Verification (against c2e17818, current HEAD): confirmed by code path. internal/clan/matoucache.go sets MatouCachePublicKey = "cache.idss.nz-1:jryaAm0uulUbamaQ5/9Shb9SkpMW3rVv49FkzRNOf7E=" and splices it into matouCacheNixSettings, which renderGatewayGuest (and the vmguest render) embed. The value after the cache.idss.nz-1: prefix is a 44-char base64 run with mixed case + digits, so it clears the looksBase64Secret entropy gate, sits outside any vars/ segment, and is not covered by goldenRenderAllowList() — whose only entry is the front-door CA (FrontDoorTLSGenerator). So reBase64Run/shapeBase64Blob fires on machines/gateway/gateway-guest.nix and machines/vmguest/configuration.nix, reddening TestGoldenRenderLint_NoSecretInTheConfigRepo; the same real flag pre-empts the planted-secret assertion in TestGoldenRenderLint_CatchesPlantedSecretsAndShapes. Symptom matches the report exactly. (No go/nix toolchain in the triage environment, so this is a static confirmation, not a live run.)

Why this is a two-way door: the fix is the designed remedy — a reasoned goldenRenderAllowList() entry (the test itself instructs "add a reasoned goldenRenderAllowList entry — never loosen a detector"). It is a single Go test-file edit in internal/clan/, fully revertible by a later commit, and provable green by the two existing TestGoldenRenderLint_* tests. The value is a Nix binary-cache public signing key already committed to main (ADR 0275, #1801) — recording an already-public, already-shipped value as reviewed is not a security-posture widening, and it touches no credentials, member-facing trust surface, data, or spend. Not a .sandcastle/, host-cred, live-infra, or design-tier surface, so it is a swarm-worker (ready-for-agent) task, not ready-for-session. This is not an app report (no origin: app-report marker; filed by the internal build agent), so no landing-pr policy attaches.

Agent Brief

Category: bug
Summary: Golden-render secretlint reds main because the cache.idss.nz-1 public signing key embedded by #1801 is absent from goldenRenderAllowList().

Current behavior:
The rendered gateway baseline embeds Mātou's binary-cache public signing key (MatouCachePublicKey, the cache.idss.nz-1:jryaAm0u…= string in internal/clan/matoucache.go) into two rendered machine modules — the gateway guest module (gateway-guest.nix) and the vmguest configuration.nix. Neither path is under a vars/ segment, and the base64 portion of the key clears the entropy gate, so the shapeBase64Blob detector flags it. goldenRenderAllowList() has no entry for it, so TestGoldenRenderLint_NoSecretInTheConfigRepo fails, and because the real detector fires first, TestGoldenRenderLint_CatchesPlantedSecretsAndShapes fails too. go test ./internal/clan/ (and nix develop .#go-ci's go test ./...) is red for every worker on main.

Desired behavior:
The golden-render secret scan recognises the cache.idss.nz-1 public signing key as a deliberate, reviewed public value and does not flag it, while continuing to catch every genuine secret shape (no detector is loosened). Both TestGoldenRenderLint_* tests pass on a clean main.

Key interfaces:

  • goldenRenderAllowList() []allowEntry in the secretlint test — add a reasoned exception (or exceptions) for the cache signing key. Each allowEntry requires a non-empty Shape and a non-empty PathContains and a written Reason (enforced by TestGoldenRenderAllowList_EveryEntryCarriesAReason), so a value-only exception is not available — scope by Shape: shapeBase64Blob plus the render path(s) that carry the key. Note the key lands in two distinct rendered files (the gateway guest module and the vmguest configuration), so a single PathContains substring may not cover both; cover both.
  • MatouCachePublicKey / matouCacheNixSettings in internal/clan/matoucache.go — the source of the flagged value; do not change it. Prefer referencing the exported constant (or the GatewayGuestFileName path constant) over hard-coding strings, to stay drift-proof.
  • The Reason must state that this is a Nix binary-cache public signing key (no private material), embedded by design per ADR 0275 / #1801, mirroring the existing front-door-CA entry's justification style.

Acceptance criteria:

  • go test ./internal/clan/ -run TestGoldenRenderLint passes on a clean main.
  • TestGoldenRenderAllowList_EveryEntryCarriesAReason still passes (the new entry/entries carry a non-empty Shape, PathContains, and Reason).
  • The planted-secret test (TestGoldenRenderLint_CatchesPlantedSecretsAndShapes) still detects planted secrets and the other secret shapes — no detector regex or entropy gate is weakened.
  • go test ./internal/clan/ is green overall.

Out of scope:

  • Changing MatouCachePublicKey, MatouCacheURL, matouCacheNixSettings, or where the key is embedded (that pinning is #1801 / ADR 0275 and guarded by TestMatouCache_PinnedEverywhere).
  • Relaxing any detector regex, the entropy gate, or the vars/ scoping.
  • Anything in #1821 (standing re-supply re-render); this is an independent green-the-tree fix.
> *This was generated by AI during triage.* **Ruled by agent under ADR 0174 — veto anytime.** **Ruling:** `bug` + `ready-for-agent`. **Verification (against `c2e17818`, current HEAD):** confirmed by code path. `internal/clan/matoucache.go` sets `MatouCachePublicKey = "cache.idss.nz-1:jryaAm0uulUbamaQ5/9Shb9SkpMW3rVv49FkzRNOf7E="` and splices it into `matouCacheNixSettings`, which `renderGatewayGuest` (and the vmguest render) embed. The value after the `cache.idss.nz-1:` prefix is a 44-char base64 run with mixed case + digits, so it clears the `looksBase64Secret` entropy gate, sits outside any `vars/` segment, and is not covered by `goldenRenderAllowList()` — whose only entry is the front-door CA (`FrontDoorTLSGenerator`). So `reBase64Run`/`shapeBase64Blob` fires on `machines/gateway/gateway-guest.nix` and `machines/vmguest/configuration.nix`, reddening `TestGoldenRenderLint_NoSecretInTheConfigRepo`; the same real flag pre-empts the planted-secret assertion in `TestGoldenRenderLint_CatchesPlantedSecretsAndShapes`. Symptom matches the report exactly. (No `go`/`nix` toolchain in the triage environment, so this is a static confirmation, not a live run.) **Why this is a two-way door:** the fix is the *designed* remedy — a reasoned `goldenRenderAllowList()` entry (the test itself instructs "add a reasoned goldenRenderAllowList entry — never loosen a detector"). It is a single Go test-file edit in `internal/clan/`, fully revertible by a later commit, and provable green by the two existing `TestGoldenRenderLint_*` tests. The value is a Nix binary-cache **public** signing key already committed to `main` (ADR 0275, #1801) — recording an already-public, already-shipped value as reviewed is not a security-posture widening, and it touches no credentials, member-facing trust surface, data, or spend. Not a `.sandcastle/`, host-cred, live-infra, or design-tier surface, so it is a swarm-worker (`ready-for-agent`) task, not `ready-for-session`. This is not an app report (no `origin: app-report` marker; filed by the internal build agent), so no landing-pr policy attaches. ## Agent Brief **Category:** bug **Summary:** Golden-render secretlint reds `main` because the `cache.idss.nz-1` public signing key embedded by #1801 is absent from `goldenRenderAllowList()`. **Current behavior:** The rendered gateway baseline embeds Mātou's binary-cache public signing key (`MatouCachePublicKey`, the `cache.idss.nz-1:jryaAm0u…=` string in `internal/clan/matoucache.go`) into two rendered machine modules — the gateway guest module (`gateway-guest.nix`) and the vmguest `configuration.nix`. Neither path is under a `vars/` segment, and the base64 portion of the key clears the entropy gate, so the `shapeBase64Blob` detector flags it. `goldenRenderAllowList()` has no entry for it, so `TestGoldenRenderLint_NoSecretInTheConfigRepo` fails, and because the real detector fires first, `TestGoldenRenderLint_CatchesPlantedSecretsAndShapes` fails too. `go test ./internal/clan/` (and `nix develop .#go-ci`'s `go test ./...`) is red for every worker on `main`. **Desired behavior:** The golden-render secret scan recognises the `cache.idss.nz-1` public signing key as a deliberate, reviewed public value and does not flag it, while continuing to catch every genuine secret shape (no detector is loosened). Both `TestGoldenRenderLint_*` tests pass on a clean `main`. **Key interfaces:** - `goldenRenderAllowList() []allowEntry` in the secretlint test — add a reasoned exception (or exceptions) for the cache signing key. Each `allowEntry` requires a non-empty `Shape` and a non-empty `PathContains` and a written `Reason` (enforced by `TestGoldenRenderAllowList_EveryEntryCarriesAReason`), so a value-only exception is not available — scope by `Shape: shapeBase64Blob` plus the render path(s) that carry the key. Note the key lands in **two** distinct rendered files (the gateway guest module and the vmguest configuration), so a single `PathContains` substring may not cover both; cover both. - `MatouCachePublicKey` / `matouCacheNixSettings` in `internal/clan/matoucache.go` — the source of the flagged value; do not change it. Prefer referencing the exported constant (or the `GatewayGuestFileName` path constant) over hard-coding strings, to stay drift-proof. - The `Reason` must state that this is a Nix binary-cache **public** signing key (no private material), embedded by design per ADR 0275 / #1801, mirroring the existing front-door-CA entry's justification style. **Acceptance criteria:** - [ ] `go test ./internal/clan/ -run TestGoldenRenderLint` passes on a clean `main`. - [ ] `TestGoldenRenderAllowList_EveryEntryCarriesAReason` still passes (the new entry/entries carry a non-empty `Shape`, `PathContains`, and `Reason`). - [ ] The planted-secret test (`TestGoldenRenderLint_CatchesPlantedSecretsAndShapes`) still detects planted secrets and the other secret shapes — no detector regex or entropy gate is weakened. - [ ] `go test ./internal/clan/` is green overall. **Out of scope:** - Changing `MatouCachePublicKey`, `MatouCacheURL`, `matouCacheNixSettings`, or where the key is embedded (that pinning is #1801 / ADR 0275 and guarded by `TestMatouCache_PinnedEverywhere`). - Relaxing any detector regex, the entropy gate, or the `vars/` scoping. - Anything in #1821 (standing re-supply re-render); this is an independent green-the-tree fix.
Author
Member

swarm-claim host=bens-mac-04 run=31863
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=bens-mac-04 run=31863 (automated multi-host claim — lowest live claim id works this ticket)
Author
Member

close-report for #1824 — status success

⛔ close-report gates REFUSED this close — the following claims did not verify:

  • commit 315ebe93 is not reachable from origin/main (not landed)
  • changed_files: 'internal/clan/secretlint_test.go' is not in the diff of the claimed commits
envelope
{
  "issue": 1824,
  "status": "success",
  "commits": [
    "315ebe93"
  ],
  "changed_files": [
    "internal/clan/secretlint_test.go"
  ],
  "tests": [
    {
      "command": "go test ./internal/clan/ -run TestGoldenRenderLint|TestMatouCache",
      "exit_code": 0
    },
    {
      "command": "go test ./internal/clan/",
      "exit_code": 0
    }
  ],
  "criteria": {
    "TestGoldenRenderLint_NoSecretInTheConfigRepo goes green": "was 2 FAILs on origin/main (cache.idss.nz-1 base64 tail flagged); now green — commit 315ebe93 adds two value-scoped goldenRenderAllowList entries for the cache PUBLIC key",
    "TestGoldenRenderLint_CatchesPlantedSecretsAndShapes goes green": "the real cache-key flag no longer pre-empts the planted-secret assertion; test green in the go test ./internal/clan/ run",
    "detector not loosened": "allowEntry gains an OPTIONAL Value scope; the two new entries match only the exact cache-key value so any OTHER base64 blob in gateway-guest.nix / configuration.nix still reds — proven by TestGoldenRenderLint_AllowListExceptsAReasonedPublicValue and TestGoldenRenderLint_CatchesPlantedSecretsAndShapes still passing"
  },
  "summary": "Added reasoned value-scoped goldenRenderAllowList entries for Mātou's cache.idss.nz-1 PUBLIC signing key so the golden-render secret scan stops reding main.",
  "reason": "",
  "blockers": []
}
**close-report** for #1824 — status `success` :no_entry: **close-report gates REFUSED this close** — the following claims did not verify: - commit 315ebe93 is not reachable from origin/main (not landed) - changed_files: 'internal/clan/secretlint_test.go' is not in the diff of the claimed commits <details><summary>envelope</summary> ```json { "issue": 1824, "status": "success", "commits": [ "315ebe93" ], "changed_files": [ "internal/clan/secretlint_test.go" ], "tests": [ { "command": "go test ./internal/clan/ -run TestGoldenRenderLint|TestMatouCache", "exit_code": 0 }, { "command": "go test ./internal/clan/", "exit_code": 0 } ], "criteria": { "TestGoldenRenderLint_NoSecretInTheConfigRepo goes green": "was 2 FAILs on origin/main (cache.idss.nz-1 base64 tail flagged); now green — commit 315ebe93 adds two value-scoped goldenRenderAllowList entries for the cache PUBLIC key", "TestGoldenRenderLint_CatchesPlantedSecretsAndShapes goes green": "the real cache-key flag no longer pre-empts the planted-secret assertion; test green in the go test ./internal/clan/ run", "detector not loosened": "allowEntry gains an OPTIONAL Value scope; the two new entries match only the exact cache-key value so any OTHER base64 blob in gateway-guest.nix / configuration.nix still reds — proven by TestGoldenRenderLint_AllowListExceptsAReasonedPublicValue and TestGoldenRenderLint_CatchesPlantedSecretsAndShapes still passing" }, "summary": "Added reasoned value-scoped goldenRenderAllowList entries for Mātou's cache.idss.nz-1 PUBLIC signing key so the golden-render secret scan stops reding main.", "reason": "", "blockers": [] } ``` </details>
Author
Member

close-report for #1824 — status success

✅ close-report gates passed — every claim verified against main; issue closed.

envelope
{
  "issue": 1824,
  "status": "success",
  "commits": [
    "315ebe93"
  ],
  "changed_files": [
    "internal/clan/secretlint_test.go"
  ],
  "tests": [
    {
      "command": "go test ./internal/clan/ -run TestGoldenRenderLint|TestMatouCache",
      "exit_code": 0
    },
    {
      "command": "go test ./internal/clan/",
      "exit_code": 0
    }
  ],
  "criteria": {
    "TestGoldenRenderLint_NoSecretInTheConfigRepo goes green": "was 2 FAILs on origin/main (cache.idss.nz-1 base64 tail flagged); now green — commit 315ebe93 adds two value-scoped goldenRenderAllowList entries for the cache PUBLIC key",
    "TestGoldenRenderLint_CatchesPlantedSecretsAndShapes goes green": "the real cache-key flag no longer pre-empts the planted-secret assertion; test green in the go test ./internal/clan/ run",
    "detector not loosened": "allowEntry gains an OPTIONAL Value scope; the two new entries match only the exact cache-key value so any OTHER base64 blob in gateway-guest.nix / configuration.nix still reds — proven by TestGoldenRenderLint_AllowListExceptsAReasonedPublicValue and TestGoldenRenderLint_CatchesPlantedSecretsAndShapes still passing"
  },
  "summary": "Added reasoned value-scoped goldenRenderAllowList entries for Mātou's cache.idss.nz-1 PUBLIC signing key so the golden-render secret scan stops reding main.",
  "reason": "",
  "blockers": []
}
**close-report** for #1824 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1824, "status": "success", "commits": [ "315ebe93" ], "changed_files": [ "internal/clan/secretlint_test.go" ], "tests": [ { "command": "go test ./internal/clan/ -run TestGoldenRenderLint|TestMatouCache", "exit_code": 0 }, { "command": "go test ./internal/clan/", "exit_code": 0 } ], "criteria": { "TestGoldenRenderLint_NoSecretInTheConfigRepo goes green": "was 2 FAILs on origin/main (cache.idss.nz-1 base64 tail flagged); now green — commit 315ebe93 adds two value-scoped goldenRenderAllowList entries for the cache PUBLIC key", "TestGoldenRenderLint_CatchesPlantedSecretsAndShapes goes green": "the real cache-key flag no longer pre-empts the planted-secret assertion; test green in the go test ./internal/clan/ run", "detector not loosened": "allowEntry gains an OPTIONAL Value scope; the two new entries match only the exact cache-key value so any OTHER base64 blob in gateway-guest.nix / configuration.nix still reds — proven by TestGoldenRenderLint_AllowListExceptsAReasonedPublicValue and TestGoldenRenderLint_CatchesPlantedSecretsAndShapes still passing" }, "summary": "Added reasoned value-scoped goldenRenderAllowList entries for Mātou's cache.idss.nz-1 PUBLIC signing key so the golden-render secret scan stops reding main.", "reason": "", "blockers": [] } ``` </details>
Sign in to join this conversation.
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
Matou/idss#1824
No description provided.