Interview Prep/DevSecOps/Container and IaC Security

A developer pulls a random image from Docker Hub for a database tool. How do you decide if it is acceptable?

BeginnerScenarioContainer and IaC Security
Answer

Situation read → Unknown images can contain miners, backdoors or outdated software.

What I'd do →

  1. Prefer Docker Official Images, Verified Publisher or Docker-Sponsored Open Source.
  2. Check the Dockerfile source and update frequency.
  3. Scan it: trivy image publisher/tool:1.2.
  4. Mirror approved images into the internal registry and pin by digest.
  5. Block direct pulls from public registries in production.

Why → A curated internal registry gives one place for scanning and control.

Interview tip → Mention pull-through caches as the practical approach.

All DevSecOps questions Roadmap: Policy as code

More on Container and IaC Security