100% Free Forever
AI-Powered Learning
Industry Expert Content
Certificates & Badges
Learn At Your Own Pace
AI Guardrails & Safety Engineering
30 minadvanced

Threat Modelling an LLM Application

Teams building their first LLM application typically discover its security gaps in production, one incident report at a time: a user found a way to make the support bot discuss a competitor's pricing, another user got the internal wiki assistant to summarize a document it should never have retrieved, a third managed to get a coding agent to run a shell command nobody reviewed. Each incident gets patched individually, and the team ends up with a pile of point fixes that were never derived from a coherent picture of what could go wrong in the first place. That reactive posture is expensive, because the fix for incident three often would have prevented incident seven if anyone had looked for the pattern before it happened.

Threat modelling is the discipline of building that coherent picture before shipping: naming the assets worth protecting, the actors who might attack them, the trust boundaries those actors have to cross, and the specific ways an LLM's behavior makes those boundaries easier or harder to cross than in a traditional application. It borrows structure from decades of application security practice — STRIDE, attack trees, abuse cases — but an LLM application has attack surface those frameworks were not written with in mind: a natural-language interface that follows instructions from anywhere they arrive, and tool access that turns a persuasive sentence into a real-world action.

A team that threat-models before building knows in advance which of their planned features need a guardrail before launch and which are lower-risk enough to ship without one — the alternative is discovering that distinction from whichever failure mode a user or an attacker finds first.

Analogy🏏Cricket
🏏 Think of it like cricket: Before a Test series in Australia, the Indian team's analysts do not wait for Mitchell Starc to actually dismiss three batsmen before studying how he bowls. They build a dossier in advance: his stock delivery is the inswinging yorker at the death, his weak match-up is against a batsman who can work the ball to leg early, the Gabba pitch offers him more bounce than the SCG. That dossier names the specific threats — not 'fast bowling in general' but Starc's particular deliveries, Cummins' short-ball plan, the exact conditions where each threat is sharpest — before a single ball is bowled in anger. A team that walked out without that dossier would learn the same lessons the hard way, one dismissal per lesson, across a five-Test series they cannot afford to lose twice. Just as the analysts name specific bowlers, specific deliveries, and specific pitch conditions rather than a vague 'the bowling is fast,' a threat model names specific actors, specific attack techniques, and specific trust boundaries rather than a vague 'the model might say something bad.' Just as the dossier changes what each batsman actually practices in the nets before the tour, a threat model changes which guardrail gets built before launch rather than after an incident. The insight is that preparing against named, specific threats produces a defense; preparing against a vague sense of danger produces nothing testable.
Lesson 2 of 35
0% complete