AI security: secure and test LLM apps and agents

Stage 1 · Lesson 1 of 7

Threat modelling in four questions

Security foundations for AI builders

is a structured way to find what could go wrong in a system before an attacker does. The Threat Modeling Manifesto boils it down to four questions. What are we working on?

What can go wrong? What are we going to do about it? Did we do a good job?

You answer the first with a simple diagram of users, components, data stores and the arrows between them. For the second, prompts such as (spoofing, tampering, repudiation, information disclosure, denial of service, elevation of privilege) help you think widely.

Each threat then gets a fix and an owner. Every later stage of this roadmap adds AI-specific boxes to the same diagram.

Common traptreating threat modelling as a long document written once, when a one-page diagram you update with every new feature is far more useful.

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?