Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
K

kube-bench

> DevOps
Open source

Checks whether Kubernetes is deployed according to security best practices as defined in the CIS Kubernetes Benchmark

8.1K stars0 likes2 views
WebsiteGitHub

About

Checks whether Kubernetes is deployed according to security best practices as defined in the CIS Kubernetes Benchmark

GitHub Release Downloads Docker Pulls Go Report Card Coverage Status

kube-bench is a tool that checks whether Kubernetes is deployed securely by running the checks documented in the CIS Kubernetes Benchmark.

Tests are configured with YAML files, making this tool easy to update as test specifications evolve.

CIS Scanning as part of Trivy and the Trivy Operator

Trivy, the all in one cloud native security scanner, can be deployed as a Kubernetes Operator inside a cluster. Both, the Trivy CLI, and the Trivy Operator support CIS Kubernetes Benchmark scanning among several other features.

Quick start

There are multiple ways to run kube-bench. You can run kube-bench inside a pod, but it will need access to the host's PID namespace in order to check the running processes, as well as access to some directories on the host where config files and other files are stored.

The supplied job.yaml file can be applied to run the tests as a job. For example:

bash
$ kubectl apply -f job.yaml
job.batch/kube-bench created

$ kubectl get pods
NAME                      READY   STATUS              RESTARTS   AGE
kube-bench-j76s9   0/1     ContainerCreating   0          3s

# Wait for a few seconds for the job to complete
$ kubectl get pods
NAME                      READY   STATUS      RESTARTS   AGE
kube-bench-j76s9   0/1     Completed   0          11s

# The results are held in the pod's logs
kubectl logs kube-bench-j76s9
[INFO] 1 Master Node Security Configuration
[INFO] 1.1 API Server
...

For more information and different ways to run kube-bench see documentation

Please Note

  1. kube-bench implements the CIS Kubernetes Benchmark as closely as possible. Please raise issues here if kube-bench is not correctly implementing the test as described in the Benchmark. To report issues in the Benchmark itself (for example, tests that you believe are inappropriate), please join the CIS community.

  2. There is not a one-to-one mapping between releases of Kubernetes and releases of the CIS benchmark. See CIS Kubernetes Benchmark support to see which releases of Kubernetes are covered by different releases of the benchmark.

By default, kube-bench will determine the test set to run based on the Kubernetes version running on the machine.

  • see the following documentation on Running kube-bench for more details.

Contributing

Kindly read Contributing before contributing. We welcome PRs and issue reports.

Roadmap

Going forward we plan to release updates to kube-bench to add support for new releases of the CIS Benchmark. Note that these are not released as frequently as Kubernetes releases.

Issues· 106 open

View all issuesOpen on GitHub
  • #1375

    If use daemonset can not terminate automatically after scan, if use cronjob can not scan all the nodes.

    Updated Sep 17, 2026
  • #2151

    Tests 4.1.3 and 4.1.4 do not pass if proxy kubeconfig is not present (regression from issue 699 ?)

    Updated Sep 17, 2026
  • #2145

    4.6.3 default-namespace check false-positive FAIL: regex does not match kubectl's service/kubernetes output (aks-1.7/1.8, gke-1.8.0/1.9.0)

    Updated Sep 7, 2026
  • #1669

    Container Network Interface file permissions (--cni-conf-dir)

    Updated Sep 4, 2026
  • #2119

    CNI file checks 1.1.9/1.1.10 false-FAIL on CNIs without host-local IPAM (absent /var/lib/cni/networks)

    Updated Sep 4, 2026
  • #2144

    Support CIS Google Kubernetes Engine (GKE) GKE-2.0.0 for k8s v1.34 - v1.35

    Updated Sep 2, 2026
  • #2143

    Support CIS Azure Kubernetes Service (AKS) AKS-2.0.0 for k8s v1.29 - v1.35

    Updated Sep 2, 2026
  • #2142

    Support CIS Amazon Elastic Kubernetes Service (EKS) EKS-2.0.0 for k8s v1.34 - v1.35

    Updated Sep 2, 2026
  • #2124

    Support CIS kubernetes CIS-2.0.1 for k8s v1.34 - v1.35

    Updated Sep 2, 2026
  • #2139

    kube-bench fail to check kubelet service file at /usr/lib/systemd/system/kubelet.service on openSuSE worker node

    Updated Aug 28, 2026

> Tags

Gocis-benchmarkcis-kubernetes-benchmarkcis-securityhacktoberfest

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedOct 1, 2026
CategoryDevOps
PricingOpen source

> Related tools

D
Docker
容器化平台,标准化应用交付
G
GitHub Actions
GitHub 原生 CI/CD 工作流
N
Nginx
高性能 Web 服务器与反向代理