Fix scan finding nothing on remote Docker daemons #10
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/remote-daemon-bind-mount"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
'docker run -v $PWD:/src' is a bind mount, resolved by the DAEMON's
own filesystem -- not the client's. security-scan.yml's DOCKER_HOST
points at a sibling daemon (a different container/host entirely), so
the mount silently attached nothing and every scan reported zero
findings against an empty directory. Confirmed against the actual
balam CI artifact: {"target": "."} with no findings/issues keys at
all, exactly what an empty-directory scan produces.
run_ojo_fs replaces the bind mount with docker create + docker cp +
docker start: cp streams files through the Docker API, which works
regardless of where the daemon actually lives. Verified locally via
podman against the real ghcr.io/colibrisec/ojo image and the balam
repo -- finds real findings now.
'docker run -v $PWD:/src' is a bind mount, resolved by the DAEMON's own filesystem -- not the client's. security-scan.yml's DOCKER_HOST points at a sibling daemon (a different container/host entirely), so the mount silently attached nothing and every scan reported zero findings against an empty directory. Confirmed against the actual balam CI artifact: {"target": "."} with no findings/issues keys at all, exactly what an empty-directory scan produces. run_ojo_fs replaces the bind mount with docker create + docker cp + docker start: cp streams files through the Docker API, which works regardless of where the daemon actually lives. Verified locally via podman against the real ghcr.io/colibrisec/ojo image and the balam repo -- finds real findings now.