Files
floci/docs/configuration
Niels Kootstra 126af73141 fix(ecs): enforce host-volume bind-mount safety fail-closed at register and run time (#3543)
* fix: enforce host-volume bind-mount safety fail-closed at register and run time

Reject volumes[].host.sourcePath by default unless an operator opts in via
floci.services.ecs.host-volume-roots or allow-unsafe-host-volumes. Block the
Docker socket and any ancestor directory that contains it (/var/run, /run,
/var) unconditionally, even with the unsafe flag set. Extract the check into
HostVolumePolicy and enforce it again immediately before each bind mount in
EcsContainerManager.startTask, not only once at RegisterTaskDefinition, to
narrow the window for a swapped-in symlink and to cover task definitions
persisted before this policy existed.

* fix(ecs): protect the Docker socket Floci actually connects to

The host-volume policy only blocked the literal /var/run/docker.sock
and /run/docker.sock paths, so a task definition could bind-mount the
daemon socket when Floci reached it through DOCKER_HOST or an active
Docker context (Colima, OrbStack, Rancher Desktop, Podman).

Resolve the daemon endpoint through the same DockerClientProducer path
the Docker client uses and add its unix:// socket path to the protected
candidates. The literal paths stay protected as defence in depth.
2026-09-13 18:23:07 -04:00
..