A Dockerfile that pins its headline package still lets a resolver choose most of what ships. A lock file for the whole dependency tree is what makes a rebuild the image you tested.
A deploy that pulls images tagged latest upgrades software as a side effect. Pin every image first, and where you cannot see what runs, infer it from dates and say how sure you are.