Markdown Editor

Threat Model Template (STRIDE)

STRIDE threat model: scope, DFD with trust boundaries, assets, threats per element, L x I rating, mitigations, risk acceptance

Інженерія безпекиПовнийSTRIDEthreatmodelmath

Як використовувати: Use during design and after every significant change to a system or feature. Draw the data flow diagram with trust boundaries first, then enumerate threats per element. The main pitfall is listing generic attack names instead of concrete threats on named elements, or accepting risks without an owner and expiry.

Перегляд

Threat Model: [System or feature name]

STRIDE threat model for a system, service or feature. It records the scope, the assumptions, a data flow diagram with trust boundaries, the assets and entry points, threats enumerated per element with the STRIDE categories (Spoofing, Tampering, Repudiation, Information disclosure, Denial of service, Elevation of privilege), a risk rating, mitigations mapped to threats, validation evidence and residual risk acceptance. Replace every [bracketed] value and every row marked Example.

Document control

FieldValue
Document ID[TM-SYSTEM-001]
System / feature[Name]
System version or commit modelled[v2.4 / commit abc1234]
Version[0.1]
Status[Draft / In review / Approved / Superseded]
Owner[@security-champion]
Participants[@dev-lead, @appsec, @sre, @product]
Classification[Internal / Confidential]
Last reviewedYYYY-MM-DD
Next review dueYYYY-MM-DD

Approvals

RoleNameDecisionDate
System owner[@name][Approved / Changes requested]YYYY-MM-DD
Application security[@name][Decision]YYYY-MM-DD
Engineering lead[@name][Decision]YYYY-MM-DD

Revision history

VersionDateAuthorChange summary
0.1YYYY-MM-DD[@name]Initial DFD and threat enumeration
1.0YYYY-MM-DD[@name]Example: Mitigations agreed, residual risks accepted

Contents

1. Scope

This model covers [system name] as deployed in [production / all environments] at version [v2.4]. It answers four questions: what are we working on, what can go wrong, what are we going to do about it, and did we do a good job.

1.1 In scope

  • Example: Public web client (SPA) and mobile app calling the REST API.
  • Example: orders-api service, its PostgreSQL database and Redis cache.
  • Example: Outbound call to the payment provider and inbound webhook.
  • Example: Admin console used by support staff.

1.2 Out of scope

ItemReasonCovered by
Example: Cloud provider physical securityInherited controlProvider SOC 2 report
Example: Corporate identity providerSeparate model[TM-IDP-003]
[Item][Reason][Reference]

1.3 Security objectives

  • Example: A customer can only read and change their own orders.
  • Example: Card data never touches our systems (payment provider tokenisation).
  • Example: Every privileged action by support staff is attributable and logged.
  • Example: The checkout path stays available during a volumetric attack up to [10x] normal load.

2. Assumptions and dependencies

IDAssumptionConsequence if falseValidated by
AS-01Example: TLS 1.2+ is terminated at the load balancer with a managed certificateTraffic interception on the public flowConfig scan, quarterly
AS-02Example: The identity provider enforces MFA for all admin accountsAdmin account takeover via password sprayIdP policy export
AS-03Example: Database is reachable only from the application subnetDirect data access from other workloadsNetwork policy test
AS-04Example: Payment provider webhooks are signed with a shared secretForged payment confirmationsProvider documentation
AS-05[Assumption][Consequence][Evidence]

3. System model

The diagram below shows the elements and flows in scope. Dashed subgraphs are trust boundaries: places where data moves between different levels of privilege or ownership.

3.1 Element catalogue

IDElementTypeOwnerNotes
E-01CustomerExternal entityn/aUntrusted, authenticated by session
E-02Support agentExternal entitySupport teamAuthenticated by SSO + MFA
E-03orders-apiProcessTeam OrdersNode.js, runs as non-root container
E-04admin-consoleProcessTeam Support ToolsInternal only via SSO
E-05PostgreSQLData storePlatformEncrypted at rest
E-06Payment providerExternal entityVendorTokenises card data
E-07[Element][Type][Owner][Notes]

3.2 Data flows

