Top-10 Open-Source Kubernetes Vulnerability Scanners

Learn about the main Kubernetes security risks, how Kubernetes vulnerability scanners deal with them and what are the top 10 tools available on the market.

Roman Myronov

11/25/2021 6 min read

Since its appearance in mid-2014, Kubernetes (K8s), as an open-source container orchestration platform, has helped to a great degree automate, manage and scale containerized applications to a great degree. Kubernetes groups containers and selectively allocates them to the appropriate computing resource to ensure the best CPU and memory usage.

Without a doubt, containerization brings numerous benefits including the following ones:

  • You can add more nodes or machines based on application requirements and incorporate them with computing resources. You can also delete existing containers if needed.

  • During the adoption of the Kubernetes environment, multiple applications share a single version of the OS, which results in reduced maintenance costs and OS license fees.

  • Self-healing is another key benefit of Kubernetes: whenever a containerized service “dies,” the platform will instantly restart the service with a smart algorithm.


Overall, you can leverage a containerized environment to reduce app development and delivery costs. However, you still need an orchestration framework, like Kubernetes, to keep applications up and running hassle-free. Moreover, Kubernetes is a flexible framework that can support all of your app deployment strategies including rolling, zero-downtime, (blue-green), or progressive (canary).

Main Kubernetes Security Risks

In the Kubernetes environment, sensitive data (e.g., password, token, key) that containers need in order to perform standard operations is stored in a secure object called “secret.” This ensures that secrets are easily accessible to your pods on demand. These secrets are stored in “etcd,” an open-source datastore that serves as Kubernetes’ primary data backbone. By default, data in the “etcd” is not encrypted, which means that your secrets are not exactly secrets. The encryption option is actually available, but only for secret data in the data center (data at rest). To reduce data leakage risks, Kubernetes platform administrators restrict access to sensitive data through a role-based access control mechanism. However, none of these security measures can fully secure a Kubernetes deployment from all kinds of risks.

Another common security risk to the Kubernetes system arises from misconfigured components in the environment. Misconfiguration of role-based-access-control authorizations could make your containers vulnerable, as anyone would be able to access them. Similarly, incorrectly configured applications (such as container components running with root privileges by default) are just an open invitation for hackers to compromise your system or network. By gaining unauthorized access they can even set higher-level privileges for themselves in a matter of time.

Consider another risk scenario. If the Linux distribution underlying the Kubernetes platform is not enabled for the AppArmor security module, there is a potential vulnerability that you should worry about. Technically, AppArmor can be configured to limit access to a container for a certain set of resources, thereby reducing the network surface available for malicious attacks. However, you should keep in mind that no Linux distributions enable the AppArmor module by default. So, there are multiple security vulnerabilities that a Kubernetes deployment is prone to. That’s why it’s so important to identify security weaknesses before the damage is done. This is where a good vulnerability scanner comes to the rescue.

Reasons to Use Kubernetes Vulnerability Scanners and 10 Best Tools

Open-source scanning software is ideal for several reasons:

  • First of all, such tools are free and easily accessible.

  • Secondly, these scanners can help you avoid the tyranny of vendor lock-ins, which is the case with proprietary products.

  • Moreover, with open-source projects tools, you have the ability to independently develop a new and improved product that meets the unique security requirements of your Kubernetes landscape.

So, here’s our pick of the top-10 Kubernetes vulnerability scanners, based on their variety of features and good user experience. These products would help you to quickly identify the security and configuration risks around your Kubernetes platform.

#1 Kube-Bench

Open-sourced by Aqua Security, Kube-bench is a useful tool designed to check whether or not your Kubernetes deployment is in line with contemporary cybersecurity best practices. Among other things, it can detect insecure default configurations and improper user authentication. It also checks for insecure data, whether at rest or in transit. The tool runs tests in the form of a batch job. It is easy to update the tool even as test specifications continue to evolve since the tests are configured with YAML files. You can run the tool locally or distribute it as a container within your Kubernetes environment.

#2 Kube-Hunter

This is another security tool from Aqua Security that focuses on open-source penetration testing. Kube-hunter simulates a “responsible cyber-attack” with the idea of bringing to the surface cluster- and pod-based security threats. The default setting of the tool is “passive hunter” mode in which access points within a cluster are being scanned. By turning on “active hunter,” you can probe state-changing operational vulnerabilities, though this is potentially risky. Kube-hunter can run on a local machine or cluster or as a pod within the cluster to return a list of vulnerabilities. Moreover, it can be set to scan remote machines, specified Internet protocol addresses, or all the network interfaces of a machine.

#3 Kube-Score

