hardMultiple Select
Best Practices for Securing Containerized Applications
Which TWO of the following are best practices for securing containerized applications? (Select exactly 2.)
Quick Answer
The answer is using minimal base images such as Alpine or scratch and running containers as a non-root user. These two practices directly reduce the attack surface and limit the potential for container breakout, which is a core concern in container security best practices. A minimal base image eliminates unnecessary packages and libraries that could harbor vulnerabilities, while running as non-root ensures that even if an attacker compromises the container, they lack the privileges to escalate to the host system. On the CISSP exam, this topic appears in Domain 3 (Security Architecture and Engineering) and tests your understanding of secure configuration and isolation mechanisms. A common trap is confusing production hardening with debugging convenience—options like enabling debug ports or bind mounting the host filesystem are dangerously insecure. For a quick memory tip, think “lean and low”: keep the image lean (minimal base) and the user low (non-root).
⚠ Common exam trap
A common mix-up: candidates confuse 'persisting logs' (Option A) as a security measure, but in container security, mounting the host filesystem is a major isolation violation, not a best practice.
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
✓
Running the container process as a non-root user
Option B is correct because running the container process as a non-root user (e.g., via the USER directive in a Dockerfile or runAsNonRoot in Kubernetes) enforces least privilege, so a container escape or compromised process cannot gain root-level access to the host or other resources. Option E is correct because minimal base images such as Alpine or scratch drastically reduce the attack surface by eliminating unnecessary packages, shells, and libraries that could contain exploitable vulnerabilities. Option A is wrong because mounting the host filesystem into a container breaks isolation and can expose sensitive host data to compromise. Option C is wrong because 'cleaning the certificate store' is not a recognized container security practice and would actually break TLS trust, not prevent MITM. Option D is wrong because exposing port 22 for SSH debugging in production increases the attack surface and is discouraged in favor of exec-based debugging or ephemeral containers.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Mounting the host filesystem to persist logs
Why it's wrong here
Bind-mounting the host filesystem gives a compromised container write access to node paths, enabling escape and tampering; logs should go to stdout or a log driver. It is tempting because persistent volumes are legitimate for stateful workloads, but log persistence never justifies exposing the entire host root.
- ✓
Running the container process as a non-root user
Why this is correct
Running the container process as a non-root user enforces least privilege, so a container escape or compromised application cannot gain root on the host. This directly satisfies the stem's container-hardening constraint by removing unnecessary privileged capabilities from the workload.
- ✗
Cleaning the certificate store to prevent MITM
Why it's wrong here
Container images ship their own trust bundles, so cleaning a host certificate store does nothing for pod-to-pod TLS and breaks node-level trust instead. It is tempting because certificate-store hygiene genuinely counters MITM on traditional servers, but container isolation moves that trust boundary into the image and service mesh.
- ✗
Exposing port 22 for SSH debugging in production
Why it's wrong here
Exposing port 22 for SSH debugging in production widens the attack surface of the container host and bypasses orchestration-based access controls. It is tempting because interactive shells speed up troubleshooting, and would be acceptable in an isolated non-production environment with strict network restrictions.
- ✓
Using minimal base images such as Alpine or scratch
Why this is correct
Minimal base images such as Alpine or scratch reduce the attack surface by shipping fewer packages, libraries and shells, so fewer vulnerabilities exist to exploit. This directly satisfies the stem's container-hardening constraint by shrinking the exploitable component set within each image.
Go deeper
Related to this question
Learn chapter
Identity and Access Management (IAM)
Key term
Security
Security in IT is the practice of protecting systems, networks, and data from unauthorized access, damage, or theft.
Key term
Container security
Container security is the practice of protecting containerized applications and their underlying infrastructure from threats throughout the entire lifecycle.
About these practice questions
Courseiva writes every CISSP question from scratch — 816 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 →
Same concept, more angles
1 more way this is tested on CISSP
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. A company is deploying a containerized application using Kubernetes. Which practice BEST ensures the security of the container images?
medium- ✓ A.Scan images for vulnerabilities and use minimal base images
- B.Restrict containers from running as root
- C.Use the latest version of the base image without scanning
- D.Enable container escape protection
Why A: Scanning container images for known vulnerabilities (e.g., using Trivy, Clair, or Snyk) and using minimal base images (e.g., Alpine or distroless) directly reduces the attack surface and eliminates unnecessary packages that may contain exploitable flaws. This practice is foundational to secure software supply chain management and aligns with the principle of least functionality in containerized environments.
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This CISSP practice question is part of Courseiva's free ISC2 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 CISSP exam.