AI security: secure and test LLM apps and agents

Stage 1 · Lesson 2 of 7

Trust boundaries and untrusted input

Security foundations for AI builders

A is a line in a system where data or control passes between parts that deserve different levels of trust: the internet and your server, your server and a third-party , a user and an admin. Anything that crosses a boundary from the less trusted side is untrusted input and must be checked before it is used.

Most security bugs are a missed boundary: data treated as safe because it came from "inside". In AI systems there is an extra rule that this roadmap repeats often: the model sits on a boundary too. Its output can be shaped by anyone who can put text in front of it, so it is untrusted input to the next component. Draw boundaries as dashed lines on your diagram.

Common trapdrawing the model inside the trusted zone because your own company runs it.

A question to check yourself, an AI practice session and 1 cheat sheet entry come with the full roadmap. Unlock

Resources for this stage

Start with· follow one of these

Practise

  • Free labs on injection, XSS, access control and SSRF, the weaknesses AI apps inherit

  • A deliberately vulnerable web app to run locally and practise finding and fixing classic bugs

Keep handy

  • Short, reliable guides on threat modelling, secrets, output encoding and SSRF prevention

  • Scan your repositories for committed keys before you build anything with a model API

Also worth your time

Mark this stage as not done?