Cis K8S V200 5.6.4

The default namespace should not be used (Manual)

cyberstrikeus Updated

File contents

5.6.4 The default namespace should not be used (Manual)

Profile Applicability

  • Level 2 - Master Node

Description

Kubernetes provides a default namespace, where objects are placed if no namespace is specified for them. Placing objects in this namespace makes application of RBAC and other controls more difficult.

Rationale

Resources in a Kubernetes cluster should be segregated by namespace, to allow for security controls to be applied at that level and to make it easier to manage resources.

Impact

None

Audit

Run this command to list objects in default namespace:

kubectl get $(kubectl api-resources --verbs=list --namespaced=true -o name | paste -sd, -) --ignore-not-found -n default

The only entries there should be system managed resources such as the kubernetes service.

Remediation

Ensure that namespaces are created to allow for appropriate segregation of Kubernetes resources and that all new resources are created in a specific namespace.

Default Value

Unless a namespace is specific on object creation, the default namespace will be used.

cyberstrikeus/cyberstrike/tree/main/.cyberstrike/skill/CIS_benchmarks/Server_Software/Kubernetes/CIS_Kubernetes_Benchmark_v2.0.0/cis-k8s-v200-5.6.4 commit 4e2189414c

Frequently asked questions

npx skillmds@latest add cyberstrikeus/cis-k8s-v200-5-6-4