Courseiva
mediumMultiple ChoiceObjective-mapped

CAS-004 Practice Question: A company runs a containerized application in a…

A company runs a containerized application in a Kubernetes cluster. After a penetration test, the security team found that several containers are running with root privileges and have unnecessary packages installed. To reduce the attack surface, the team wants to enforce least privilege and minimize the software footprint. Which action should be taken first to address these findings?

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

Rebuild the container images using minimal base images and remove unnecessary packages

The first step to reduce the attack surface is to rebuild the container images using minimal base images (e.g., Alpine or distroless) and remove unnecessary packages. This directly addresses the findings of unnecessary packages and reduces the software footprint. While running containers as non-root and using read-only filesystems (Option C) improves security, it does not eliminate unnecessary packages. SELinux labels (Option A) and network policies (Option D) are additional hardening measures but do not address the core issue of container image bloat and privileged containers. Therefore, rebuilding images is the foundational action.

Answer analysis

Option-by-option breakdown

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

  • Apply SELinux labels to restrict container capabilities

    Why it's wrong here

    SELinux adds mandatory access control but does not remove packages.

  • Rebuild the container images using minimal base images and remove unnecessary packages

    Why this is correct

    Minimal images reduce attack surface by eliminating unnecessary components.

  • Configure the containers to run as non-root user and use read-only filesystems

    Why it's wrong here

    This addresses privilege escalation but not the unnecessary packages.

  • Implement network policies to limit lateral movement between pods

    Why it's wrong here

    Network policies are important but do not reduce the software footprint of containers.

About these practice questions

This CAS-005 question is part of Courseiva's 968-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This CAS-005 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 CAS-005 exam.