IDFrom -> toDataClassificationProtection
F1Customer -> LBCredentials, order dataConfidentialTLS 1.2+, HSTS
F5orders-api -> PostgreSQLOrders, addressesConfidential (PII)TLS, least-privilege DB role
F9Payment provider -> LBPayment statusInternalHMAC signature, IP allow-list
[Fn][From -> to][Data][Class][Controls]

4. Assets and entry points

The assets and entry points below define what is worth protecting and where an attacker can reach the system.

4.1 Assets

IDAssetSensitivitySecurity property at stakeImpact if compromised
A-01Example: Customer accounts and sessionsHighConfidentiality, integrityAccount takeover, fraud
A-02Example: Order and address records (PII)HighConfidentialityPrivacy breach, regulator notification
A-03Example: Payment statusHighIntegrityGoods shipped without payment
A-04Example: Audit logMediumIntegrity, availabilityLoss of attribution
A-05Example: Checkout availabilityHighAvailabilityRevenue loss of [~$12k/hour]
A-06[Asset][H/M/L][C/I/A][Impact]

4.2 Entry points

IDEntry pointExposed toAuthenticationTrust level required
EP-01Example: POST /api/ordersInternetSession cookieAuthenticated customer
EP-02Example: POST /webhooks/paymentsInternet (provider IPs)HMAC signaturePayment provider
EP-03Example: Admin console UICorporate networkSSO + MFASupport role
EP-04Example: CI/CD deployment pipelineEngineersSSO + branch protectionMaintainer
EP-05[Entry point][Exposure][Mechanism][Level]

5. Threat enumeration

STRIDE categories map to the security property they violate: Spoofing (authentication), Tampering (integrity), Repudiation (non-repudiation), Information disclosure (confidentiality), Denial of service (availability), Elevation of privilege (authorisation).

Element typeSTRIDE
External entityYesYes
ProcessYesYesYesYesYesYes
Data storeYesYesYesYes
Data flowYesYesYes

5.1 Threat register

IDElement / flowSTRIDEThreat descriptionAssetsExisting controls
T-01E-01 / F1SExample: Attacker replays a stolen session cookie to act as the customerA-01HttpOnly, Secure cookies
T-02F9 / EP-02S, TExample: Attacker forges a payment webhook marking an unpaid order as paidA-03HMAC check
T-03E-03E, IExample: Customer changes order_id in the URL to read another customer's order (IDOR)A-02None identified
T-04E-04RExample: Support agent refunds an order and later denies it; no per-action audit recordA-04App logs only
T-05E-05IExample: Database backup copied to an unrestricted storage bucketA-02Encryption at rest
T-06EP-01DExample: Bot floods order creation, exhausting DB connectionsA-05WAF rate limit (global only)
T-07EP-04TExample: Compromised dependency injects code at build timeA-01, A-02Lockfile, Dependabot
T-08[ID][S/T/R/I/D/E][Threat][A-nn][Controls]

6. Risk rating

Each threat is rated with likelihood LL and impact II on a 1 to 5 scale, after existing controls. The risk score is:

R=L×I,1≤R≤25R = L \times I, \qquad 1 \le R \le 25
Score RRRatingRequired response
15-25CriticalMitigate before release; no acceptance below CTO level
8-14HighMitigate within [30] days or accept with expiry
4-7MediumPlan in backlog; acceptance by system owner allowed
1-3LowAccept and monitor
LevelLikelihood (L)Impact (I)
5Expected; trivial to exploit, public tooling existsLarge-scale breach, regulatory notification, long outage
3Plausible; needs some skill or insider positionLimited data exposure or degraded service for some users
1Rare; needs multiple unlikely conditionsNegligible, contained, easily reversed

6.1 Rated threats

ThreatLIRRRatingRationale
T-013412HighExample: Session lifetime 30 days, no binding
T-022510HighExample: HMAC present but no timestamp check, replay possible
T-034520CriticalExample: IDs are sequential integers; no ownership check
T-04339HighExample: Needed for dispute handling
T-052510HighExample: One misconfigured bucket found last year
T-063412HighExample: Seen in peak season
T-072510HighExample: Industry-wide trend

