Threat Modelling Foundations, 10 min read

Ready reckoner

Definition and the four questions

Threat modelling = analysing a representation of a system to find security and privacy concerns, and deciding what to do about them, before they become incidents.

# Question Typical output
1 What are we working on? DFD, assets, entry points, assumptions, scope
2 What can go wrong? Threat list (STRIDE, libraries, attack trees)
3 What are we going to do about it? Mitigate / eliminate / transfer / accept, owners, tickets
4 Did we do a good enough job? Tests, pen test focus, review, retrospective

Vocabulary

Term Means Kestrel example
Asset Something of value Merchant settlements
Threat actor Who/what causes harm Fraudster, insider, bot
Threat What could go wrong Redirect another merchant's payout
Vulnerability Weakness that enables it No ownership check (IDOR)
Risk Likelihood × impact Likely; ₹ crore + regulator report
Control Reduces risk Server-side ownership check, step-up OTP

Grammar: threats = attacker's view ("an attacker can…"); vulnerabilities = system ("the API does not…"); controls = action ("the API will…").

Why design time

  • Design flaws (missing authZ, wrong trust assumption, unneeded feature) cannot be patched in one line.
  • Scanners cannot see business rules → broken access control stays #1 in the OWASP Top 10.
  • Threat models tell pen testers where to look; pen-test misses feed back into the model.

Manifesto (2020)

Values: culture > checkbox · people > tools · journey > snapshot · doing > talking · continuous refinement > single delivery. Anti-patterns: hero threat modeller, admiration for the problem, perfect representation, tendency to overfocus.

Data flow diagrams

Element Shape Remember
External entity Rectangle Outside your control; threats from it
Process Circle Makes decisions; all STRIDE categories apply
Data store Parallel lines DB, file, queue, log, vector DB, memory
Data flow Arrow Label data + protocol; must start or end at a process
Trust boundary Dashed line Where trust changes → analyse every crossing
  • Level 0 = context; Level 1 = working level; Level 2+ only where risk justifies.
  • Zoom in when a box hides a boundary or a security decision; split at ~20 elements.
  • Record assets, entry points, dated assumptions; scope includes downstream use of the data.
  • AI preview: mark where untrusted content enters a model's context window (instructions and data mix).