Interview Prep/DevSecOps/Kubernetes Security

How do you enforce seccomp and AppArmor profiles across workloads?

AdvancedScenarioKubernetes Security
Answer

Situation read → Containers run unconfined by default on many setups. RuntimeDefault seccomp blocks a large set of dangerous syscalls with little breakage.

What I'd do →

  1. Set seccompProfile: { type: RuntimeDefault } in pod securityContext; PSA restricted requires it.
  2. Enable kubelet --seccomp-default so pods without a profile still get RuntimeDefault.
  3. For high-risk apps, generate custom profiles with Security Profiles Operator recording mode.
  4. AppArmor: use the appArmorProfile field (GA in 1.30) with RuntimeDefault or a custom loaded profile.

Why → Syscall filtering cuts the kernel attack surface that container escapes depend on.

Interview tip → Mention the seccomp-default kubelet flag; few candidates know it.

All DevSecOps questions Roadmap: Supply chain, secrets & identity

More on Kubernetes Security