Base image uses a latest version tag
Description
When possible, it is recommended to pin the version for the base image in your Dockerfiles. There are a number of potential issues that may be caused when using the `latest` tag. Since `latest` is the default tag when a tag is not specified, it does not automatically refer to the latest version of the image. This can lead to the use of outdated images and in the case of production deployments, using a dynamic version can cause unexpected behavior and difficulty in determining which version is being currently used. It is best practice to be specific as possible about what is running to make operations predictable and reliable
Code Example
Dockerfile
- FROM alpine:latestRemediation
Docker
Rule Details
| Field | Value |
|---|---|
| ID | IAC-0840 |
| Severity | LOW |
| IaC Type | dockerfile |
| Frameworks | Docker |
| Checkov ID | CKV_DOCKER_7 |