A compliance officer wants to continuously audit Kubernetes resource manifests for misconfigurations against security best practices before they are applied. Which tool type is best suited for this shift-left compliance approach?
Static analysis scans manifests in CI before they reach the cluster, catching misconfigurations at build time, while admission controllers enforce policy at apply time. Together they satisfy the stem's shift-left requirement to audit continuously before resources are applied.
Why this answer
Static code analysis tools (e.g., kube-score, Checkov, kube-linter) scan YAML manifests in CI/CD pipelines to catch misconfigurations like missing resource limits or privileged containers before deployment. Admission controllers (e.g., OPA Gatekeeper, Kyverno) enforce policies at the API server level, rejecting non-compliant resources at admission time. Together, they provide continuous, shift-left auditing that prevents misconfigured workloads from ever reaching the cluster.
Exam trap
KCSA often tests the misconception that runtime monitoring tools (log shippers, packet analyzers) provide compliance auditing, but shift-left specifically requires pre-deployment static analysis and admission control.
How to eliminate wrong answers
Option A is wrong because log shippers (e.g., Fluentd, Filebeat) collect and forward runtime logs; they do not analyze manifest content or enforce policies. Option B is wrong because packet analyzers (e.g., tcpdump, Wireshark) inspect network traffic at the packet level, not Kubernetes resource definitions. Option D is wrong because kernel debuggers (e.g., gdb, bpftrace) diagnose low-level kernel or process issues, not manifest compliance.