Courseiva
Security →hardMultiple Choice

CV0-004 Security Practice Question

During a security audit, a cloud engineer discovers that a container image used in production has a known critical vulnerability in a base layer. Which practice should be implemented to prevent this in the future?

⚠ Common exam trap

CV0-004 often tests the confusion between runtime security controls (like pod security policies) and build-time security practices (like image scanning), leading candidates to choose runtime measures for preventing vulnerable images.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

Perform container image scanning during CI/CD

Container image scanning during CI/CD integrates security checks into the build pipeline, automatically detecting vulnerabilities in base layers and dependencies before deployment. This shift-left approach prevents vulnerable images from reaching production by failing the build or alerting teams. It is the most effective practice to prevent known vulnerabilities in base layers from being deployed.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Enable Kubernetes pod security policies

    Why it's wrong here

    Pod security policies constrain pod runtime privileges and host access; they cannot detect a vulnerable package inside an image layer. It tempts because it is a Kubernetes hardening measure, and it would be correct for restricting privileged containers, not for preventing images with known CVEs from being deployed.

  • ✗

    Use only official images from Docker Hub

    Why it's wrong here

    Official Docker Hub images still ship vulnerable base layers, so provenance alone does not detect or remediate the flaw; scanning images in the pipeline does. It tempts because trusted sources reduce malware risk, and it would be correct for limiting supply-chain tampering, not for catching known CVEs.

  • ✓

    Perform container image scanning during CI/CD

    Why this is correct

    Scanning images in CI/CD catches vulnerable base layers before deployment, so the pipeline fails the build rather than letting the flaw reach production. This directly satisfies the stem's requirement to prevent known critical vulnerabilities recurring in future container images.

  • ✗

    Implement network segmentation

    Why it's wrong here

    Network segmentation limits lateral movement after compromise but never identifies or removes the vulnerable base layer already baked into the image. It tempts because it is a genuine defence-in-depth control, and it would be correct for containing a breach, whereas the audit finding demands preventing vulnerable layers from reaching production.

About these practice questions

Courseiva writes every CV0-004 question from scratch — 834 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official CompTIA exam blueprint

This CV0-004 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CV0-004 exam.