Path 2 of 6Practitioner6 lessons · 54 minReviewed 2026-11-10
Securing LLM applications
Prompt injection and the architectures that contain it, safe handling of model output, permission-aware RAG, keeping secrets out of context, what guardrails can and cannot do, and security regression tests in CI.
For: AppSec engineers, developers and reviewers shipping chat, RAG or summarisation features
- 01 Prompt injection: direct, indirect, and the designs that contain it
Tell direct from indirect prompt injection, know which defences are probabilistic, and choose an architecture pattern that keeps injected text from triggering consequential actions.
10 min · 4 questions
- 02 Model output is untrusted input: handling it safely
Find every place model output is rendered, executed or forwarded, and apply the same controls you would to user input: encoding, parameterisation, allowlists and sandboxing.
9 min · 4 questions
- 03 RAG and vector stores: access control, poisoning and leakage
Enforce document permissions at retrieval time, treat the corpus as an attack surface for poisoning, and protect embeddings as carefully as the text they came from.
9 min · 4 questions
- 04 Sensitive data and system prompt leakage
Assume anything in the context can come back out, keep secrets and authorisation logic out of prompts, and minimise what data reaches the model in the first place.
8 min · 4 questions
- 05 Guardrails and their limits
Know what input and output guardrails actually detect, why adaptive attackers get past them, and how to run them as a monitored layer rather than a security boundary.
9 min · 4 questions
- 06 Testing LLM applications in CI
Write security regression tests that run on every prompt, model, corpus or tool change, assert invariants rather than exact wording, and know what a passing suite does not prove.
9 min · 4 questions
Lessons cite primary sources and were last checked on the date shown in each lesson. Corrections are welcome by email (footer). Other paths: Fundamentals · Agents & MCP · AI coding assistants · Red teaming · Detect & respond