CKS Supply Chain Security Practice Question
In a CI/CD pipeline, which step is MOST effective for detecting known vulnerabilities in a container image before deployment?
⚠ Common exam trap
The CKS exam often tests the distinction between static analysis of build files (like Dockerfile linting) and runtime or image-level security scanning, leading candidates to mistakenly choose linting as a vulnerability detection method.
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 a vulnerability scan on the container image
Running a vulnerability scan on the container image (Option A) is the most effective step because it directly checks the image layers and installed packages against known Common Vulnerabilities and Exposures (CVEs) databases, such as the National Vulnerability Database (NVD). This identifies security flaws in base images and dependencies before deployment, which is a core requirement of supply chain security in Kubernetes.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Run a vulnerability scan on the container image
Why this is correct
Scanning the built image against known vulnerability databases detects outdated packages and CVEs before the image reaches a registry or runtime. This catches known flaws at the earliest pipeline stage, whereas signing, linting or runtime monitoring do not identify known vulnerabilities in image contents.
- ✗
Check the image size
Why it's wrong here
Image size reveals nothing about installed package versions, so it cannot match layers against CVE databases. It is tempting because bloated images do carry larger attack surfaces, making size a useful hygiene metric, but that would be a build-optimisation or registry-cleanup scenario, not vulnerability detection.
- ✗
Run unit tests on the application code
Why it's wrong here
Unit tests exercise application logic and cannot enumerate OS packages or libraries baked into the image, so no CVE database comparison happens. It is tempting because tests run on every commit and catch code defects, which would be the right control for application correctness, not for known vulnerabilities in image contents.
- ✗
Lint the Dockerfile
Why it's wrong here
Dockerfile linting inspects instructions for syntax and best-practise issues, not the resolved package versions inside the built image, so no CVE matching occurs. It is tempting because linting runs early and cheaply in the pipeline, which would suit a Dockerfile quality-gate scenario rather than known-vulnerability detection.
Go deeper
Related to this question
About these practice questions
This CKS question is part of Courseiva's 845-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 →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This CKS practice question is part of Courseiva's free CNCF 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 CKS exam.