Watch · Appendix A

Agents as Pentesters

2:37 · Part —: Appendices

Made by AI agents — script drafted from the book, AI narration, animation written as code — and steered by the author, Rasmus Bornhøft Schlünsen.

Transcript

What the film says

What if your pipeline could hack itself before attackers do? Penetration testing has always been slow and manual. A consultant spends weeks probing and writing a report, once a year if you're typical. Meanwhile the code changes every day, and your security drifts silently.

Autonomous pentesting splits the work into phases. First, agents scan the target and read the source code. Then they map every endpoint and login flow. Then five specialists work in parallel: injection, cross site scripting, authentication, authorization, and server side request forgery.

Next, five more agents try to prove each finding by actually exploiting it. That's the difference between a scanner and a pentester. A scanner says, this might be vulnerable. A pentester shows you. Finally, a reporting agent writes it up, with severity scores and fixes. And a durable workflow resumes any phase that crashes.

Run it continuously, and it becomes transformative. A sentinel watches the repository every few hours and routes by what changed. A query file goes to the injection agent. A template goes to cross site scripting. A Dockerfile triggers a full scan. Nothing changed? It skips. Zero cost, zero noise.

But this agent is hostile by design, so the guardrails now protect the world from your agent. Never run it against production. Get written authorization from whoever controls each system. Verify every finding by hand. And sandbox the agents, so they reach the target and nothing else. Start restrictive, and stay restrictive.

When an exploit fails, the agent records what it tried and what came back, say, a firewall blocking the request, and tries a different approach next time. It doesn't learn in the machine learning sense, but each scan gets sharper. Duplicate findings are merged by endpoint, weakness type and root cause, so fifty reports become ten real issues.

Not every agent needs the same model. The most capable one crafts the exploits, while cheaper ones analyze and write reports. And a dashboard keeps a human in the loop. Agents can hallucinate findings, or miss real ones, so every finding is really a question: is this real?

It's every principle in this book, pushed to its limit. If you can build a system that safely lets agents attack your own software, everything else is easier. Next up, in the second appendix: the state of the tools.