Skip to main content

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

Medium

Address

Security

Compliance Standards

  • CIS GKE

Triage and Remediation

Remediation

Manual Steps

  1. List pods missing RuntimeDefault seccomp
    • Run on: any machine with kubectl access
  2. 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.
  3. Decide the policy per workload
    • For each pod type (usually via its controller: Deployment, DaemonSet, StatefulSet, Job, CronJob):
      • Preferred: enforce RuntimeDefault at pod level.
      • If incompatible: document the justification, consider designing and referencing a specific seccomp profile instead of leaving it unset or fully unconfined.
  4. Update controller manifests to set RuntimeDefault
    • Identify the owning controller:
    • Edit the controller spec to add a pod-level securityContext with seccompProfile set to RuntimeDefault (or update existing):
    • In the spec.template.spec section, 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/pod where present once seccompProfile is set.
  5. 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 same securityContext.seccompProfile.type: RuntimeDefault structure, then redeploy through your standard pipeline to avoid drift.
  6. 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):
What indicates a problem
  • Any line printed by the script is a pod that needs manual review.
  • Specifically problematic cases:
    • POD_SEC_PROFILE=NONE and POD_OLD_ANNOT=NONE: no pod-level seccomp set.
    • POD_SEC_PROFILE present but not RuntimeDefault.
    • POD_OLD_ANNOT present but not runtime/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.