Impact & Risk Analysis
- Severity: Critical
- CIS Benchmark: CIS 4.10
- Impact: Credential Exposure. Docker images are not opaque; they contain a full history of the commands used to build them. If secrets (API keys, passwords, SSH keys) are included in the Dockerfile, they remain visible in the image layers to any user who pulls the image, even if you try to delete them in a later step.
Common Misconfiguration
Storing secrets directly in the Dockerfile usingENV variables or RUN commands. Developers often assume that because the image is compiled, the text is hidden, but docker history reveals all layer commands in plain text.

