More Info:
The RuntimeDefault seccomp profile restricts the syscalls a container may make, reducing the kernel attack surface. Pods should set this profile in their security context.Risk Level
MediumAddress
SecurityCompliance Standards
- CIS GKE
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
List pods missing RuntimeDefault seccomp
- Run on: any machine with kubectl access
-
Review pod/containers for compatibility with RuntimeDefault
- For each listed pod, inspect its spec and containers for special syscall or privileged needs (e.g., hostPath mounts, privileged containers, CAP_SYS_ADMIN, low‑level networking/storage agents):
- Coordinate with the application owner to confirm whether the workload can run under the restricted RuntimeDefault profile, or whether it truly needs a custom seccomp profile or privileged capabilities.
-
Decide the policy per workload
- For each pod type (usually via its controller: Deployment, DaemonSet, StatefulSet, Job, CronJob):
- Preferred: enforce
RuntimeDefaultat pod level. - If incompatible: document the justification, consider designing and referencing a specific seccomp profile instead of leaving it unset or fully unconfined.
- Preferred: enforce
- For each pod type (usually via its controller: Deployment, DaemonSet, StatefulSet, Job, CronJob):
-
Update controller manifests to set RuntimeDefault
- Identify the owning controller:
- Edit the controller spec to add a pod-level
securityContextwithseccompProfileset toRuntimeDefault(or update existing):
- In the
spec.template.specsection, ensure:
- If pod-level is not possible and you accept that risk, set it at container level for each container instead:
- Remove deprecated pod annotation
seccomp.security.alpha.kubernetes.io/podwhere present onceseccompProfileis set.
-
Apply changes via manifests/IaC when applicable
- If resources are managed by GitOps/IaC, modify the source manifests or Helm charts rather than using
kubectl edit, mirroring the samesecurityContext.seccompProfile.type: RuntimeDefaultstructure, then redeploy through your standard pipeline to avoid drift.
- If resources are managed by GitOps/IaC, modify the source manifests or Helm charts rather than using
-
Verify pods now use RuntimeDefault
- After controllers roll out updated pods, re-run the audit, and confirm previously flagged pods now appear with
RuntimeDefault(or a justified exception list):
- After controllers roll out updated pods, re-run the audit, and confirm previously flagged pods now appear with
Using kubectl
Using kubectl
- Any line printed by the script is a pod that needs manual review.
- Specifically problematic cases:
POD_SEC_PROFILE=NONEandPOD_OLD_ANNOT=NONE: no pod-level seccomp set.POD_SEC_PROFILEpresent but notRuntimeDefault.POD_OLD_ANNOTpresent but notruntime/default.
- For such pods, inspect their manifests and update them to use
spec.securityContext.seccompProfile.type: RuntimeDefault(or ensure all containers do), then rerun the script to confirm they disappear from the output.

