CCCS-203B · Question #234
You are tasked with reviewing a cloud image configured for deployment in a Kubernetes environment. Which of the following practices identifies a potential misconfiguration that could compromise…
The correct answer is D. Including hardcoded credentials in the image's environment variables. Option A: Multi-stage builds are a best practice for creating minimal and efficient images by excluding unnecessary build artifacts. This enhances security by reducing the attack surface. It is not a misconfiguration. Option B: This is a best practice to enhance security…
Question
You are tasked with reviewing a cloud image configured for deployment in a Kubernetes environment. Which of the following practices identifies a potential misconfiguration that could compromise security?
Options
- AUsing a multi-stage build to reduce the final image size.
- BSetting the USER directive to a non-root user in the Dockerfile.
- CUtilizing an official base image from a trusted source without scanning it.
- DIncluding hardcoded credentials in the image's environment variables.
How the community answered
(56 responses)- A9% (5)
- B16% (9)
- C4% (2)
- D71% (40)
Explanation
Option A: Multi-stage builds are a best practice for creating minimal and efficient images by excluding unnecessary build artifacts. This enhances security by reducing the attack surface. It is not a misconfiguration. Option B: This is a best practice to enhance security. Running the application as a non-root user reduces the impact of a potential compromise, as the attacker's privileges would be limited. This is not a misconfiguration but a security-strengthening measure. Option C: While using official base images is a good starting point, they can still contain vulnerabilities. Scanning these images for known issues before use is a necessary step to ensure security compliance. Relying solely on their "official" status is a common misconception. Option D: Hardcoded credentials in environment variables are a critical security misconfiguration. If the image is shared or deployed in an environment where logs or configurations can be accessed, these credentials can be exposed, leading to unauthorized access. Best practices recommend using a secure secrets management solution instead of hardcoding sensitive
Topics
Community Discussion
No community discussion yet for this question.