More Info:
Applying the default seccomp profile restricts the syscalls available to containers, reducing the kernel attack surface.Risk Level
MediumAddress
SecurityCompliance Standards
- CIS Kubernetes
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
Identify pods and collect their seccomp settings
- On any machine with kubectl access, list all pods and export their specs for review:
- Alternatively, spot-check a specific namespace:
- On any machine with kubectl access, list all pods and export their specs for review:
-
Review pods for explicit or inherited seccomp profiles
- Search for
seccompProfileusage: - For pods of concern, inspect their security context to see whether they use the runtime default profile:
- In the output, look under:
.spec.securityContext.seccompProfile.spec.containers[].securityContext.seccompProfile.spec.initContainers[].securityContext.seccompProfile
Check thattype: RuntimeDefaultis set where required.
- Search for
-
Decide which workloads must use the runtime default seccomp profile
- For each pod/workload, determine:
- Whether it is security-sensitive (public-facing, multi-tenant, or runs with elevated permissions).
- Whether it needs a custom seccomp profile (e.g., legacy or low-level system tools) or can use the runtime default (
type: RuntimeDefault).
- Document any justified exceptions (pods that must use a custom profile or cannot yet be restricted) along with business/technical rationale.
- For each pod/workload, determine:
-
Update pod or controller manifests to use the runtime default seccomp profile
- For pods you decide should use the default profile and that currently lack it, edit the owning resource (Deployment/StatefulSet/DaemonSet/Job/CronJob, or Pod manifest) on any machine with kubectl access:
- Under
spec.template.spec.securityContext(pod-level) or under each container’ssecurityContext, add or adjust: - For workloads managed via GitOps or other IaC, make the same change in the source manifest instead of using
kubectl edit, then apply:
- For pods you decide should use the default profile and that currently lack it, edit the owning resource (Deployment/StatefulSet/DaemonSet/Job/CronJob, or Pod manifest) on any machine with kubectl access:
-
Reconcile pods to pick up the new seccomp settings
- For controllers (Deployments, etc.), ensure a rollout occurs so new pods use the updated security context:
- For standalone Pods not managed by a controller, delete and recreate them from the updated manifest:
- For controllers (Deployments, etc.), ensure a rollout occurs so new pods use the updated security context:
-
Verify the applied seccomp profile on running pods
- After updates and rollouts, confirm that pods are now using the runtime default profile:
- Confirm that relevant pods show:
- Optionally, re-export and re-scan cluster-wide to ensure coverage:
- After updates and rollouts, confirm that pods are now using the runtime default profile:
Using kubectl
Using kubectl
- Column 1: Namespace
- Column 2: Pod name
- Column 3: Pod-level
seccompProfile.type - Column 4: Pod-level
seccompProfile.localhostProfile
typeis empty (no pod-level seccomp profile set).typeisUnconfined.typeisLocalhostbutlocalhostProfiledoes not correspond to your approved/default profile.- You rely only on container-level seccomp instead of pod-level, or there is inconsistency across pods.
securityContext.seccompProfile under each container.Indications of a potential problem:- Missing
seccompProfileat pod level and at all container levels. - Explicit
type: Unconfined. typevalues that do not align with your chosen default (RuntimeDefaultper remediation).
typeisUnconfined.typeis empty and pod-level also has noseccompProfile.- Mixed usage within the same pod (some containers configured, some not), unless this is an intentional design and documented.
Verification after you make any manifest changes (no automated fix here):
seccompProfile.type: RuntimeDefault (or your chosen default) and that no unexpected Unconfined or empty profiles remain, subject to your security policy and workload requirements.Automation
Automation
-
For this control, you want every workload to use the default runtime seccomp profile:
- Pod-level or container-level
SeccompTypeshould beRuntimeDefault. SeccompLocalhostProfileshould typically beUNSETwhenSeccompTypeisRuntimeDefault.
- Pod-level or container-level
-
Lines that are potential problems and need manual review:
-
SeccompTypeisUNSET
→ No explicit seccomp profile set; behavior depends on kubelet/container runtime defaults. -
SeccompTypeis anything other thanRuntimeDefault(e.g.Localhost,Unconfined)
→ Not using the default runtime profile; check if this is an intentional exception. -
SeccompTypeisLocalhostwith a customSeccompLocalhostProfile
→ Strong indication of non-default profile; validate the policy and exception process.
-

