Container Running as Root - Missing USER
HIGHDockerfile does not specify USER instruction. Container will run as root by default, which increases the attack surface if the container is compromised.
Dockerfile does not specify USER instruction. Container will run as root by default, which increases the attack surface if the container is compromised.
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-001 --project .Explore related security rules for Docker
Dockerfile uses 'sudo' in RUN instructions. This is unnecessary during
Dockerfile mounts Docker socket. This gives the container full control over the host Docker daemon, equivalent to root access.
Build argument name suggests it contains a secret. ARG values are visible in image history via 'docker history'.
Common questions about Container Running as Root - Missing USER
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-001 --project .This rule is aligned with industry-standard security frameworks and classifications: