Courseiva
easyMultiple ChoiceObjective-mapped

CAS-004 Practice Question: A security analyst discovers that a containerized…

A security analyst discovers that a containerized application is running with root privileges. Which of the following is the best practice to reduce the attack surface?

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

Run the container as a non-root user

Running a container as a non-root user directly reduces the attack surface by limiting the privileges available to an attacker if the container is compromised. Option A (minimal base image) reduces potential vulnerabilities but does not address the root privilege issue. Option B (disable network access) could break application functionality and does not affect privilege level. Option D (read-only root filesystem) prevents writing to the filesystem but still allows root-level access.

Answer analysis

Option-by-option breakdown

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

  • Use a minimal base image

    Why it's wrong here

    A minimal base image reduces attack surface but does not address the root user issue.

  • Disable network access for the container

    Why it's wrong here

    Network access may be required for functionality; disabling it arbitrarily is not a best practice.

  • Run the container as a non-root user

    Why this is correct

    Running as non-root ensures the container does not have unnecessary privileges, reducing the blast radius of a compromise.

  • Use a read-only root filesystem

    Why it's wrong here

    While good, it does not remove root privileges; a root process could still cause harm.

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.