Skip to main content

2 posts tagged with "code-execution"

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.

intermediatePart 9

Sandbox the code your agent writes, and prove every limit actually applied

· 11 min read
Rafael Fernandes
NLP Engineer & Tech Writer at WiLine
Share:
+

Every agent tutorial in this series so far has given a model tools — functions you wrote, with arguments you defined. This post is about the other thing agents do, which is write code and then run it.

That is a different risk, and the difference is worth being precise about. A tool call is the model choosing from a menu you control. Executing generated code is the model handing you something nobody has ever read, which you then run on your machine.