Docker - Security - Use fixed tags for immutability

Docker image owners can push new versions to the same tags, which may result in inconsistent images during builds, and makes it hard to track if a vulnerability has been fixed.

Prefer one of the following:


Each Docker image can have multiple tags, which are variants of the same images.

The most common tag is latest, which represents the latest version of the image.

Image tags are not immutable, and the author of the images can publish the same tag multiple times.

This means that the base image for your Docker file might change between builds. This could result in inconsistent behavior because of changes made to the base image.

There are multiple ways to mitigate this issue: