HardenKitDocs
Guides

Kubernetes and Helm

What the scan checks in manifests and charts.

The scan reads Kubernetes manifests (.yaml/.yml, including multi-document files and List objects) and Helm charts, which it renders with helm template and the chart's default values when Helm is installed. GitHub's hosted runners include Helm. Issues in a chart point at the template that produced them.

CheckSeverityWhat it finds
k8s-privilegedCriticalPrivileged containers
k8s-host-pathCritical / HighhostPath volumes; critical for the node's root, /etc, /proc, kubelet or container runtime sockets
k8s-rbac-anonymousCritical / HighRoles bound to system:unauthenticated, system:anonymous or every authenticated user
k8s-host-namespaceHighhostNetwork, hostPID or hostIPC
k8s-dangerous-capabilitiesHighAdded capabilities beyond the Pod Security baseline set (e.g. SYS_ADMIN, NET_ADMIN, ALL)
k8s-seccomp-unconfined, k8s-unmasked-procHighSeccomp turned off; unmasked /proc
k8s-hardcoded-secretHighSecrets written into container env values
k8s-secret-in-repoHighSecret manifests with values committed to the repository
k8s-rbac-wildcardHigh / MediumRoles granting * verbs on * resources (cluster-admin equivalent), or either wildcard
k8s-rbac-escalationHighescalate, bind or impersonate
k8s-cluster-adminHighBindings to cluster-admin
k8s-restrictedMedium / LowGaps against the restricted Pod Security Standard: medium when the container can run as root or escalate privileges, low for missing drop: [ALL] or seccomp profile
k8s-image-unpinnedMediumImages without a tag or with :latest
k8s-rbac-secrets, k8s-rbac-execMediumRoles that can read Secrets or exec into pods
k8s-host-portMediumhostPort
k8s-hardeningLowWritable root filesystem, no memory limit

The report also lists the images the workloads run. --images pulls each one from its registry (four at a time) and adds its packages to the scan; findings and upgrade rows name the image to rebuild. Private registries use your Docker credentials (~/.docker/config.json). Images that can't be pulled are listed in a warning.

Skip these checks with --no-k8s.