Verified by Garnet Grid

Threat Modeling for Engineering Teams

Practical threat modeling. Covers STRIDE, DREAD, attack trees, data flow diagrams, threat libraries, and integrating threat modeling into development workflows.

Threat modeling is the practice of systematically identifying what can go wrong before it does. Done well, it catches architectural security flaws during design — when fixes cost $100 instead of $100,000 in production. Done poorly, it produces 50-page documents that nobody reads.

This guide covers practical threat modeling that fits into engineering workflows, not security theater.


STRIDE Framework

ThreatDefinitionExampleMitigation
SpoofingPretending to be someone elseStolen JWT tokenMFA, token binding, session management
TamperingModifying data or codeSQL injection, modified API requestInput validation, integrity checks, signing
RepudiationDenying an action took place”I didn’t delete that”Audit logging, digital signatures
Information DisclosureExposing protected dataDatabase dump, error messages with stack tracesEncryption, access control, error handling
Denial of ServiceMaking system unavailableFlood API with requestsRate limiting, WAF, auto-scaling
Elevation of PrivilegeGaining unauthorized accessAdmin API without auth checkRBAC, principle of least privilege

Threat Modeling Process

1. What are we building?
   └── Data flow diagram
       ├── External entities (users, APIs)
       ├── Processes (services, functions)
       ├── Data stores (databases, caches)
       └── Trust boundaries

2. What can go wrong?
   └── Apply STRIDE to each element
       ├── Each data flow: can it be tampered?
       ├── Each data store: can it be accessed?
       └── Each trust boundary: can it be bypassed?

3. What are we going to do?
   └── Mitigation for each threat
       ├── Accept (risk is low)
       ├── Mitigate (implement control)
       ├── Transfer (insurance, SLA)
       └── Avoid (change design)

4. Did we do a good job?
   └── Review and validate
       ├── All threats addressed
       ├── Mitigations implemented and tested
       └── New threats from changes

Data Flow Diagram

                    Trust Boundary: Internet
┌──────────────────────────────────────────────────────┐
│                                                      │
│  [User Browser]                                      │
│       │                                              │
│       │ HTTPS (TLS 1.3)                              │
│       ▼                                              │
│  ┌─── CDN/WAF ───┐   Trust Boundary: DMZ           │
│  │  Rate limiting │─────────────────────────────┐    │
│  │  DDoS protect  │                             │    │
│  └────────────────┘                             │    │
│       │                                         │    │
│       ▼                                         │    │
│  ┌─── API Gateway ──┐   Trust Boundary: App    │    │
│  │  Auth validation  │─────────────────────┐    │    │
│  │  Schema validate  │                     │    │    │
│  └───────────────────┘                     │    │    │
│       │                                    │    │    │
│       ▼                                    │    │    │
│  ┌─── App Service ──┐                     │    │    │
│  │  Business logic   │                    │    │    │
│  └───────────────────┘                    │    │    │
│       │                                   │    │    │
│       ▼              Trust Boundary: Data │    │    │
│  ┌─── Database ─────┐─────────────────┐  │    │    │
│  │  Encrypted at rest│                │  │    │    │
│  │  Row-level security│               │  │    │    │
│  └──────────────────┘                 │  │    │    │
└──────────────────────────────────────────────────────┘

When to Threat Model

TriggerAction
New service or featureFull threat model as part of design review
New external integrationAssess data flows across trust boundaries
Authentication/authorization changeReview all access paths
Data storage changeAssess encryption, access, retention
Major architecture changeRefresh entire threat model

Anti-Patterns

Anti-PatternProblemFix
50-page threat model documentNobody reads it, instantly staleFocused threat model per feature/service
Threat modeling onceSecurity landscape changes constantlyRefresh on significant changes
Security team does all modelingDevelopers know the system bestTrain developers, security coaches
Only modeling new featuresExisting systems have unknown threatsAnnual review of critical existing systems
No follow-throughThreats identified but never mitigatedTrack mitigations as engineering work items

Checklist

  • Threat model template established for the team
  • Data flow diagram: all services, data stores, trust boundaries
  • STRIDE applied to each component and data flow
  • Risk scoring for each identified threat
  • Mitigations: accept, mitigate, transfer, or avoid per threat
  • Mitigations tracked as backlog items with deadlines
  • Trigger policy: when to create/update threat models
  • Training: developers trained in basic threat modeling

:::note[Source] This guide is derived from operational intelligence at Garnet Grid Consulting. For threat modeling consulting, visit garnetgrid.com. :::

Jakub Dimitri Rezayev
Jakub Dimitri Rezayev
Founder & Chief Architect • Garnet Grid Consulting

Jakub holds an M.S. in Customer Intelligence & Analytics and a B.S. in Finance & Computer Science from Pace University. With deep expertise spanning D365 F&O, Azure, Power BI, and AI/ML systems, he architects enterprise solutions that bridge legacy systems and modern technology — and has led multi-million dollar ERP implementations for Fortune 500 supply chains.

View Full Profile →