What do seccomp and AppArmor add on top of capabilities?
IntermediateConceptKubernetes Security
Answer
Seccomp filters which syscalls a process may make. The RuntimeDefault profile blocks dozens of rarely needed and historically exploitable syscalls (keyctl, unshare in many cases, kexec_load, module loading). AppArmor (or SELinux) is mandatory access control on files, mounts and network by path or label.
securityContext:
seccompProfile: { type: RuntimeDefault }
appArmorProfile: { type: RuntimeDefault }
The appArmorProfile field went GA in 1.30, replacing the old annotation. Several container escape CVEs were blocked by the default seccomp profile alone, which is why restricted PSS requires it.
More on Kubernetes Security
What are the 4Cs of cloud native security?BeginnerWhat happens to a request between `kubectl apply` and etcd from a security point of view?IntermediateExplain Role, ClusterRole, RoleBinding and ClusterRoleBinding.BeginnerHow do you check what a user or service account is allowed to do?BeginnerWhich RBAC permissions are effectively cluster-admin in disguise?AdvancedHow do service account tokens work now, and what is `automountServiceAccountToken`?Intermediate