A retail software team notices that its container images repeatedly trigger pre-runtime vulnerability findings in compilers and build utilities that are never needed when the application runs. Which build practice reduces these pre-runtime findings at the source?
Select an answer to reveal the explanation.
Short Explanation
Shipping compilers inside a production container is like leaving scaffolding bolted to a finished storefront—it adds risk you never need. The trap is trying to hide or skip scans instead of trimming unnecessary packages from the final image.
Full Explanation
Choosing to Use multi-stage builds to copy only runtime artifacts into a minimal final image eliminates build-time compilers, package managers, and temporary utilities from the shipped image, directly reducing the pre-runtime vulnerability surface. Pre-runtime image assessment inspects supported detectable packages and retained final-image artifacts; discarded build stages are not part of the published final image, so a leaner final stage means fewer unnecessary packages to patch or triage. Choosing to Push images with unpinned latest tags so older build layers are hidden from registry scans fails because mutable tags do not remove packages inside the image layers. Choosing to Disable registry image assessment after the CI pipeline completes its initial package check blinds your team to newly disclosed vulnerabilities affecting stored images. Choosing to Upgrade vulnerable build tools inside running containers after Kubernetes schedules the pods leaves the registry image unpatched and violates immutable container practices. As a caveat, minimal final images still require ongoing registry assessment for the remaining runtime libraries. For an operational check, compare pre-runtime package counts before and after adopting a multi-stage Dockerfile to verify that build-only tools no longer appear.
Prefer to study offline? Printable PDF study book + test engine ($7.50, unofficial). These questions stay free here.