Kube-score, a static analysis tool, checks Kubernetes object definitions against a full list of security controls. These checks include container limits, network policy, pod disruption policy, and pod anti-affinity configuration. As a user, you are free to enable or disable any of these options. The scanning technique is non-intrusive and, therefore, harmless. The YAML validation tool returns a list of helpful recommendations and these can make your Kubernetes resources more secure and resilient. Kube-score can be accessed online or installed locally via Docker or Homebrew. The tool provides you with a web-based user interface at no extra cost.

#4 Kubeaudit

Kubeaudit, a command-line tool, looks over Kubernetes clusters for common security concerns (e.g., running containers with root users, privilege escalations, AppArmor non-enablement around containers, various insecure default settings of pods). Kubeaudit is a Go program and comes with 13 auditors or tests that assess various aspects of container security. These tests can be conducted simultaneously or individually. Every audit result has one of the three security levels assigned to it (from the least critical to mission-critical). Kubeaudit is backed by a variety of documentation and auditor best practices. You can download these documents via this link: Auditors Section of the Kubeaudit Page on GitHub

#5 Kube-Scan

Kube-scan is a free container scanning tool by Octarine for calculating the risk factor associated with Kubernetes clusters. Kube-scan, itself a container, defies a risk score based on the run-time configuration of each workload in a cluster. The simple scoring formula is defined by the Kubernetes Common Configuration Scoring System. The tool assigns a risk score to each workload on a scale from 0 to 10 with 0 being low risk and 10 being high risk. The score is based on key parameters like configuration, availability, integrity, confidentiality, and security settings. The tool allows development teams to add their own custom rules to the built-in list.

#6 Kubesec

Kubesec, a risk scanning tool developed by Controlplane.io, considers commonly exploitable security risks such as running container processes with root users and privilege escalation loopholes. The tool evaluates the security posture of Kubernetes pods and other resources, based on their YAML configurations, and then generates a report in JSON format. The report presents the overall security tally and the severity score for every found vulnerability. In addition, it cites the underlying reasons behind each score. The scanner can be installed and easily run from a command-line interface or Docker.

#7 Krane

Krane is a simple static analysis tool, implemented by Shopify, to spot security risks in Kubernetes’ role-based-access-control design. The tool is informed by built-in rules and analyzes users’ roles, role bindings, and cluster roles to unearth potential vulnerabilities. The risk report is generated in a machine-readable format. The tool has such useful features as dashboard views and alerts to Slack regarding medium-to-high severity risks. Krane can be run locally as a command-line interface, as a Docker container, or as a stand-alone service.

#8 Red Kube

This tool is essentially a cheat sheet based on Kubectl commands used to control Kubernetes clusters. Red Kube considers the security setting of Kubernetes nodes running various containers from a potential hacker’s point of view. The Kubectl commands could be either passive or active. In passive commands, the tool merely collects security data around clusters and recommends remediation approaches. Active commands, on the other hand, involve maneuverings that might put clusters to potentially dangerous tests. Both commands map to the MITRE ATT&CK Framework which is globally accessible documentation of hacker tactics derived from real-world experience. Several commands can be executed in a single run, thanks to the tool’s workflow orchestration defined in Python.

#9 Kubestriker

The Kubestriker open-source tool identifies security issues arising out of misconfigured Kubernetes clusters. This platform-independent product performs a host of in-depth security checks across open ports and diverse Kubernetes environments (e.g., Amazon EKS, Azure AKS, Google GKE). Kubestriker efficiently secures resources hosted in the cloud and identifies misconfigurations that make enterprises susceptible to cyberattacks. Additionally, the tool provides visual representations of the critical components of the Kubernetes infrastructure and attack paths of potential hackers.

#10 Illuminatio

Developed by Inovex, Illuminatio is a command-line tool that scans Kubernetes clusters for proper policy enforcement. Being written in Python, Illuminatio builds and executes policy test cases to determine whether policies have been enforced or have merely been declared. The latter case is risk-prone because there could be a time lag of several minutes or even hours before policies start to take effect on the cluster nodes. And this is where Illuminatio comes to the aid. By using a relevant test case, the tool detects pods that might be at risk and reports results in a timely manner. All test results are properly written in plain text to a dedicated resource within the cluster and are printed using the Illuminatio CLI interface.

Conclusion

Even though a vulnerability scanner may not necessarily detect all of the vulnerabilities in a Kubernetes orchestration, it is still an indispensable tool that helps to evaluate the security state of your Kubernetes setup. Thus, the development teams just can’t ignore this step in security assessment.

Now you know about the top 10 open-source Kubernetes vulnerability scanners and their main features. Choose the tool for your business based on your project’s complexity and tool’s functionality.

Feel free to send us your comments or suggestions,

Goodbye until next time!