Before an architect lays a foundation, they draw the stress points. Before a security engineer writes a control, they threat model the design. This is what that looks like for AI systems.
"If this component becomes malicious tomorrow — what is the worst thing it could do? That's all. And we simply apply that to AI." — Harsh, Staff Engineer · Cloudflare · GenAcademy Guest Session
Source: This page applies publicly documented framework to an original example. Learning context: GenAcademy guest lecture by Harsh (Cloudflare). The MediBot healthcare example is applied independently to illustrate the same process. STRIDE (Microsoft, 1999), OWASP LLM Top 10, MITRE ATLAS, and ISO 42001 are cited industry standards. Views expressed are the author's own and do not represent any employer.
Looking for SQL injection, XSS, broken auth — vulnerabilities in the code itself. The application is a fixed, predictable system.
The application now has a reasoning layer. An attacker doesn't need to break the code — they need to corrupt the context, the prompt, the memory.
Every product — AI or not, five-person startup or 5,000-person enterprise — gets reviewed through these three lenses. Teams that over-invest in one and ignore the other two are exposed. Select a lens to explore.
Traditional AppSec asks whether an attacker can exploit the code. In AI systems the question shifts to whether they can influence its reasoning. Both coexist — adding an LLM does not remove injection, broken auth, or secret mismanagement.
An AI application is not just code — configuration is code. One wrong temperature setting, one over-permissive tool definition, one forgotten API key: each changes system behavior entirely and silently. Misconfiguration remains in the OWASP Top 10 for a reason.
Compliance is not security. Compliance forces organizations to consistently perform security — it creates documented ownership, periodic review cycles, and audit evidence that prevent quiet drift. Without it, even good engineers forget.
STRIDE (Microsoft, 1999) gives security engineers a structured vocabulary for systematically enumerating threats. Flip each card to see the AI-specific version. Click again to flip back.
The session used a travel booking agent for threat modeling. Here we apply the exact same STRIDE + trust boundary process to a healthcare AI — higher stakes, crisper examples. Click a numbered boundary arrow (B1–B5) to see its STRIDE analysis.
Before mapping boundaries, rank what you're protecting by attacker priority. These are MediBot's assets:
A threat model is invalidated the moment the system it describes materially changes. These are the triggers that mandate a fresh review — full or partial depending on impact radius.
Adding an MCP server, connecting a new external API, or wiring a new data source — each adds an identity, a trust boundary, and a blast radius. Re-model the affected subgraph.
Switching from one LLM to another changes the reasoning layer — prompt injection susceptibility, output behaviors, and system prompt interpretation can all shift. The threat model must follow.
Moving from GCP to Azure, switching from one database to another, or changing cloud regions — these are architectural changes that alter every assumption about where data lives and who can access it.
Remember: configuration is code. Changing a system prompt, adding a tool, or modifying a tool's permitted actions changes what the agent can do — and what it can be tricked into doing.
If the agent gains access to a new type of data, loses access to something, or the sensitivity of an asset changes (e.g., system ingests PII for the first time), the asset inventory and its priority ranking must be revisited.
New compliance requirements (EU AI Act risk reclassification, HIPAA amendment, new ISO 42001 control) can change what controls are required — which flows back into the threat model's control coverage.
Your Cloudflare is running. Snyk scans nightly. You passed your pen test. None of it saw the AI agent publish a compromised post at 3 am.
OWASP LLM Top 10, the Lethal Triad, PromptFoo, NeMo Guardrails, Presidio — the attacker's full playbook for agentic systems.
STRIDE, trust boundaries, and the 4-step threat modeling process applied to a healthcare AI — before a single line of code is written.