hyperhive/hive-priv
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas 9451ebfb24 fix(#2308): overlay --tmpfs on /knowledge/.git to hide host git credentials
The knowledge repo is cloned with credentials embedded in .git/config;
those credentials survive on disk and the entire LOCAL_DIR (including
.git/) is bind-mounted read-only into every agent container. Any
agent (or prompt-injected PR build) can read the site-admin token via
cat /knowledge/.git/config.

Defense-in-depth layer: in write_nspawn_flags, append
--tmpfs=/knowledge/.git after the --bind-ro=.../knowledge flag whenever
the /knowledge bind mount is present. systemd-nspawn processes the tmpfs
after the bind, overlaying an empty in-memory directory over .git/ inside
the container. Agents see the working-tree documents but not the repo
metadata or stored credentials.

This is independent of the complementary fix in workers/knowledge.rs
(stop embedding credentials in .git/config in the first place). Both
layers together provide defense-in-depth: even if a future credential
accidentally reaches .git/config, it stays off the container floor.

Closes part of issue 2308 (bind-mount isolation layer).
2026-07-10 13:09:58 +02:00
..
src fix(#2308): overlay --tmpfs on /knowledge/.git to hide host git credentials 2026-07-10 13:09:58 +02:00
Cargo.toml hive-c0re: back agent state dirs with btrfs subvolumes 2026-06-19 13:46:39 +02:00