A new junior pushed an image with a secret. Incident steps.
IntermediateScenarioCI/CD and production rollouts
Answer
Situation read → Secret exposure incident.
What I'd do →
- Revoke and rotate the secret immediately.
- Identify exposure: pull logs, who pulled the tag.
- Delete image tags and untagged manifests, run registry GC.
- Add
.dockerignoreand secret scanning. - Write a blameless postmortem.
Why → Rotation is the only real remediation.
Interview tip → Time-to-rotate matters more than time-to-delete.
More on CI/CD and production rollouts
Design a GitHub Actions workflow that builds, scans and pushes an image.IntermediateZero-downtime deploy on a single Docker host.AdvancedDeploy via GitOps with image digests.IntermediateCanary a new image on a Swarm service.AdvancedDocker build is flaky in CI due to network errors on package installs.IntermediateRun database migrations in the deploy flow of containerized apps.Intermediate