Seccomp Profiles
What you'll learn: How to use seccomp profiles to restrict which system calls your containers can make, dramatically reducing the attack surface exposed to the Linux kernel.
What is Seccomp?
Seccomp (Secure Computing Mode) is a Linux kernel feature that filters system calls—the fundamental way programs interact with the operating system. When a container runs, every action it takes (reading files, networking, process management) requires system calls. By default, containers can make hundreds of different system calls, but most applications only need a small subset.
Think of it like giving someone access to your toolbox. Without seccomp, you're handing over every tool you own—even the dangerous power tools they don't need. With seccomp, you only provide the exact screwdrivers and wrenches required for their specific job.
How Seccomp Works in Kubernetes
Kubernetes lets you apply seccomp profiles to containers through the securityContext. You can use three types:
- Unconfined: No restrictions (default for some clusters)
- RuntimeDefault: The container runtime's default profile (blocks ~44 risky syscalls)
- Localhost: A custom profile you've created
The RuntimeDefault profile is a sensible starting point—it blocks dangerous operations like loading kernel modules or accessing raw system resources while allowing normal application behavior.
Custom profiles let you create allowlists or denylists of specific system calls, giving you fine-grained control when you need maximum security or have well-understood application requirements.
Why This Matters
If an attacker exploits a vulnerability in your containerized application, seccomp limits what damage they can do. Even with code execution, they cannot invoke blocked system calls—preventing many privilege escalation and container escape techniques.
Key Takeaway: Seccomp profiles act as a firewall between your containers and the kernel, blocking unnecessary system calls to minimize the damage an attacker can inflict even if they compromise your application.