An OCI hook that traces container syscalls using eBPF to generate tailored seccomp security profiles.
oci-seccomp-bpf-hook is an OCI-compliant hook that traces system calls made by containers using eBPF technology to automatically generate seccomp security profiles. It solves the problem of manually crafting seccomp profiles by observing actual container behavior and creating a profile that permits only the syscalls used, thereby enhancing security. This tool is particularly useful for hardening container deployments against unauthorized syscall exploitation.
Container administrators, DevOps engineers, and security professionals working with Linux containers who need to implement or automate seccomp-based security policies. It is especially relevant for users of Podman or other OCI-compliant runtimes.
Developers choose this tool because it automates the creation of tailored seccomp profiles, reducing manual configuration and improving security by ensuring containers only have necessary syscall permissions. Its integration as an OCI hook makes it runtime-agnostic and easy to deploy within existing container workflows.
OCI hook to trace syscalls and generate a seccomp profile
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses eBPF to attach to the raw_syscalls:sys_enter tracepoint, monitoring all syscalls and filtering by the container's PID namespace, as described in the README.
Generates seccomp profiles that permit only observed syscalls, effectively restricting container capabilities and minimizing attack surface.
Implements as a prestart OCI hook, integrating seamlessly with container runtimes like Podman, making it runtime-agnostic.
Supports an optional input file to merge with traced syscalls, maintaining existing denials and allowing incremental profile updates.
Requires CAP_SYS_ADMIN to run, which can be a security risk and may not be feasible in locked-down environments.
Compiles C code dynamically during execution, adding complexity and potential performance delays, as noted in the README limitations.
Cannot be used with podman run --rm, limiting its utility in workflows that rely on automatic container removal.