liveBook · Manning

Threat model

As explained in Grokking Software Architecture

A threat model is a structured representation of potential attackers, attack paths, assets, and mitigations for a system.

A threat model is a structured way to look for security weaknesses before attackers do. Think like a bank robber studying a blueprint: inspect the blind spots, weak locks, and broken alarms before construction begins. Threat modeling applies that mindset to a system’s architecture, identifying vulnerabilities and mitigations during design rather than waiting for a last-minute security test. section 11.6

Review the system diagram with STRIDE, a repeatable framework for considering six threat categories: Spoofing, Tampering, Repudiation, Information Disclosure, Denial of Service, and Elevation of Privilege. For each risk, identify a mitigation rather than assuming the perimeter will hold. section 11.6 section 11.10

Two questions make the review concrete:

  • Spoofing: Can someone pretend to be another user or service? A rogue container might pose as an order service to command a database. Identity providers for people and mutual TLS for service-to-service connections help verify identities. section 11.6
  • Tampering: Can an attacker alter data in transit or at rest? Someone might change an order’s shipping address in an intercepted request or modify a database file. TLS 1.2 for external traffic and database-level encryption address these risks. section 11.6

Map the boundaries

An attacker might pivot from an HVAC billing portal toward a cash register. Mapping internal boundaries helps reveal how far a breach could spread instead of treating an external integration as an isolated risk. section 11.7.1

Keep the model useful after design. When adding a security solution or third-party integration, record the threat model and chosen mitigations in an Architecture Decision Record. Revisit the record at least quarterly or when a major integration changes, so controls do not quietly become stale. section 11.7.1

How Grokking Software Architecture covers it

How deep it goes
Defines the practice and directs diagram reviews through STRIDE, illustrating spoofing and tampering with mitigations.
Examples
Illustrates a rogue container impersonating a service, an altered order request, and a pivot from an HVAC portal toward a cash register.
What you can do after
Practice threat modeling by reviewing system diagrams, identifying mitigations, and recording them for later review.
How it connects
Connects threat modeling to STRIDE, mutual TLS, architecture decision records, and security boundaries.

Also explained in

Compare how 11 books explain threat model →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking Software Architecture. The section links point to the parts of the book it draws on.