Threat modelling is the cheapest security activity there is. An hour with a whiteboard during design can prevent a flaw that would cost weeks to fix after release, or a breach that costs far more. It doesn't require specialist tools or a security degree, just a structured way of thinking about what could go wrong.
The best threat models are small, frequent and owned by the team building the system, with security specialists as coaches rather than gatekeepers.
Four questions
Most threat-modelling methods boil down to four questions, popularised by Adam Shostack.
- What are we working on?
- Sketch the system: components, data flows and trust boundaries.
- What can go wrong?
- Use a structure like STRIDE to find threats systematically.
- What are we going to do about it?
- Mitigate, accept, transfer or avoid each threat.
- Did we do a good job?
- Review the model as the design changes, and after incidents.
STRIDE
STRIDE is a checklist of six threat types. Walk each data flow and trust boundary through it.
- Spoofing
- Pretending to be someone or something else. Countered by authentication.
- Tampering
- Modifying data or code. Countered by integrity checks and access control.
- Repudiation
- Denying an action took place. Countered by logging and audit trails.
- Information disclosure
- Exposing data to the wrong people. Countered by encryption and authorisation.
- Denial of service
- Making the system unavailable. Countered by rate limits, scaling and resilience.
- Elevation of privilege
- Gaining more access than allowed. Countered by least privilege and input validation.
Prioritising what you find
Not every threat needs a fix. Rate each one by likelihood and impact, consider existing controls, and focus on the few that matter most. Record accepted risks with an owner and a review date so they don't quietly become permanent.
Threat modelling for AI features
AI features bring new threats: prompt injection through user input or retrieved documents, data leakage through model responses, agents taking unintended actions, and over-reliance on unverified output. Add these to your checklist for any feature that uses a model or an agent.
AI can also help with threat modelling itself, by drafting a first list of threats from a design document. Treat that as a starting point for the team's discussion, not the answer.
Making it a habit
Threat modelling sticks when it is quick and expected. Keep a standard template, timebox sessions to under an hour, and hold them whenever a design introduces a new data flow, a new external integration, or a new kind of user.
Security champions are ideal facilitators. They know the system, can run the session without waiting for a specialist, and can escalate the genuinely difficult questions.
How to put it into practice
- Add a short threat-model section to your design or spec template.
- For each new service or major change, sketch the data flows and trust boundaries in 15 minutes.
- Walk each boundary through STRIDE as a team.
- Record the top threats, their mitigations and owners in the spec.
- Turn key mitigations into tests or policy checks where possible.
- Revisit the model when the design changes significantly or after an incident.
Common mistakes
- Treating threat modelling as a one-off document for a review board.
- Making models so detailed that nobody keeps them up to date.
- Leaving it to the security team alone.
- Ignoring new threat types introduced by AI features.
How to measure progress
- Share of new services and major changes with a threat model.
- Design-level vulnerabilities found later in testing or production.
- Time from design to completed threat model.
- Accepted risks reviewed on schedule.