Insights / Threat modelling

Threat modelling in an afternoon

Threat modelling sounds heavyweight, but a useful session fits into an afternoon. It is structured around four questions:

  1. What are we working on?
  2. What can go wrong?
  3. What are we going to do about it?
  4. Did we do a good enough job?

Step 1: Draw what you are building

Sketch a simple data-flow diagram: the people and external systems (actors), your processes, your data stores, and the flows between them. Then draw the trust boundaries: the lines where data crosses between different levels of trust, such as internet to application, application to database, or your system to a third-party API. Most problems cluster on those lines.

Step 2: Ask what can go wrong, using STRIDE

STRIDE is a checklist of six threat types. Walk each element and boundary of your diagram through it.

ThreatQuestionTypical mitigation
SpoofingCan someone pretend to be a user or service?Strong authentication, mutual TLS
TamperingCan data be altered in transit or at rest?Integrity checks, signing, access control
RepudiationCould someone deny an action, with no proof either way?Audit logging, tamper-evident logs
Information disclosureCan data leak to someone who should not see it?Encryption, authorisation, minimisation
Denial of serviceCan it be made unavailable?Rate limiting, quotas, redundancy
Elevation of privilegeCan someone gain rights they should not have?Least privilege, input validation

Step 3: Decide and record

For each credible threat, choose to mitigate, accept, transfer or avoid it. Write the mitigations as backlog items with owners, so they are built and tested like any other work. Rank by likelihood and impact, and do not try to fix everything at once.

Step 4: Keep it alive

Store the diagram and decisions alongside the code. Revisit them whenever the architecture changes, for example when you add a new integration, data store or user role. Later, check that mitigations were actually built and that tests cover them.

Tips. Include developers and operations, not just security. Keep the session to around 90 minutes per feature. Focus on trust boundaries, and aim for a short list of real, actionable items rather than a long report.