Nexus Void Research
Threat Modeling, STRIDE, Data Flow Diagram, Trust Boundaries, Secure Design, NIST SSDF, How-to
How to Do STRIDE Threat Modeling (With a Worked Example)
How to do STRIDE threat modeling: draw a data flow diagram, apply Spoofing to Elevation of privilege per element, rank threats and ticket fixes.
To do STRIDE threat modeling, draw a data flow diagram of the system with its trust boundaries, then go through each element and ask which of the six STRIDE threats apply: Spoofing, Tampering, Repudiation, Information disclosure, Denial of service and Elevation of privilege. Write each threat down with a mitigation, rank them by risk, turn the important ones into tickets, and revisit the model whenever the design changes.
Threat modeling is how you find design flaws before they are built, when they are cheapest to fix. STRIDE, created at Microsoft, is the most widely used method because it gives you a simple checklist for "what can go wrong?". The OWASP Threat Modeling Cheat Sheet and the Threat Modeling Manifesto frame the work around four questions; this guide walks through each one with a worked example for a typical SaaS app. NIST's Secure Software Development Framework (SP 800-218) also lists threat modeling as a practice for designing software to meet security requirements.
What does STRIDE stand for?
Each letter is a type of threat, and each violates a security property:
Threat | Violates | Example | Typical mitigation |
|---|---|---|---|
Spoofing | Authentication | Using a stolen session token to act as another user | Strong auth, MFA, short-lived tokens |
Tampering | Integrity | Changing an order total in a request or in the database | Server-side validation, integrity checks, access control |
Repudiation | Non-repudiation | A user denies issuing a refund, and nothing proves otherwise | Audit logs with user, time and action, protected from edits |
Information disclosure | Confidentiality | An API returns other customers' data | Authorization, encryption, minimal responses |
Denial of service | Availability | A flood of expensive search requests takes the API down | Rate limits, quotas, timeouts, autoscaling |
Elevation of privilege | Authorization | A normal user calls an admin endpoint | Server-side role checks, least privilege |
The four questions of threat modeling
What are we working on? Model the system.
What can go wrong? Find threats with STRIDE.
What are we going to do about it? Decide mitigations.
Did we do a good job? Validate and revisit.
Step 1: Draw a data flow diagram
A data flow diagram (DFD) needs only five kinds of element:
Element | Shape | Examples |
|---|---|---|
External entity | Rectangle | User, admin, payment provider, email service |
Process | Circle | Web app, API, background worker |
Data store | Two parallel lines | Postgres database, S3 bucket, Redis cache |
Data flow | Arrow | HTTPS request, queue message, webhook |
Trust boundary | Dashed line | Internet to your network, your app to a third party |
For our example SaaS app: a user (external entity) sends HTTPS requests to the web app (process), which calls the API (process), which reads and writes the database (data store), uploads files to object storage (data store), and calls a payment provider and an email service (external entities) and receives their webhooks (data flows back in). Trust boundaries sit between the internet and the web app, between the API and each third party, and between the API and the database.
Keep it to one page. Draw what exists, not the ideal architecture. An inventory of your routes and third-party services, generated from code, makes this step faster and more accurate.
Step 2: Apply STRIDE to each element
Not every threat applies to every element. A common shortcut, STRIDE-per-element:
Element type | S | T | R | I | D | E |
|---|---|---|---|---|---|---|
External entity | Yes | Yes | ||||
Process | Yes | Yes | Yes | Yes | Yes | Yes |
Data store | Yes | Yes (logs) | Yes | Yes | ||
Data flow | Yes | Yes | Yes |
Focus hardest on data flows that cross a trust boundary. For the example app, some of the threats you would write down:
Element | Threat | STRIDE | Mitigation |
|---|---|---|---|
User to web app | Session token stolen and replayed | S | HttpOnly, Secure cookies; short sessions; MFA for sensitive actions |
API | User changes invoice ID to read another account's invoice | I, E | Object-level authorization on every lookup; see how to prevent IDOR |
API | Normal user calls admin refund endpoint | E | Server-side role check; deny by default |
Payment webhook to API | Attacker forges a "payment succeeded" webhook | S, T | Verify webhook signatures; check amounts against your records |
API to database | SQL injection through search parameter | T, I | Parameterised queries; see how to prevent SQL injection |
Object storage | Uploaded files publicly readable | I | Private bucket; signed, short-lived URLs |
API | Expensive export endpoint called in a loop | D | Rate limits and job quotas |
Admin actions | Admin issues refunds with no trace | R | Immutable audit log of admin actions |
API to email service | Email API key leaked from repository | S, I | Secret manager; secret scanning; see how to store API keys securely |
Step 3: Rank the threats
You will find more threats than you can fix at once. Score each one simply, for example likelihood (low, medium, high) times impact (low, medium, high), and adjust for exposure: anything reachable from the internet without login moves up. Fix the high-likelihood, high-impact threats on internet-facing boundaries first. Avoid elaborate scoring schemes; consistency matters more than precision.
Step 4: Turn mitigations into work
A threat model that lives in a slide deck changes nothing. For each threat you decide to address:
Create a ticket with the threat, the mitigation and an owner.
Add a test where possible, such as a cross-user access test for an IDOR threat.
Record accepted risks with a reason and a review date.
Step 5: Validate and keep it current
Review the model with the team that builds the system; they know where the diagram is wrong.
Check mitigations were built during security code review and testing.
Update the model when you add a new external service, data store, trust boundary or major feature, not on a calendar alone.
Use tools if they help: OWASP Threat Dragon and the Microsoft Threat Modeling Tool both support DFDs and STRIDE, but a whiteboard and a table work too.
STRIDE threat modeling checklist
Step | Done when |
|---|---|
Scope agreed | The system and the change being modelled are clear |
DFD drawn | Entities, processes, stores, flows and trust boundaries on one page |
STRIDE applied | Every element and boundary-crossing flow reviewed |
Threats recorded | Each with STRIDE category and mitigation |
Ranked | Likelihood and impact scored; internet-facing first |
Ticketed | Mitigations owned, scheduled and tested |
Accepted risks logged | Reason and review date recorded |
Revisited | Model updated when the design changes |
How does ARGUS help with threat modeling?
API inventory lists every HTTP route your code defines, with its authentication state and whether it handles personal data, which gives you the processes and entry points for your data flow diagram.
Third-party inventory lists the external services your code calls, such as payments, email, analytics and AI APIs, which are the external entities and trust boundaries you need to model. These are detected services, not a security assessment of them.
Per-project threat model. ARGUS can generate a threat model for a project on demand, as a starting point for your team's review.
Findings mapped to threats. Code findings such as IDOR, injection and leaked secrets show which threats in your model are real today, and Assign to Agent opens fix pull requests for you to review and merge.
Limits: a generated model is a starting point; it does not replace your team's knowledge of the design and business rules. See how ARGUS works, or scan a repository free.
Frequently asked questions
What is STRIDE threat modeling?
STRIDE is a threat modeling method from Microsoft that classifies threats into six types: Spoofing, Tampering, Repudiation, Information disclosure, Denial of service and Elevation of privilege. You apply it to each element of a system's data flow diagram to find what could go wrong and plan mitigations.
How do you do STRIDE threat modeling step by step?
Draw a data flow diagram with external entities, processes, data stores, data flows and trust boundaries. For each element, ask which STRIDE threats apply, record them with mitigations, rank them by likelihood and impact, turn the important ones into tickets and tests, and update the model when the design changes.
What does each letter in STRIDE mean?
Spoofing violates authentication, Tampering violates integrity, Repudiation violates non-repudiation, Information disclosure violates confidentiality, Denial of service violates availability, and Elevation of privilege violates authorization. Each maps to a family of controls, such as MFA for spoofing or audit logs for repudiation.
What is a trust boundary in threat modeling?
A trust boundary is a line in your diagram where the level of trust changes, such as between the internet and your app, between your app and a third-party API, or between a service and its database. Data crossing a trust boundary is where most threats appear, so review those flows most carefully.
When should you do threat modeling?
During design, before building a new system or major feature, and again when you add a new external service, data store, trust boundary or authentication flow. Small teams can do a 30 to 60 minute session per significant change rather than one large annual exercise.
What tools can I use for STRIDE threat modeling?
OWASP Threat Dragon and the Microsoft Threat Modeling Tool both support data flow diagrams and STRIDE threat lists. Many teams use a whiteboard or diagramming tool plus a spreadsheet or ticket tracker. The method matters more than the tool.
What is the difference between STRIDE and other threat modeling methods?
STRIDE classifies threats by type and is easy for developers to learn. Other approaches include attack trees, which explore how an attacker reaches a goal; PASTA, a risk-centric process; and LINDDUN, which focuses on privacy threats. Many teams use STRIDE for design reviews and add others where needed.
Who should be involved in threat modeling?
The engineers who build and run the system, a product owner who knows the business rules, and someone with security experience to guide the session. The people closest to the design spot where the diagram is wrong; the security perspective keeps the threat list complete.
DATA SOURCES
OWASP Threat Modeling Cheat Sheet: https://cheatsheetseries.owasp.org/cheatsheets/Threat_Modeling_Cheat_Sheet.html ; Threat Modeling Manifesto: https://www.threatmodelingmanifesto.org/ ; NIST SP 800-218