Threat modelling asks how a design can fail before code exists

The cheapest moment to find a design flaw is before anything has been built on top of it.

Once code exists, changing the shape of the system means rework across everything that depends on it, so the answer tends to be a compensating control instead. Doing it at design time costs an afternoon and occasionally removes an entire category of problem.

More on Secure development