Vulnsy
Infrastructure50 items

Kubernetes & Container Security Checklist

A pentest-oriented checklist for Kubernetes clusters and the containers running on them. Covers cluster-control-plane exposure, pod-spec hardening, network policy, runtime escape risks, and the privilege graph that ties it all together.

Aligned with the CIS Kubernetes Benchmark, NSA/CISA Kubernetes Hardening Guidance v1.2, OWASP K8s Top 10, and NIST SP 800-190.

CIS Kubernetes BenchmarkNSA/CISA Kubernetes Hardening GuidanceOWASP K8s Top 10NIST SP 800-190
Progress: 0 of 50 items
0%
Commands
kubectl config get-contexts
kubectl version --short
Evidence to capture

Cluster inventory with versions and managed/unmanaged flag

Commands
kubectl get pods -A -o jsonpath='{.items[*].spec.containers[*].image}' | tr " " "\n" | sort -u
Commands
kubectl get validatingwebhookconfigurations
kubectl get mutatingwebhookconfigurations
Commands
kubectl apply -f https://raw.githubusercontent.com/aquasecurity/kube-bench/main/job.yaml
kubectl logs -f job/kube-bench
Commands
kube-hunter --remote <api-server>
kubectl run --rm -it --image=aquasec/kube-hunter kube-hunter --command -- /entrypoint.sh --pod
References
Commands
nmap -p 6443,443 -sV --script=ssl-cert <api-server>
Commands
kubectl get --raw "/api/v1/nodes/<node>/proxy/configz" | jq
Commands
kubectl get ns -o json | jq '.items[] | {ns:.metadata.name, psa:.metadata.labels}'
Commands
kubectl get clusterrolebindings -o json | jq '.items[] | select(.roleRef.name=="cluster-admin")'
Commands
kubectl get pods -A -o json | jq '.items[] | {name:.metadata.name, ns:.metadata.namespace, runAsNonRoot:.spec.securityContext.runAsNonRoot}'
Commands
kubectl get pods -A -o json | jq '.items[] | select(.spec.containers[]?.securityContext.privileged==true) | {name:.metadata.name, ns:.metadata.namespace}'
Commands
kubectl get pods -A -o json | jq '.items[] | select(.spec.volumes[]?.hostPath) | {name:.metadata.name, mounts:.spec.volumes}'
Commands
trivy k8s --report summary cluster
trivy image <image>:<tag> --severity HIGH,CRITICAL
References
Commands
kubectl get pods -A -o json | jq '.items[] | select(.spec.automountServiceAccountToken!=false) | .metadata.name' | head
Commands
kubectl auth can-i list secrets --all-namespaces --as=system:serviceaccount:<ns>:<sa>
Commands
kubectl run net-test --rm -it --image=nicolaka/netshoot --restart=Never -- bash
Commands
kubectl get nodes -o jsonpath='{.items[*].status.nodeInfo.kernelVersion}'
Commands
TOKEN=$(cat /var/run/secrets/kubernetes.io/serviceaccount/token)
kubectl --token=$TOKEN auth can-i --list
Commands
kubectl run meta-probe --rm -it --image=curlimages/curl --restart=Never -- curl -fsS http://169.254.169.254/latest/meta-data/iam/security-credentials/
Commands
kubectl exec -it <pod> -- cat /etc/shadow
Commands
rakkess --as=system:serviceaccount:<ns>:<sa>
rbac-tool policy-rules -e '^system:serviceaccount:<ns>:<sa>$'

Report Vulnerabilities Faster with Vulnsy

Stop rewriting the same findings. Use Vulnsy's reusable templates, collaborative workflows, and professional report generation to deliver pentest reports 10x faster.

Start Free Trial