Skip to content

Last USER is root

Description

The Docker containers by default run with the root privilege and so does the application that runs inside the container. This is a major concern from the security perspective because hackers can gain root access to the Docker host by hacking the application running inside the container.

Remediation

Dockerfile Remove `USER root` or add a non-root user after.

[,Dockerfile]

FROM base

  • USER root

Rule Details

FieldValue
IDIAC-0841
SeverityLOW
IaC Typedockerfile
FrameworksDocker
Checkov IDCKV_DOCKER_8

References