Ensure SecurityContext Field Is Set
Ensure to configure a security context for a Pod or Container. The security context defines a pod or container's privileges and access control settings.
Risk Level: high
Cloud Entity: Kubernetes
Spectral Rule ID: K8S258
REMEDIATION
in spec
set securityContext
spec:
+ securityContext:
References:
- https://kubernetes.io/docs/concepts/workloads/controllers/job/
- https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/#securitycontext-v1-core
- https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
Pods
Pods are the smallest deployable units of computing that can be created and managed in Kubernetes.A Pod is a group of one or more containers (such as Docker containers), with shared storage/network, and a specification for how to run the containers.
Updated about 1 year ago