Quick reference
A workshop that ends with owners, dates and a list of accepted risks.
- Scope one service — One service, its data, its entry points, and the people who can say yes.
- Draw the boundary — A one-page flow diagram where every crossing is named and questioned.
- Ask STRIDE — Element by element, the letters that apply, written as actor, action, asset.
- Act with a name — A decision, an owner and a date per threat; accepted risks carry a name.
In one line: One hour, one page, five actions. The model is the actions it produced, not the diagram.
Start this week:
- Book the hour with the service owner, not a delegate.
- Draw the flow before the meeting and correct it live.
- Re-run it when the data flow changes, not once a year.
Explained
Scope one service. Not the platform, not the estate: the service that handles money or identity, its data, its entry points, and the people who can approve a change.
Draw the flow. Four symbols are enough - external entity, process, data store, flow - plus the trust boundaries where the network or the owner changes. Every crossing is where input stops being trusted.
Ask STRIDE element by element. Spoofing, tampering, repudiation, information disclosure, denial of service, elevation of privilege. Write each threat as actor, action, asset, and name the missing control rather than a CVE.
Rank with two numbers, likelihood and impact, then sort. Close with a decision per row: mitigate, transfer, avoid or accept, with a person and a date.
Checklist
Run it at the start and again at the end. A line that cannot be answered in the room is the next hour's work.
Scope
- One service, its data and its entry points are named.
- Out of scope is written down, not implied by silence.
- People who can approve a change are in the room.
Model
- The data flow diagram fits on one page.
- Every trust boundary is drawn and labelled.
- Each element was asked the STRIDE letters that apply.
Act
- Every threat has a decision, an owner and a date.
- Every accepted risk names the person who accepted it.
- Tickets exist, and the review is in the calendar.
Repeat
- Re-run when a data store or an entry point is added.
- Re-run after an architecture change, not on a calendar.
- Keep the last model next to the code, not in a wiki.
The field guide
The full guide of the PDF (P973), page by page.
Scope: one service, one hour (before you start)
A model that covers the whole estate is a wish. Pick one service that handles money or identity, and put people in the room who can approve a change without asking anyone.
- Name the service and the data it holds.
- List the entry points: users, partners, admins, jobs.
- Write down what is out of scope, in the same document.
- Invite the engineer who owns the code, not a delegate.
| Input | Example |
|---|---|
| Service | checkout-api and its database |
| Data | card token, order id, user id |
| Entry points | public API, admin API, queue |
| Out of scope | the payment provider's internals |
The four questions, on the wall
1 What are we building?
2 What can go wrong?
3 What are we going to do about it?
4 Did we do a good job?One page or nothing If the diagram does not fit on one page, you modelled too much. A second service gets a second hour, not a bigger diagram.
One service, one hour, one page: anything larger is a programme, not a workshop.
Draw the flow, then mark the boundaries (the model)
The data flow diagram is the model. Four symbols are enough: external entity, process, data store and flow. Trust boundaries are the lines that decide where the questions get asked.
- Draw the actor, outside your control.
- Draw each process that touches the data.
- Draw every data store, including caches and buckets.
- Label each arrow with the data it carries.
- Draw a boundary wherever the network or the owner changes.
| Boundary | What changes there |
|---|---|
| Browser to edge | Input is untrusted, you control nothing |
| Edge to service | TLS ends and identity is asserted |
| Service to database | Credentials and network policy |
| CI to production | Who deploys, with which token |
Pytm: the diagram as code
from pytm import TM, Actor, Server, Dataflow
tm = TM("checkout")
user = Actor("Customer")
api = Server("checkout-api")
Dataflow(user, api, "POST /pay")
tm.process()
# python3 tm.py --dfd | dot -Tpng -o dfd.pngEvery flow that crosses a boundary is a place where input stops being trusted. If you cannot say what checks it, that is finding one.
STRIDE, one element at a time (the questions)
Walk the diagram element by element and ask the letters that fit. The table is the shortcut: not every letter applies to every kind of element.
| Element | Letters that apply |
|---|---|
| External entity | Spoofing, Repudiation |
| Process | All six |
| Data store | Tampering, Repudiation, Disclosure, DoS |
| Data flow | Tampering, Disclosure, DoS |
The six letters are Spoofing, Tampering, Repudiation, Information disclosure, Denial of service and Elevation of privilege. Say each threat as a sentence: who acts, on which element, and what they get.
- Write the threat as actor, action, asset.
- Name the missing control, not a CVE number.
- One threat per row; do not merge two.
- Skip a letter only when you can say why.
Repudiation is the one people skip It asks whether the action can be denied later. If the audit log is writable by the actor who took the action, the answer is yes.
Six letters, one element at a time, and the diagram turns into a list you can rank.
Rank with two numbers, not adjectives (ranking)
An unranked list of threats produces no actions. Two numbers, agreed out loud in the room, are enough to sort it and to defend the order afterwards.
| Score | What it means |
|---|---|
| 1 low | Insider only; a nuisance, logged and caught |
| 2 medium | A known technique; a day of work and a disclosure |
| 3 high | Scripted and already seen; data loss or a notice |
Multiply the two and sort descending. Break ties on whether the control is missing or merely misconfigured: a missing control is a project, a misconfigured one is a ticket for this sprint.
One row per threat
threat: card data read by a support role
stride: information disclosure
likely: 3 impact: 3
control: row-level access, not a UI filter
decision: mitigate owner: payments due: 2026-11-14Accept is a decision, not a gap If you accept the risk, record who accepted it and when it is reviewed. An accepted risk with no name is an unowned one.
Two numbers and a sort order turn a brainstorm into a queue with a top.
Close with actions, not a document (the output)
The hour produces a table where every row has a decision, an owner and a date. Anything else is a document that nobody opens twice.
- Read the sorted list out loud, top to bottom.
- For each threat choose mitigate, transfer, avoid or accept.
- Name one owner per action: a person, not a team.
- Set a date inside the next sprint or the next quarter.
- Book the review before anyone leaves the room.
| Output | The test it passes |
|---|---|
| Actions | Every row has an owner and a date |
| Accepted risks | Every one has a named accepter |
| Tickets | In the tracker, not in the document |
| Review date | In the calendar, with the same people |
Two weeks later Someone can point at a ticket and say the threat model caused it. If nobody can, the hour produced a workshop about a diagram.
One service, one page, five actions with names on them: that is a threat model.
The honest caveat: an hour finds the threats the room already knows. The ones nobody thought of need the same hour again, with a different room.
The lesson: the model is the actions it produced, not the diagram.
Your turn: What would your last threat model have said if you had only had an hour?
Related on this site
More notes: Security engineering
Open in the notes app: search, filters, copy This note on GitHub