zsh: let a machine withhold node-login-shell's execute (hq ADR 0268) #145

Merged
mesh-admin merged 1 commits from withhold-login-shell-execute into main 2026-10-08 23:12:54 +00:00
Contributor

Security, operator's decision of 2026-10-09. node-login-shell.execute runs any command as the operator account, which has passwordless sudo, so any caller of the mesh's tools is root on that node. The operator withholds it on the control-node now; the other nodes keep it until a call to it needs a person's approval (hq research 039, hq #233). Decision record: hq ADR 0268 (PR to follow). Controller side: mesh-controller #169.

What changes in zsh

  • New setting execute, a preference with default serve. A machine's value withhold makes the tool runner there offer no execute.
  • The mesh writes the value into ${dir:state}/tools.conf, owned by root, mode 0644, in a new root-owned directory state (0755). The account the tool runner runs as can read it and cannot change it.
  • The bundle's word ZSH_TOOLS_CONF names that file exactly, so a change to it restarts the tool runner (givenTo, ADR 0192).
  • tools/index.ts registers execute only when the file says serve. Anything else withholds it: a wrong value, no line, no file, no word. The reason goes to stderr.
  • zsh_config now also answers execute: {served, why}, so the state is readable on every machine without calling execute.
  • The claim keeps serves: ["execute"]: the module serves it on the machines that keep it, which the seat accepts as an optional verb (mesh-controller #169).

Tests that failed first (node --test --experimental-strip-types 'test/*.test.ts', 21 pass):

  • test/withhold.test.ts: only serve serves; a wrong value, no line, no file and no word withhold it and say why; the file named by the word is read.
  • test/manifest.test.ts: the setting, the root-owned directory and file, the word naming the file exactly, and the entrypoint returning no seat verb when withheld.

Also checked by hand: the bundle was built with tsc against mesh-sdk 0.1.x and loaded with the SDK's collectTools. With withhold it registers node-login-shell: [] and zsh: [zsh_config]; with serve, node-login-shell: [execute].

MESH_GATE=<controller> sh merge-check.sh passes with main's controller and with #169's.

Not done, said: the module stays TypeScript. Porting it to Go is a separate change; this one stays small because it is a security fix.

Merge order: mesh-controller #169 first (see there), then this. After both are live: set the control-node's value with mesh-controller.settings (module zsh, node the control-node, values {"execute":"withhold"}) and push zsh to the control-node. Do not merge without review.

**Security, operator's decision of 2026-10-09.** `node-login-shell.execute` runs any command as the operator account, which has passwordless sudo, so any caller of the mesh's tools is root on that node. The operator withholds it on the control-node now; the other nodes keep it until a call to it needs a person's approval (hq research 039, hq #233). Decision record: hq ADR 0268 (PR to follow). Controller side: mesh-controller #169. **What changes in `zsh`** - New setting `execute`, a preference with default `serve`. A machine's value `withhold` makes the tool runner there offer no `execute`. - The mesh writes the value into `${dir:state}/tools.conf`, owned by root, mode 0644, in a new root-owned directory `state` (0755). The account the tool runner runs as can read it and cannot change it. - The bundle's word `ZSH_TOOLS_CONF` names that file exactly, so a change to it restarts the tool runner (`givenTo`, ADR 0192). - `tools/index.ts` registers `execute` only when the file says `serve`. **Anything else withholds it**: a wrong value, no line, no file, no word. The reason goes to stderr. - `zsh_config` now also answers `execute: {served, why}`, so the state is readable on every machine without calling `execute`. - The claim keeps `serves: ["execute"]`: the module serves it on the machines that keep it, which the seat accepts as an optional verb (mesh-controller #169). **Tests that failed first** (`node --test --experimental-strip-types 'test/*.test.ts'`, 21 pass): - `test/withhold.test.ts`: only `serve` serves; a wrong value, no line, no file and no word withhold it and say why; the file named by the word is read. - `test/manifest.test.ts`: the setting, the root-owned directory and file, the word naming the file exactly, and the entrypoint returning no seat verb when withheld. Also checked by hand: the bundle was built with tsc against mesh-sdk 0.1.x and loaded with the SDK's `collectTools`. With `withhold` it registers `node-login-shell: []` and `zsh: [zsh_config]`; with `serve`, `node-login-shell: [execute]`. `MESH_GATE=<controller> sh merge-check.sh` passes with main's controller and with #169's. **Not done, said:** the module stays TypeScript. Porting it to Go is a separate change; this one stays small because it is a security fix. **Merge order:** mesh-controller #169 first (see there), then this. **After both are live:** set the control-node's value with `mesh-controller.settings` (`module` zsh, `node` the control-node, `values` `{"execute":"withhold"}`) and push zsh to the control-node. Do not merge without review.
mesh-admin added 1 commit 2026-10-08 22:11:21 +00:00
zsh: let a machine withhold node-login-shell's execute
mesh/merge-gate pass: builds zsh → ace, g14, novox, shanks; no bus step; every machine composes with the change as it did without (4 of 4 compose)
mesh/repo-check pass: its merge-check.sh passed
mesh/delivery delivered
mesh/delivery-group group withhold-login-shell-execute merged: every member is merged
cfe1dffa45
execute runs any command as the operator account, which can become root
without a person. The operator withholds it on the control-node until a
call needs a person's approval (hq ADR 0268); the other machines keep it
for now. The setting execute (serve by default) is written into a
root-owned file the tools bundle reads at start, and anything but serve
withholds the verb, so the machine's runtime does not offer it.
Author
Contributor

Delivery novox/mesh-catalog@cfe1dffa4591 — delivered since 2026-10-08T23:16:37Z

Delivery plan — builds zsh → ace, g14, novox, shanks; no bus step

  • tier 0: zsh
  • ace: receives zsh
  • g14: receives zsh
  • novox: receives zsh
  • shanks: receives zsh

Group withhold-login-shell-execute, in order: novox/mesh-controller@2073bfe2e6 → novox/mesh-catalog@cfe1dffa45

Machines

  • zsh on ace: passed — healthy 3 times over 2m31s
  • zsh on the rest running it: sent

Transitions

  • 2026-10-08 22:11 (new) → proposed (announced): novox/mesh-catalog#145's head announced
  • 2026-10-08 22:14 proposed → checked (checked): the verdict names this commit
  • 2026-10-08 22:14 checked → ready (accepted): the gate passed or warned, and the repository's own check did not fail
  • 2026-10-08 23:07 ready → proposed (recheck): checked at 22:14Z before catalogue #143, #144 and #146 merged; check against today's main before merging
  • 2026-10-08 23:09 proposed → checked (checked): the verdict names this commit
  • 2026-10-08 23:09 checked → ready (accepted): the gate passed or warned, and the repository's own check did not fail
  • 2026-10-08 23:13 ready → published (merged): on the trunk its modules follow: merged there, and its walk opened — or nothing for a walk to move
  • 2026-10-08 23:13 published → delivering (go): its walk started: let go by this owner in its group's order, by a person, or on the controller's own path
  • 2026-10-08 23:16 delivering → delivered (done): its walk is done: every machine of its deploy plan passed, or was left as its policy says

The commit's note under refs/notes/mesh-plan keeps every transition: git log --notes=mesh-plan.

<!-- mesh-delivery:view --> **Delivery** `novox/mesh-catalog@cfe1dffa4591` — **delivered** since 2026-10-08T23:16:37Z **Delivery plan** — builds zsh → ace, g14, novox, shanks; no bus step - tier 0: zsh - ace: receives zsh - g14: receives zsh - novox: receives zsh - shanks: receives zsh **Group** `withhold-login-shell-execute`, in order: novox/mesh-controller@2073bfe2e618 → novox/mesh-catalog@cfe1dffa4591 - novox/mesh-controller@2073bfe2e618 before novox/mesh-catalog@cfe1dffa4591: built by - composed together: pass — every machine composes with the change as it did without (4 of 4 compose) **Machines** - zsh on ace: passed — healthy 3 times over 2m31s - zsh on the rest running it: sent **Transitions** - 2026-10-08 22:11 (new) → proposed (announced): novox/mesh-catalog#145's head announced - 2026-10-08 22:14 proposed → checked (checked): the verdict names this commit - 2026-10-08 22:14 checked → ready (accepted): the gate passed or warned, and the repository's own check did not fail - 2026-10-08 23:07 ready → proposed (recheck): checked at 22:14Z before catalogue #143, #144 and #146 merged; check against today's main before merging - 2026-10-08 23:09 proposed → checked (checked): the verdict names this commit - 2026-10-08 23:09 checked → ready (accepted): the gate passed or warned, and the repository's own check did not fail - 2026-10-08 23:13 ready → published (merged): on the trunk its modules follow: merged there, and its walk opened — or nothing for a walk to move - 2026-10-08 23:13 published → delivering (go): its walk started: let go by this owner in its group's order, by a person, or on the controller's own path - 2026-10-08 23:16 delivering → delivered (done): its walk is done: every machine of its deploy plan passed, or was left as its policy says The commit's note under `refs/notes/mesh-plan` keeps every transition: `git log --notes=mesh-plan`.
Author
Contributor

Merge check at cfe1dffa

  • mesh/merge-gate: PASS — every machine composes with the change as it did without (4 of 4 compose) (modules: zsh)
  • mesh/repo-check: PASS — its merge-check.sh passed

Delivery plan — builds zsh → ace, g14, novox, shanks; no bus step

  • tier 0: zsh
  • ace: receives zsh
  • g14: receives zsh
  • novox: receives zsh
  • shanks: receives zsh

Run by the build seat on g14 as build-1791497498603605357 (builds --log build-1791497498603605357).

--- the gate: zsh
zsh: ok, 1 tool(s)
long-running resources without health: 0
1 manifest(s) checked. Judged against the seats this binary carries; a claim on one of the mesh's own seats is judged fully at registration, and a seat declared by a module not given here reads as unknown. Identities judged on a 6-character machine name, against the bounds of the providers given here
judging 1 module(s) changed against 4 machine(s), as the snapshot of 2026-10-08T21:34:01Z says they run
composing every machine as the mesh is
the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued
the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued
composing every machine with the change
the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued
the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued
merge gate: PASS — every machine composes with the change as it did without (4 of 4 compose)
judged by controller development build against the facts of 2026-10-08T21:34:01Z

modules the change moves:
  - zsh (changed)

machines:
  - a machine (f35): composes; the change adds 2 resource(s) and removes 0 (+directory:zsh.state, +file:zsh.tools-conf)
  - holds mesh-dns-resolver (idt): composes; the change adds 2 resource(s) and removes 0 (+directory:zsh.state, +file:zsh.tools-conf)
  - holds git, holds mesh-artifact-store, holds mesh-broker, holds mesh-catalog, holds mesh-delivery, holds mesh-dns-resolver, holds mesh-store, holds mesh-vault, holds npm-package-registry, the control node, the hub (ygcyr): composes; the change adds 2 resource(s) and removes 0 (+directory:zsh.state, +file:zsh.tools-conf)
  - a machine (yvbpsm): composes; the change adds 2 resource(s) and removes 0 (+directory:zsh.state, +file:zsh.tools-conf)

a merge would rebuild 1 module(s) in 1 tier(s): zsh
--- its merge-check.sh (go toolchain)
ok  	git.novox.be/novox/mesh-catalog/checks/words	0.002s
words: 12 retired words, none in the 32711 strings of 586 files
ok  	git.novox.be/novox/mesh-catalog/checks/paths	0.005s
paths: no module names another's state on its machine (3 known, listed to go)
long-running resources without health: 70, as kept
NOT TESTED HERE: modules/zsh is TypeScript; the gate judges its manifest
**Merge check** at `cfe1dffa` - `mesh/merge-gate`: **PASS** — every machine composes with the change as it did without (4 of 4 compose) (modules: zsh) - `mesh/repo-check`: **PASS** — its merge-check.sh passed **Delivery plan** — builds zsh → ace, g14, novox, shanks; no bus step - tier 0: zsh - ace: receives zsh - g14: receives zsh - novox: receives zsh - shanks: receives zsh Run by the build seat on g14 as `build-1791497498603605357` (`builds --log build-1791497498603605357`). ``` --- the gate: zsh zsh: ok, 1 tool(s) long-running resources without health: 0 1 manifest(s) checked. Judged against the seats this binary carries; a claim on one of the mesh's own seats is judged fully at registration, and a seat declared by a module not given here reads as unknown. Identities judged on a 6-character machine name, against the bounds of the providers given here judging 1 module(s) changed against 4 machine(s), as the snapshot of 2026-10-08T21:34:01Z says they run composing every machine as the mesh is the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued composing every machine with the change the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued merge gate: PASS — every machine composes with the change as it did without (4 of 4 compose) judged by controller development build against the facts of 2026-10-08T21:34:01Z modules the change moves: - zsh (changed) machines: - a machine (f35): composes; the change adds 2 resource(s) and removes 0 (+directory:zsh.state, +file:zsh.tools-conf) - holds mesh-dns-resolver (idt): composes; the change adds 2 resource(s) and removes 0 (+directory:zsh.state, +file:zsh.tools-conf) - holds git, holds mesh-artifact-store, holds mesh-broker, holds mesh-catalog, holds mesh-delivery, holds mesh-dns-resolver, holds mesh-store, holds mesh-vault, holds npm-package-registry, the control node, the hub (ygcyr): composes; the change adds 2 resource(s) and removes 0 (+directory:zsh.state, +file:zsh.tools-conf) - a machine (yvbpsm): composes; the change adds 2 resource(s) and removes 0 (+directory:zsh.state, +file:zsh.tools-conf) a merge would rebuild 1 module(s) in 1 tier(s): zsh --- its merge-check.sh (go toolchain) ok git.novox.be/novox/mesh-catalog/checks/words 0.002s words: 12 retired words, none in the 32711 strings of 586 files ok git.novox.be/novox/mesh-catalog/checks/paths 0.005s paths: no module names another's state on its machine (3 known, listed to go) long-running resources without health: 70, as kept NOT TESTED HERE: modules/zsh is TypeScript; the gate judges its manifest ```
Author
Contributor

Merge check at cfe1dffa

  • mesh/merge-gate: PASS — every machine composes with the change as it did without (4 of 4 compose) (modules: zsh)
  • mesh/repo-check: PASS — its merge-check.sh passed

Delivery plan — builds zsh → ace, g14, novox, shanks; no bus step

  • tier 0: zsh
  • ace: receives zsh
  • g14: receives zsh
  • novox: receives zsh
  • shanks: receives zsh

Run by the build seat on novox as build-1791500867037926420 (builds --log build-1791500867037926420).

--- the gate: zsh
zsh: ok, 1 tool(s)
long-running resources without health: 0
1 manifest(s) checked. Judged against the seats this binary carries; a claim on one of the mesh's own seats is judged fully at registration, and a seat declared by a module not given here reads as unknown. Identities judged on a 6-character machine name, against the bounds of the providers given here
judging 1 module(s) changed against 4 machine(s), as the snapshot of 2026-10-08T23:03:48Z says they run
composing every machine as the mesh is
the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued
the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued
composing every machine with the change
the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued
the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued
merge gate: PASS — every machine composes with the change as it did without (4 of 4 compose)
judged by controller development build against the facts of 2026-10-08T23:03:48Z

modules the change moves:
  - zsh (changed)

machines:
  - a machine (f35): composes; the change adds 2 resource(s) and removes 0 (+directory:zsh.state, +file:zsh.tools-conf)
  - holds mesh-dns-resolver (idt): composes; the change adds 2 resource(s) and removes 0 (+directory:zsh.state, +file:zsh.tools-conf)
  - holds git, holds mesh-artifact-store, holds mesh-broker, holds mesh-catalog, holds mesh-delivery, holds mesh-dns-resolver, holds mesh-store, holds mesh-vault, holds npm-package-registry, the control node, the hub (ygcyr): composes; the change adds 2 resource(s) and removes 0 (+directory:zsh.state, +file:zsh.tools-conf)
  - a machine (yvbpsm): composes; the change adds 2 resource(s) and removes 0 (+directory:zsh.state, +file:zsh.tools-conf)

a merge would rebuild 1 module(s) in 1 tier(s): zsh
--- its merge-check.sh (go toolchain)
ok  	git.novox.be/novox/mesh-catalog/checks/words	0.003s
words: 12 retired words, none in the 32711 strings of 586 files
ok  	git.novox.be/novox/mesh-catalog/checks/paths	0.007s
paths: no module names another's state on its machine (3 known, listed to go)
long-running resources without health: 70, as kept
NOT TESTED HERE: modules/zsh is TypeScript; the gate judges its manifest
**Merge check** at `cfe1dffa` - `mesh/merge-gate`: **PASS** — every machine composes with the change as it did without (4 of 4 compose) (modules: zsh) - `mesh/repo-check`: **PASS** — its merge-check.sh passed **Delivery plan** — builds zsh → ace, g14, novox, shanks; no bus step - tier 0: zsh - ace: receives zsh - g14: receives zsh - novox: receives zsh - shanks: receives zsh Run by the build seat on novox as `build-1791500867037926420` (`builds --log build-1791500867037926420`). ``` --- the gate: zsh zsh: ok, 1 tool(s) long-running resources without health: 0 1 manifest(s) checked. Judged against the seats this binary carries; a claim on one of the mesh's own seats is judged fully at registration, and a seat declared by a module not given here reads as unknown. Identities judged on a 6-character machine name, against the bounds of the providers given here judging 1 module(s) changed against 4 machine(s), as the snapshot of 2026-10-08T23:03:48Z says they run composing every machine as the mesh is the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued composing every machine with the change the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued merge gate: PASS — every machine composes with the change as it did without (4 of 4 compose) judged by controller development build against the facts of 2026-10-08T23:03:48Z modules the change moves: - zsh (changed) machines: - a machine (f35): composes; the change adds 2 resource(s) and removes 0 (+directory:zsh.state, +file:zsh.tools-conf) - holds mesh-dns-resolver (idt): composes; the change adds 2 resource(s) and removes 0 (+directory:zsh.state, +file:zsh.tools-conf) - holds git, holds mesh-artifact-store, holds mesh-broker, holds mesh-catalog, holds mesh-delivery, holds mesh-dns-resolver, holds mesh-store, holds mesh-vault, holds npm-package-registry, the control node, the hub (ygcyr): composes; the change adds 2 resource(s) and removes 0 (+directory:zsh.state, +file:zsh.tools-conf) - a machine (yvbpsm): composes; the change adds 2 resource(s) and removes 0 (+directory:zsh.state, +file:zsh.tools-conf) a merge would rebuild 1 module(s) in 1 tier(s): zsh --- its merge-check.sh (go toolchain) ok git.novox.be/novox/mesh-catalog/checks/words 0.003s words: 12 retired words, none in the 32711 strings of 586 files ok git.novox.be/novox/mesh-catalog/checks/paths 0.007s paths: no module names another's state on its machine (3 known, listed to go) long-running resources without health: 70, as kept NOT TESTED HERE: modules/zsh is TypeScript; the gate judges its manifest ```
mesh-admin merged commit a1406e7d79 into main 2026-10-08 23:12:54 +00:00
mesh-admin deleted branch withhold-login-shell-execute 2026-10-08 23:12:54 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: novox/mesh-catalog#145