SpinTheMic
Pro

Interview practice question

A secret was found inside an image layer

Cloud & DevOps · Docker · Intermediate

A security scan finds an API key inside one of your published image layers, even though a later step deleted the file. What happened, and what do you do?

What a strong answer covers

Your AI report card counts how many of these ideas you cover.

  • Layers are additive; deleted file remains in earlier layer.
  • Rotate key immediately.
  • Remove image from registry.
  • Use BuildKit secret mounts for build secrets.
  • Runtime secrets via env/secret manager; scan for secrets.
Practise this topic

Start without signing up. Sign in free to get an AI report card on your answer.

See all topics