Think like an attacker, on purpose.
Threat modeling is a structured exercise done before you build: draw the system, brainstorm what can go wrong, decide mitigations, then review. STRIDE gives the brainstorm six categories so it doesn't miss anything.
The four-question method
STRIDE — six categories, one per letter
Spoofing — pretending to be someone else. Fix: strong auth, mTLS.
Tampering — altering data or code. Fix: checksums, signed artifacts.
Repudiation — denying an action, no proof. Fix: audit logging.
Info disclosure — data leaks. Fix: encryption, least privilege.
Denial of service — unavailable to real users. Fix: rate limits, autoscale.
Elevation of privilege — more access than allowed. Fix: least privilege, authz checks.
Walk any system through all six STRIDE categories, one at a time, against its real data flow — a repeatable method beats random guessing, for any system, not just this login example.