Open
Description
This block of code assumes that any image name with only one slash in it cannot possibly be a fully qualified image name, and therefore prepends docker.io/
to the name.
Thus, if I specify a Dockerfile with
FROM artefact.example.com/my_image:1.2.3
then this CLI first looks for a manifest at docker.io/artefact.example.com/my_image:1.2.3
.
This concerns me. It feels like an invitation to a dependency confusion attack. Someone could create an "artefact.example.com" organization on docker.io, publish a malicious image named "my_image:1.2.3", and this CLI would pull that instead of what I specified.