Skip to main content

One post tagged with "apparmor"

View all tags
intermediatePart 11

Trace your agent's syscalls with eBPF, then deny the rest

· 13 min read
Rafael Fernandes
NLP Engineer & Tech Writer at WiLine
Share:
Inspektor Gadget++

Part 9 put the code your agent writes inside a box: no network, capped memory and processes, a read-only disk, and --cap-drop=ALL. Every one of those limits held. But it left one door open, the same one almost every sandbox guide leaves open, because closing it takes work: seccomp was left at its default, and the moment you need to run the container with --security-opt seccomp=unconfined — which plenty of runtimes and GPU stacks ask for — the entire system-call surface of the kernel is back.

This post closes that door. We record the system calls the agent actually makes, using eBPF, and turn that recording into a profile that allows exactly those and returns an error for everything else. Then we do the same idea one layer up with AppArmor, to control which programs the agent can execute at all.