Menu

Threat modeling a feature in 20 minutes
πŸ“°

Threat modeling a feature in 20 minutes

DEV Community: appsecΒ·Soren VestergaardΒ·16 days ago
#dr9RAQgP
#devtoappsec#devto#dev#model#threat
Reading 0:00
15s threshold

Soren Vestergaard

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?