Skip to content
Kubei is a flexible Kubernetes runtime scanner, scanning images of worker and Kubernetes nodes providing accurate vulnerabilities assessment, for more information checkout:
Go HTML Dockerfile Makefile
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cmd/kubei creating kubei 1.0.0 Mar 24, 2020
deploy bump Kubei version to 1.0.1 Mar 29, 2020
images fix deploy command in README Mar 24, 2020
pkg add sidecar.portshift.io/inject=false annotation to klar jobs Mar 29, 2020
.gitignore creating kubei 1.0.0 Mar 24, 2020
Dockerfile creating kubei 1.0.0 Mar 24, 2020
LICENSE Update LICENSE Mar 25, 2020
Makefile creating kubei 1.0.0 Mar 24, 2020
README.md
go.mod creating kubei 1.0.0 Mar 24, 2020
go.sum

README.md

Kubei is a vulnerabilities scanning tool that allows users to get an accurate and immediate risk assessment of their kubernetes clusters. Kubei scans all images that are being used in a Kubernetes cluster, including images of application pods and system pods. It doesn’t scan the entire image registries and doesn’t require preliminary integration with CI/CD pipelines.

It is a configurable tool which allows users to define the scope of the scan (target namespaces), the speed, and the vulnerabilities level of interest.

It provides a graphical UI which allows the viewer to identify where and what should be replaced, in order to mitigate the discovered vulnerabilities.

Prerequisites

  1. A Kubernetes cluster is ready, and kubeconfig ( ~/.kube/config) is properly configured for the target cluster.

Required permissions

  1. Read secrets in cluster scope. This is required for getting image pull secrets for scanning private image repositories.
  2. List pods in cluster scope. This is required for calculating the target pods that need to be scanned.
  3. Create jobs in cluster scope. This is required for creating the jobs that will scan the target pods in their namespaces.

Configurations

  1. The file deploy/kubei.yaml is used to deploy and configure Kubei on your cluster.

  1. Set the scan scope. Set the IGNORE_NAMESPACES env variable to ignore specific namespaces. Set TARGET_NAMESPACE to scan a specific namespace, or leave empty to scan all namespaces.

  2. Set the scan speed. Expedite scanning by running parallel scanners. Set the MAX_PARALLELISM env variable for the maximum number of simultaneous scanners.

  3. Set severity level threshold. Vulnerabilities with severity level higher than or equal to SEVERITY_THRESHOLD threshold will be reported. Supported levels are Unknown, Negligible, Low, Medium, High, Critical, Defcon1. Default is Medium.

Usage

  1. Run the following command to deploy Kubei on the cluster:

    kubectl apply -f https://raw.githubusercontent.com/Portshift/kubei/master/deploy/kubei.yaml

  2. Run the following command to verify that Kubei is up and running:

    kubectl -n kubei get pod -lapp=kubei

  3. Then, port forwarding into the Kubei webapp via the following command:

    kubectl -n kubei port-forward $(kubectl -n kubei get pods -lapp=kubei -o jsonpath='{.items[0].metadata.name}') 8080

  4. In your browser, navigate to http://localhost:8080/view/ , and then click 'GO' to run a scan.

  5. To check the state of Kubei, and the progress of ongoing scans, run the following command:

    kubectl -n kubei logs $(kubectl -n kubei get pods -lapp=kubei -o jsonpath='{.items[0].metadata.name}')

  6. Refresh the page (http://localhost:8080/view/) to update the results.

Limitations

  1. Supports Kubernetes Image Manifest V 2, Schema 2 (https://docs.docker.com/registry/spec/manifest-v2-2/). It will fail to scan on earlier versions.

  2. The CVE database will update once a day.

You can’t perform that action at this time.