Docker Socket Mounted as Volume
CRITICALDockerfile mounts Docker socket. This gives the container full control over the host Docker daemon, equivalent to root access.
Dockerfile mounts Docker socket. This gives the container full control over the host Docker daemon, equivalent to root access.
Experiment with the vulnerable code and security rule below. Edit the code to see how the rule detects different vulnerability patterns.
pathfinder ci --ruleset docker/DOCKER-SEC-006 --project .Explore related security rules for Docker
Dockerfile uses 'sudo' in RUN instructions. This is unnecessary during
Dockerfile does not specify USER instruction. Container will run as root by default, which increases the attack surface if the container is compromised.
Build argument name suggests it contains a secret. ARG values are visible in image history via 'docker history'.
Common questions about Docker Socket Mounted as Volume
Use Code Pathfinder to scan your Docker codebase and automatically detect instances of this vulnerability pattern. Install Code Pathfinder and run the following command in your project directory:
pathfinder ci --ruleset docker/DOCKER-SEC-006 --project .This rule is aligned with industry-standard security frameworks and classifications: