Threat modelling

Play this lesson

Before an attacker does

Shard Garden now has chat, player-made levels and a shop. Each one is a new way in for someone who wants to cause harm.

A threat model is the team thinking like an attacker before an attacker does. OWASP's guide builds it on four questions.

Four questions

Every threat model answers:

Quick check

Remy draws the level editor, its server and its database. Which question is Remy answering?

  1. What are we working on?
  2. What can go wrong?
  3. Did we do a good enough job?
Show the answer

What are we working on?

The drawing describes the system. The threats come next, once everyone can see the parts.

Draw the flows

OWASP: "DFDs visually model a system, its data flows, and interactions with external entities." A data flow diagram shows "trust boundaries, data flows, data stores, processes, and the external entities", which "often represent possible attack points."

A trust boundary is where data from someone the studio doesn't control comes in, like a player's phone talking to the server.

STRIDE

Microsoft sorts threats into six kinds, one per letter:

Name the threat

A player edits their save file to say they own 1,000,000 coins, and the server believes it. Which STRIDE threat?

  1. Tampering
  2. Spoofing
  3. Repudiation
Show the answer

Tampering

It is the malicious modification of data. The answer is that the server keeps the coin count and never trusts the app's number.

Four answers

For each threat, OWASP's guide lists four answers:

Quick check

Old level-sharing links let anyone see a player's private drafts. Nobody uses those links any more. Which answer fits?

  1. Eliminate: remove the old links
  2. Accept: nobody uses them
  3. Transfer: make players responsible
Show the answer

Eliminate: remove the old links

A feature nobody needs is the cheapest threat to fix: remove it, and the threat goes with it.

Every feature, every time

Remy's design docs have a threat model section, updated when a feature changes. After launch, Priya asks the fourth question again.

Bolt says: Next: passkeys for every player.

Fact-checked 12 October 2026