You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Three Alloy agents still mount docker.sock directly (lab, soc, sensor), and docs/security.md says only oracle does #836
#193 put the observability stack's Alloy behind tecnativa/docker-socket-proxy with a GET-only allowlist (stacks/observability/compose.yaml:864-908, DOCKER_API: tcp://docker-socket-proxy:2375 at :1057). Three other stacks still hand Alloy the socket itself:
Stack
Host
Line
stacks/lab
alexander
compose.yaml:315
stacks/soc
odin
compose.yaml:451
stacks/sensor
fenrir
compose.yaml:152
All three use /var/run/docker.sock:/var/run/docker.sock:ro.
docs/security.md:891-893 already makes the argument: :ro on a socket "was worth less than it looked", because the mode applies to the inode, not to the API, so POST /containers/create with a host bind still works. The same document at :906 then names only oracle as still exposed, so the doc is stale as well.
Why it matters
A compromised Alloy, or one with a bad config, has root on these hosts. All of them sit on VLAN 30, the segment built to hold attackers, and two of them hold keys:
odin holds the SOC's age key and Velociraptor's CA.
What closes it
Add the same docker-socket-proxy service to all three stacks, with the same digest and the same allowlist (CONTAINERS=1, INFO=1, everything else 0, POST=0). Point DOCKER_API at it. docker.alloy already reads DOCKER_API, so the shared config needs no change.
Correct docs/security.md:906.
A guard: have scripts/check_compose_health.py (or check_mounted_config.py) fail on any docker.sock mount in a service that is not a docker-socket-proxy, unless a reviewed allowlist names it. That would have caught all three.
Done when
grep -n docker.sock stacks/*/compose.yaml lists only proxy services.
The guard fails once, on purpose, against a fixture.
Container logs still arrive from all three hosts.
Refs #193. Found in the 2026-10-03 repository review.
Done in #867 (c910e50), deployed on 2026-10-04. Checked against Done when:
grep -n docker.sock stacks/*/compose.yaml lists only proxy services. On main, every remaining /var/run/docker.sock mount sits inside a docker-socket-proxy service, in each of lab, observability, sensor and soc. Each stack's Alloy reads Docker as DOCKER_API: tcp://docker-socket-proxy:2375, GET-only, on the estate's allowlist.
The guard fails once, on purpose, against a fixture.check_compose_health.py refuses any docker.sock mount outside the proxy image. That includes the /run/docker.sock spelling, a mount of /run itself, and an unmasked /. Its --self-test fixtures cover each refusal and pass on main.
Container logs still arrive from all three hosts. With the proxies live, sum by (host) (count_over_time({log_type="docker", host=~"alexander|odin|fenrir"}[30m])) on alexander returned alexander 2,776, odin 2,514 and fenrir 1,137.
Also fixed by the same change: each Alloy's /:/rootfs:ro mount had carried /rootfs/run/docker.sock past the proxy, because :ro doesn't stop connect(). /rootfs/run is now masked in all four stacks, and smaug's /host/run too. docs/security.md now lists every host.
Activity
fix(ci): build the socket-guard fixture from its prefix, not a writte…
fix(docker): mask /run inside every rootfs mount, so the socket proxy…
fix(agent): put oracle's Alloy behind a Docker socket proxy, and chec…
fix(lab): put the lab, SOC and sensor Alloys behind a Docker socket p…
Gerrrt commentedon Oct 4, 2026
Done in #867 (c910e50), deployed on 2026-10-04. Checked against Done when:
grep -n docker.sock stacks/*/compose.yamllists only proxy services. Onmain, every remaining/var/run/docker.sockmount sits inside adocker-socket-proxyservice, in each oflab,observability,sensorandsoc. Each stack's Alloy reads Docker asDOCKER_API: tcp://docker-socket-proxy:2375, GET-only, on the estate's allowlist.check_compose_health.pyrefuses anydocker.sockmount outside the proxy image. That includes the/run/docker.sockspelling, a mount of/runitself, and an unmasked/. Its--self-testfixtures cover each refusal and pass onmain.sum by (host) (count_over_time({log_type="docker", host=~"alexander|odin|fenrir"}[30m]))on alexander returned alexander 2,776, odin 2,514 and fenrir 1,137.Also fixed by the same change: each Alloy's
/:/rootfs:romount had carried/rootfs/run/docker.sockpast the proxy, because:rodoesn't stopconnect()./rootfs/runis now masked in all four stacks, and smaug's/host/runtoo.docs/security.mdnow lists every host.🤖 Posted by Claude Code