Q: How do you scan a Docker image for vulnerabilities before pushing to a registry?
trivy image <image> — scans OS packages and app libraries for CVEs. Integrate in CI: fail the pipeline on HIGH/CRITICAL findings. Also: d...
#Docker #Docker #L3 #Containers #Linux #Vulnerability Scanning
🎙️ Candidate Opening & Architectural Context
""Container stability relies on clean signal handling (SIGTERM vs SIGKILL) and immutable image tagging. When addressing this question, I walk the interviewer through our production incident runbook: isolating the blast radius, checking diagnostic logs and metrics, and applying a safe fix.""
Advertisement
🛠️ Production Runbook & Step-by-Step Resolution
1️⃣
Production Solution & Architecture
trivy image — scans OS packages and app libraries for CVEs. Integrate in CI: fail the pipeline on HIGH/CRITICAL findings. Also: docker scout cves (Docker's built-in tool), snyk container test.
💡 The Senior SRE Gold Nugget (Key Architectural Takeaway)
"Pro-Tip: trivy image — scans OS packages and app libraries for CVEs. Integrate in CI: fail the pipeline on HIGH/CRITICAL findings. Also: d."
⚡ 60-Second Elevator Pitch Talking Points
- Immediate Triage: trivy image — scans OS packages and app libraries for CVEs. Integrate in CI: fail the pipeline
- Run targeted verification commands before modifying configuration.
- Automate permanent guardrails (CI check, alerts, IaC policy) to prevent recurrence.
Advertisement