Question 521 of 997
Supply Chain SecuritymediumMultiple SelectObjective-mapped

Best Practices for Securing Your CI/CD Pipeline

This CKS practice question tests your understanding of supply chain security. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

Which two of the following are best practices for securing a CI/CD pipeline that builds and deploys container images? (Select TWO.)

Clue words in this question

Noticing these words before you look at the options changes how you read each choice.

  • Clue: "best"

    Why it matters: Signals that multiple options may be partially correct. Choose the option that most directly solves the exact problem described, not the one that sounds most complete.

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

Scan container images for vulnerabilities in the pipeline

Option A is correct because scanning container images for vulnerabilities in the pipeline is a fundamental supply chain security practice. It ensures that known Common Vulnerabilities and Exposures (CVEs) in base images or application dependencies are detected before the image is deployed, reducing the attack surface. Tools like Trivy, Clair, or Anchore Grype can be integrated into the CI/CD pipeline to fail the build if critical vulnerabilities are found, enforcing a security gate.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

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 container images for vulnerabilities in the pipeline

    Why this is correct

    Scanning helps catch vulnerabilities before deployment.

    Clue confirmation

    The clue word "best" in the question point toward this answer.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Store secrets as environment variables in the pipeline configuration

    Why it's wrong here

    Environment variables can be exposed; use a secrets manager.

  • Sign container images after building them

    Why this is correct

    Signing ensures the image has not been tampered with.

    Clue confirmation

    The clue word "best" in the question point toward this answer.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Run the build process as root to avoid permission issues

    Why it's wrong here

    Running as root increases security risks.

  • Grant all permissions to the pipeline service account to avoid failures

    Why it's wrong here

    Least privilege should be applied to reduce attack surface.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The CKS exam often tests the distinction between 'best practice' and 'common but insecure shortcut' — candidates may mistakenly think storing secrets as environment variables is acceptable because it works, but the exam expects knowledge of secure alternatives like vault or encrypted CI/CD variables.

Detailed technical explanation

How to think about this question

Container image signing (Option C) uses cryptographic signatures, typically with tools like cosign (part of the Sigstore project), to verify the image's integrity and provenance. This ensures that the image has not been tampered with after the build, and it supports admission controllers (e.g., Kyverno or OPA Gatekeeper) to enforce that only signed images are deployed in production. Under the hood, cosign leverages OCI artifacts and transparency logs (Rekor) for non-repudiation, making it a robust defense against supply chain attacks.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A practitioner preparing for the CKS exam encounters this exact type of scenario on the job. The correct answer here is not the most general option — it is the best answer for the specific constraint described. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. Real exam questions reward reading the full scenario before eliminating options, because the constraint defines which answer fits.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related CKS practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free CKS practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this CKS question test?

Supply Chain Security — This question tests Supply Chain Security — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Scan container images for vulnerabilities in the pipeline — Option A is correct because scanning container images for vulnerabilities in the pipeline is a fundamental supply chain security practice. It ensures that known Common Vulnerabilities and Exposures (CVEs) in base images or application dependencies are detected before the image is deployed, reducing the attack surface. Tools like Trivy, Clair, or Anchore Grype can be integrated into the CI/CD pipeline to fail the build if critical vulnerabilities are found, enforcing a security gate.

What should I do if I get this CKS question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Are there clue words in this question I should notice?

Yes — watch for: "best". Signals that multiple options may be partially correct. Choose the option that most directly solves the exact problem described, not the one that sounds most complete.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

2 more ways this is tested on CKS

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. Which TWO of the following are best practices for securing the software supply chain in a CI/CD pipeline?

medium
  • A.Use the 'latest' tag for base images to get the newest features
  • B.Store sensitive credentials directly in the pipeline YAML file
  • C.Scan all container images for known vulnerabilities before deployment
  • D.Ignore critical CVEs if they are in development environments
  • E.Sign container images to ensure integrity and authenticity

Why C: Option C is correct because scanning container images for known vulnerabilities (e.g., using Trivy, Clair, or Grype) before deployment is a fundamental supply chain security practice. It ensures that only images free of critical or high-severity CVEs are promoted to production, reducing the attack surface and preventing exploitation of known flaws.

Variation 2. Which TWO of the following are best practices for securing the container supply chain?

medium
  • A.Scan images for vulnerabilities in a CI pipeline before deploying.
  • B.Use image signing and verification (e.g., with cosign) to ensure image integrity.
  • C.Embed API keys directly in container images for authentication.
  • D.Allow all images from any registry without verification to speed up development.
  • E.Use mutable tags like 'latest' for easier updates.

Why A: Scanning images for vulnerabilities in a CI pipeline before deployment is a best practice because it catches known CVEs early, preventing vulnerable images from reaching production. Tools like Trivy, Clair, or Grype integrate into CI/CD to enforce policy gates, ensuring only compliant images proceed.

Keep practising

More CKS practice questions

Last reviewed: Jul 4, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

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.