How to Threat Model
Four questions, repeated. The craft behind STRIDE and LINDDUN — start by drawing the system.
What are we working on?
Draw a data-flow diagram: the external entities, processes, data stores, data flows, and the trust boundaries between them. You cannot model what you cannot see.
What can go wrong?
Walk each element and crossing. Apply STRIDE for security threats and LINDDUN for privacy threats. Brainstorm abuse cases; build attack trees for the scary ones.
STRIDE & LINDDUNWhat are we going to do about it?
For each threat choose: mitigate, eliminate, transfer, or accept. Prioritize by risk (likelihood × impact) and record who accepted any residual risk.
See examplesDid we do a good enough job?
Validate the model against the real system, check coverage, and iterate. Threat modeling is not one-and-done — revisit it whenever the design changes.
The vocabulary — data-flow diagram elements
Every system reduces to five shapes. Each shape attracts a different set of STRIDE threats.
External Entity
Drawn as: Rectangle
People or systems outside your control (users, 3rd-party APIs).
Process
Drawn as: Circle
Code that acts on data (services, functions, apps).
Data Store
Drawn as: Two parallel lines
Where data rests (DBs, files, caches, queues).
Data Flow
Drawn as: Arrow
Data in motion between elements (HTTP, RPC, messages).
Trust Boundary
Drawn as: Dashed line
Where the trust level changes — most threats live at these crossings.
It is a loop, not a checkbox
Model early (a whiteboard beats nothing), keep the diagram at the right altitude, focus effort on trust boundaries, and revisit on every significant change. Whoever builds the system should help model it.