DEV Community

Soren Vestergaard
Soren Vestergaard

Posted on

Threat modeling a feature in 20 minutes

I used to treat threat modeling as a whiteboard meeting. Now I do it in 20 minutes with a text file, and it catches more.

The four questions:

  1. What are we building? One paragraph, assets and actors. No diagrams needed yet.
  2. What can go wrong? Walk the trust boundaries: browser → API → queue → worker → database. At each boundary, ask who can lie.
  3. What do we do about it? Every abuse case gets one of: validate, authorize, rate limit, log, or accept.
  4. Did we miss anything? Check the list from last time.

The output is a checklist that goes in the PR, not a document nobody opens.

The trick that keeps it short: only model what changed. You don't need a new threat model for a copy change.

How do you keep the model from becoming a document graveyard?

Top comments (0)