Courseiva
Question 98 of 866
Supply Chain SecuritymediumMultiple ChoiceObjective-mapped

CKS trivy fs Practice Question

You are implementing supply chain security for container images. Which tool would you use to scan a local directory of Dockerfiles and Kubernetes manifests for known vulnerabilities?

⚠ Common exam trap

The trap is that candidates might think `trivy fs` only scans packages, but it can also scan configuration files like Dockerfiles and Kubernetes manifests for vulnerabilities. The exam tests the understanding that `trivy` is a multi-purpose tool, and `fs` is the appropriate subcommand for local directory scanning, not just `trivy image`.

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

trivy fs

D is correct because `trivy fs` scans a local filesystem (including directories containing Dockerfiles and Kubernetes manifests) for known vulnerabilities. It parses these files, checks base images against vulnerability databases, and detects misconfigurations or CVEs. This tool is designed for supply chain security, covering both package vulnerabilities and infrastructure-as-code issues. The `fs` subcommand of trivy combines filesystem scanning with configuration analysis, making it suitable for the stated task.

Answer analysis

Option-by-option breakdown

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

  • kubectl scan

    Why it's wrong here

    `kubectl scan` is not a standard kubectl command; it does not exist as a tool for vulnerability scanning.

  • syft

    Why it's wrong here

    `syft` generates a Software Bill of Materials (SBOM), not vulnerability scanning. It is used for dependency listing, not for finding known vulnerabilities.

  • cosign sign

    Why it's wrong here

    `cosign sign` is used for signing container images to ensure integrity, not for scanning vulnerabilities.

  • trivy fs

    Why this is correct

    `trivy fs` scans a local directory for vulnerabilities, including those in Dockerfiles (via base image references) and Kubernetes manifests (via configuration analysis). It is the correct tool for this task.

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

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.