For a confirmed vulnerability, record the CVSS vector alongside, for example CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N, and use the vendor calculator to derive the score.

7. Mitigations

Mitigations are mapped to threats so that every rated threat above Low has at least one planned or implemented control.

IDMitigationAddressesTypeOwnerTicketDueStatus
M-01Example: Enforce ownership check in the data access layer for all order queries; use UUIDsT-03Prevent@orders-lead[SEC-412]YYYY-MM-DDIn progress
M-02Example: Reject webhooks older than 5 minutes; store and dedupe event IDsT-02Prevent@payments[SEC-413]YYYY-MM-DDPlanned
M-03Example: Reduce session lifetime to 12 h idle, rotate on privilege change, bind to deviceT-01Prevent@identity[SEC-414]YYYY-MM-DDPlanned
M-04Example: Append-only audit log for admin actions with actor, reason and diffT-04Detect@support-tools[SEC-415]YYYY-MM-DDDone
M-05Example: Per-account and per-IP rate limits on order creation; connection pool capsT-06Prevent@sre[SEC-416]YYYY-MM-DDPlanned
M-06Example: Signed build provenance, pinned dependencies, review of new packagesT-07Prevent@platform[SEC-417]YYYY-MM-DDPlanned
M-07[Mitigation][T-nn][Prevent/Detect/Respond][@owner][Ticket]YYYY-MM-DD[Status]

7.1 Coverage check

  • Threats rated Critical or High without a mitigation: [none / list].
  • Threats transferred to a third party and the contract clause: [list].
  • Threats marked not applicable and why: [list].

8. Validation

Every implemented mitigation needs evidence that it works and keeps working.

MitigationValidation methodEvidenceResultDate
M-01Example: Automated authorisation test: user B requests user A's order, expects 404CI job authz-testsPassYYYY-MM-DD
M-02Example: Replay a captured webhook after 6 minutes in stagingTest log [link]PassYYYY-MM-DD
M-04Example: Review audit entries for 20 sampled refundsReview notes [link]PassYYYY-MM-DD
M-05Example: Load test at 10x baseline order rateReport [link][Result]YYYY-MM-DD
[M-nn][SAST / DAST / pentest / unit test / config scan][Link][Result]YYYY-MM-DD

Model quality checks:

  • Every element and every boundary-crossing flow has been considered for all applicable STRIDE categories.
  • Every assumption in section 2 has a validation method or an owner.
  • Findings from the latest penetration test (see security/pentest-report) are reflected in the register.

9. Residual risk and acceptance

The threats below keep a residual risk that the owners named have accepted for the period stated.

ThreatResidual RRReason for acceptanceCompensating controlAccepted byDateExpires
T-054 (Medium)Example: Bucket policy guardrail covers the org; full DLP scanning deferredWeekly public-bucket scan@ctoYYYY-MM-DDYYYY-MM-DD
[T-nn][Score][Reason][Control][@name]YYYY-MM-DDYYYY-MM-DD

10. Review cadence and triggers

This model is reviewed every [6 months] and additionally when any trigger below occurs. The owner schedules the review and updates the revision history.

TriggerExampleAction
New entry point or trust boundaryPublic API for partnersFull session on affected elements
New data classStoring date of birthRe-rate information disclosure threats
New third-party integrationSwitching payment providerModel the new flows
Security incident or pentest findingIDOR reported via bug bountyAdd threat, root cause, re-validate
Major framework or platform changeMoving to serverlessRevisit assumptions section
Acceptance expiryRisk T-05 expiresRe-accept or mitigate

Related documents: [architecture/technical-design-doc], [security/pentest-report], [dev/service-readiness], [incident postmortems that involved security].

Standard and licence note

Based on the STRIDE threat classification published by Microsoft and on common industry threat modelling practice (data flow diagrams with trust boundaries, STRIDE per element, likelihood x impact rating, mitigation mapping and risk acceptance). CVSS is maintained by FIRST; consult the CVSS v4.0 specification for scoring rules. This template is original text written for this collection and reproduces no text from those sources. Template licence: MIT.

Схожі шаблони