Key takeaways
- Threat modeling is a structured conversation about what could go wrong with a system's security, and what to do about it.
- It is most valuable during design and whenever the architecture changes materially.
- A good model shows components, data flows and trust boundaries; most threats appear where data crosses a boundary.
- Findings only help if they are specific, prioritized, owned and revisited.
What threat modeling is
Threat modeling is a structured way of analyzing a system's design to identify potential security threats and decide how to address them. It is usually done before or while a system is built, but it applies just as well to existing systems that are about to change.
A widely used framing, the Four Question Framework, summarizes the practice as four questions:
- What are we working on? Describe the system: its components, data and connections.
- What can go wrong? Identify threats against that system.
- What are we going to do about it? Decide how to respond to each threat.
- Did we do a good enough job? Check the analysis and the response.
Everything else in this guide, including the methods, diagrams and documents, is a way of answering those four questions well. The exact process will differ with the system, the organization's context and the methodology chosen.
Why it matters
Many serious security problems are design problems: a service that trusts input it should not, sensitive data flowing somewhere it does not need to go, or an administrative path with no authentication. These are hard to find with testing alone, because the code may do exactly what it was designed to do.
Threat modeling surfaces these issues while they are still decisions rather than code. It also gives security and engineering teams a shared, written understanding of the system's security assumptions, which is valuable long after the session ends.
When to do it
- During the initial design of a new application, service or platform.
- Before a significant architectural change, such as a migration, a new deployment model or a redesign.
- When adding a new external dependency, integration or identity provider.
- When a system starts handling more sensitive data, or data subject to new obligations.
- Ahead of an architecture review board or security sign-off.
- After an incident or a change in assumptions about who uses the system and how.
The six steps of an engagement
1. Define the scope
Agree what system, or which part of it, is in scope, and what is not. State the security objectives that matter most, such as protecting customer data or keeping a payment flow available. A narrow, well-defined scope produces better results than an attempt to model everything at once.
2. Model the system
Create or gather a representation of the system that shows its components, the data flowing between them and its trust boundaries. Data flow diagrams are the most common format; see the next section.
3. Identify threats
Apply a method systematically to each element and flow. STRIDE is the most common starting point; alternatives include PASTA (a risk-centric, staged process), attack trees, kill-chain analysis, privacy-focused methods such as LINDDUN, and AI-specific frameworks for machine learning systems.
4. Assess and prioritize
Estimate how severe and how likely each threat is in this specific system, taking existing controls into account. Standard scales such as CVSS describe technical severity; combine them with likelihood and business impact to set priorities.
5. Decide on a response
For each threat, decide whether to mitigate it with a control, eliminate it by changing the design, transfer it (for example, to a provider), or formally accept it. Record who owns each decision.
6. Document and validate
Write down the model, the findings, the decisions and the assumptions. Validate mitigations through review or testing, and set a trigger for revisiting the model.
Identifying components and trust boundaries
A data flow diagram (DFD) uses a small set of elements:
- External entities: people or systems outside your control, such as users or third-party services.
- Processes: code that acts on data, such as a web application or a service.
- Data stores: places where data rests, such as databases, queues and file stores.
- Data flows: data moving between elements.
- Trust boundaries: lines where the level of trust changes, such as between the internet and your network, or between your system and a provider.
To build the model, start from the artifacts you already have, such as architecture diagrams, API definitions and infrastructure-as-code, and confirm them with the people who build and run the system. Then mark every place where data crosses a trust boundary. Those crossings are where authentication, input validation, encryption and authorization decisions matter most, and where many threats concentrate.
Reasoning about threats
STRIDE gives a checklist of six threat categories, each the opposite of a security property:
| Threat | Property violated | Example question |
|---|---|---|
| Spoofing | Authentication | Can someone pretend to be a user or a service? |
| Tampering | Integrity | Can data be changed in transit or at rest? |
| Repudiation | Non-repudiation | Could someone deny an action because it is not logged? |
| Information disclosure | Confidentiality | Can data reach someone who should not see it? |
| Denial of service | Availability | Can the system be overwhelmed or made unavailable? |
| Elevation of privilege | Authorization | Can someone do more than they are allowed to? |
Walk through each element and flow and ask which categories apply. In the diagram above, the HTTPS flow from the customer raises spoofing and tampering questions; the orders database raises tampering and information disclosure; the payment request raises disclosure and spoofing of the provider. For each, describe a concrete scenario: who the attacker is, what they do and what they gain. Concrete scenarios are far easier to assess and fix than abstract categories.
Prioritizing and documenting findings
A useful finding answers these questions:
- Where: the element or flow affected.
- What: the threat, as a concrete scenario.
- How bad: severity and likelihood, with the reasoning.
- Existing controls: what already reduces the risk.
- Recommendation: a specific mitigation or design change.
- Decision and owner: mitigate, eliminate, transfer or accept, and who is responsible.
- Status: open, in progress, done or accepted, with a date.
Record the assumptions behind the model as well, such as "the identity provider validates MFA". Unstated assumptions are a common source of missed threats when the system changes later.
Common mistakes and how to avoid them
Scope that is too broad or unclear
Trying to model an entire enterprise in one session produces shallow results. Pick a system or a change, write the scope down, and model other parts separately.
An out-of-date picture of the system
A model built from an old diagram describes a system that no longer exists. Start from current artifacts and confirm them with the team that runs the system.
Overlooked trust boundaries
Internal networks, service-to-service calls and third-party integrations are often treated as trusted by default. Mark every boundary explicitly, including internal ones.
Unexamined assumptions
"The gateway handles authentication" may be true for one path and false for another. Write assumptions down and check them.
Vague findings
"Improve input validation" cannot be implemented or verified. Name the element, the scenario and the specific control.
No owner, no follow-through
Findings that live only in a document rarely get fixed. Put them where engineering work is tracked, with an owner.
A one-off exercise
A threat model goes stale as the system changes. Agree the triggers for revisiting it.
Treating tool output as the answer
Automated suggestions are a starting point. People who understand the system must review, adjust and decide.
Where a threat modeling tool fits
Threat modeling can be done on a whiteboard. Tools become useful when an organization wants to do it consistently, across many systems and teams, and keep models current. Typically a tool helps by building the model from existing artifacts, applying a method consistently, enriching findings with standard identifiers, and connecting findings to the places where work is tracked. The four questions and the judgment behind them remain the team's responsibility.
- Model: imports API definitions, infrastructure-as-code, Visio and draw.io diagrams, architecture images, GitHub repositories, or a plain-language description.
- Identify: dedicated analyzers for STRIDE, PASTA, VAST, SAIF and MAESTRO generate a draft threat model.
- Prioritize: CVSS scores, CWE and MITRE ATT&CK mapping, attack paths and heat maps.
- Respond and track: mitigation guidance, work-item export to Jira, GitHub Issues or Azure DevOps, and remediation tracking.
Your reviewers stay responsible for scope, decisions and validation. See Astrix features and capabilities.
If you are comparing tools, the buyer's checklist lists questions worth asking of any vendor.
Summary
Threat modeling answers four questions about a system: what it is, what can go wrong, what to do about it, and whether the analysis was good enough. Scope narrowly, model the system with its data flows and trust boundaries, apply a method systematically, write specific findings with owners, and revisit the model when the design changes. Start with one system and one session; the preparation checklist will help.