Watch
0
0
Fork
You've already forked hyperhive
0

hive-priv refuses bind-mount edits on the swarm's forge and matrix containers

The forge and matrix containers belong to the services host, not to a
hive. hive-priv's container-name validator still accepted hive-forge and
hive-matrix for WriteNspawnFlags, WriteResourceLimits and
RemoveServiceDropin; hive-c0re only ever sends h-<agent> names there.

- hive-priv-sock/src/lib.rs: drop SIBLING_CONTAINERS, its only user was
  the validator, and its test.
- hive-priv/src/main.rs: the validator accepts only h-<name> and returns
  the logical name, so write_resource_limits loses its non-h- fallback;
  test that all three requests refuse both names.
- hive-priv/README.md, docs/trust-boundary/security.md: the allowlist
  no longer lists the forge and matrix.

Fixes #5508
This commit is contained in:
atlas 2026-10-17 23:40:53 +02:00 • committed by mara
commit 4f75e2a71a
4 changed files with 57 additions and 58 deletions

View file

@ -314,9 +314,10 @@ known operations; there is no arbitrary command pass-through:
**Container allowlist** — `hive-priv` validates every request against
an allowlist before any operation: the allowlist accepts only names
matching the agent-name convention (char-validated) or the known
sibling service containers (`hive-forge`, `hive-matrix`),
and rejects arbitrary container names. `hive-gateway` is a host unit,
matching the agent-name convention (`h-` prefix, char-validated)
and rejects every other container name, the swarm's `hive-forge` and
`hive-matrix` included: those belong to the host that runs them, not to
a hive. `hive-gateway` is a host unit,
not a container, so it's not in this list — see `ReloadGatewayNginx`
above for how the hard-coded unit name scopes its access instead.