Courseiva
Supply Chain SecurityeasyMultiple ChoiceObjective-mapped

CKS Supply Chain Security Practice Question

A DevOps team uses a CI/CD pipeline to build container images and push them to a private registry. To minimize the risk of supply chain attacks, which of the following is the most effective security control to implement?

⚠ Common exam trap

Test-takers frequently confuse vulnerability scanning (which detects known flaws) with image signing (which ensures integrity and provenance), and mistakenly choose scanning as the primary defense against supply chain attacks, overlooking that a scanned image can still be replaced or tampered with.

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

Sign all container images using a private key and verify the signature before deployment.

Signing container images with a private key and verifying the signature before deployment ensures image integrity and authenticity, directly mitigating supply chain attacks where an attacker could tamper with images in transit or at rest. This control, often implemented using tools like Notary or Cosign (part of the Sigstore project), provides cryptographic proof that the image was produced by a trusted source and has not been altered. Without signature verification, even a vulnerability-scanned image could be replaced with a malicious one, bypassing other controls.

Answer analysis

Option-by-option breakdown

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

  • Scan all images for vulnerabilities using Trivy before pushing to the registry.

    Why it's wrong here

    Trivy vulnerability scanning identifies known CVEs in OS packages and application dependencies, but it cannot detect malicious code that was intentionally added during the build or tampering that occurred after the scan. A container image may be completely free of known vulnerabilities yet still be backdoored or modified by an attacker, so scanning alone provides no cryptographic proof of image integrity or origin. The scan is a static, point-in-time check, and it does not prevent a compromised or tampered image from being pulled and run if it passes the vulnerability gate.

  • Restrict access to the registry using Kubernetes RBAC and service accounts.

    Why it's wrong here

    Kubernetes RBAC and service accounts restrict who can authenticate to and perform actions on the registry, such as pushing or pulling images, but they do not validate the content of the image itself. An attacker who compromises a legitimate CI/CD pipeline account or a developer's credentials could still push a backdoored image that later gets pulled and executed. RBAC governs access control, not the authenticity or integrity of the artifacts being accessed, so it cannot detect or block tampered images even when all permissions are correctly configured.

  • Implement network policies to restrict traffic to the registry endpoint.

    Why it's wrong here

    Network policies control which pods, namespaces, or external endpoints can communicate with the registry endpoint based on labels, IP ranges, and ports. They affect only the flow of traffic, not the trustworthiness of the payload that travels over the network, meaning an image that was tampered with before transfer will still be pulled and run if it arrives over an allowed network path. Network policies also offer no defense when the registry itself is compromised or when a trusted user accidentally pushes a malicious image, because they operate purely at the network layer rather than the content layer.

  • Sign all container images using a private key and verify the signature before deployment.

    Why this is correct

    Signing container images with a private key (e.g., using cosign or Docker Content Trust) and verifying the signature before deployment provides a cryptographic guarantee that the image's digest matches the signed digest and that the signing key belongs to a trusted publisher. Verification typically happens during admission control—for example, through MutatingAdmissionWebhooks or policy engines like Kyverno or OPA Gatekeeper—so that only images bearing a valid signature from an authorized key are allowed to run. This directly mitigates supply chain tampering because any alteration to the image after signing invalidates the signature, and it also proves the image's origin, which vulnerability scanning, RBAC, and network policies cannot do.

About these practice questions

One of 114 original CKS practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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 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.