1 Latest Tags, Unverified Images, and Layer Secrets
Container images have their own supply chain security risks beyond application-level vulnerabilities.
Using :latest tags:
FROM node:latest # Which version? Unpredictable!
# Next week, node:latest might be a different major version
# Breaking changes, new vulnerabilities, or backdoored imageUnverified base images:
# FROM some-random-docker-hub-user/ubuntu-node:20
# Who published this? Is it maintained? Does it contain malware?
# Even official images can have CVEs — always scan!
docker scan myapp:latest
grype myapp:latest # Checks for known CVEs in image layersSecrets in image layers:
# DANGEROUS: secrets in RUN commands are stored in image layers
RUN pip install mypackage && rm /etc/secrets # secrets still in layer!
FROM base AS builder
COPY secrets /etc/secrets # Secret in builder layer — extractable!
RUN build-step
# Even in multi-stage, if you COPY from builder containing secrets...
docker history myapp:latest # Shows all layer commands
docker save myapp:latest | tar xvf - | examine_layers