Skip to main content

More Info:

Enable docker/default seccomp profile in your pod definitions

Risk Level

High

Address

Security

Compliance Standards

  • CIS Kubernetes

Triage and Remediation

Remediation

Manual Steps

  1. List and inspect pods missing an explicit seccompProfile
    • Run on: any machine with kubectl access
    • Command to list pods and show securityContext:
    • Identify pods where the third column is empty (no pod-level seccompProfile), or not RuntimeDefault.
  2. Check container-level overrides within those pods
    • For each pod of interest (NAMESPACE and POD_NAME from step 1), inspect the full spec:
    • Under .spec.containers[].securityContext.seccompProfile.type, note any containers that specify a different profile, or none at all.
  3. Decide which workloads must use RuntimeDefault vs. a custom profile
    • For each workload owner (Deployment/StatefulSet/DaemonSet/Job/CronJob), determine whether RuntimeDefault is acceptable or whether a justified, documented custom seccomp profile is required.
    • To find the owning controller:
    • Record exceptions where RuntimeDefault cannot be used, along with justification.
  4. Update workload manifests to set seccompProfile: RuntimeDefault
    • Retrieve the manifest for the owning controller (example for a Deployment):
    • Edit deployment-seccomp-fix.yaml to add or update:
    • If any container-level securityContext.seccompProfile exists and is not required, remove or change it to RuntimeDefault as well.
  5. Apply the updated manifests and roll out changes
    • Apply changes:
    • If needed, trigger rollouts or restarts according to your operational process (e.g., for Deployments, they will roll out automatically when the Pod template changes).
  6. Verify that pods now use RuntimeDefault
    • After rollouts complete, re-run:
    • For any remaining pods without RuntimeDefault (or with container-level overrides), confirm they are explicitly approved exceptions; otherwise, repeat steps 3–5 to correct them.
Review which namespaces/workloads you actually intend to enforce a seccomp profile for (often your application namespaces, not system namespaces like kube-system).
If this prints nothing, the pod has no pod-level securityContext, which means it is not explicitly configured for seccompProfile at pod level.
In the spec: section, look for:
  • securityContext: at pod level:
  • And/or securityContext: under each container:
Output that indicates a problem (needs review/change):
  • No seccompProfile at pod or container level at all:
  • A seccompProfile with type not set to RuntimeDefault (or explicitly set to Unconfined):
These situations require human judgement to decide whether to add or adjust the seccompProfile to use type: RuntimeDefault (which aligns with the provided remediation).
This prints pods where the pod-level seccompProfile.type is either not set or not RuntimeDefault. Each printed line is a candidate for manual review. Note it does not check container-level overrides—those still require inspecting the full YAML as in step 3.
What output indicates a problem
  • Any line printed by the script indicates a container that does not comply with the benchmark expectation of seccompProfile.type: RuntimeDefault:
    • SECCOMP_PROFILE is NONE: no seccomp profile configured at Pod or container level.
    • SECCOMP_PROFILE is any value other than RuntimeDefault (e.g., Localhost).

Additional Reading: