AI security: secure and test LLM apps and agents

Stage 1 · Lesson 3 of 7

Least privilege and who is asking

Security foundations for AI builders

answers "who are you?" and authorisation answers "what may you do?". means every person, service and process gets only the access its job needs, for only as long as it needs it. In AI systems this matters twice over.

A model that calls tools acts with whatever credentials those tools hold, so a tool running with an admin key turns any manipulated conversation into an admin action. The habit to build now: every action is checked in code against the real signed-in user, and every service account has a narrow, named purpose. Separate read from write, and per-user data from shared data.

Common trapone powerful service account shared by every feature because it was quicker to set up, which makes every bug as bad as the worst one.

A question to check yourself, an AI practice session and 2 cheat sheet entries 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?