Skip to content

Threat model card payments for an online store¶

A team is adding card payments to an online store. The tech lead models the change in Threat Modeler before anyone writes code. One analysis gives 29 threats. A 30-minute review triages the High items. The review catches a missing authentication check on an internal call before the build.

In-browser

Nothing to install. Microsoft Threat Modeling Tool is a Windows desktop app.

Private by default

Models stay in your browser until you share one.

Shareable when you choose

Invite a colleague by email. Edits show live for everyone.

Three export formats

Export Threats CSV, SARIF 2.1.0 or Model JSON (.tm.json).

Bring your own controls

Switch on the protections you run, such as source authentication. The threats they answer drop out.

Open Threat Modeler Free, at tmt.accuknox.com

The Store Has Six Parts and Six Flows¶

Part Shape Trust boundary
Customer External entity Internet Boundary
Storefront Process Corporate Network
Orders API Process Corporate Network
Orders DB Data store Corporate Network
Audit Log Data store Corporate Network
Stripe External entity Outside both boundaries

The six flows are Browse and checkout, Create order, Read order, Write order, Write audit event and Charge card.

To follow along without drawing, choose Open sample model on the Models page, then Make a copy to edit. The sample is this exact store.

Step 1. Draw the Store Inside Two Trust Boundaries¶

Online store diagram with the Internet Boundary, the Corporate Network, the Charge card flow and Make a copy to edit marked

  1. Choose New model and name it "Online Store".
  2. Add a trust boundary named Internet Boundary and put the Customer inside it (1).
  3. Add a trust boundary named Corporate Network and put Storefront, Orders API, Orders DB and Audit Log inside it (2).
  4. Add Stripe as an external entity outside both boundaries.
  5. Draw the six flows. Name each one after its data, such as Charge card (3).

Working from the sample instead? Choose Make a copy to edit (4) first.

Step 2. Answer the Switches on Each Shape and Flow¶

  1. Select Orders API. Set Subtype to Web Service, then answer Implements authentication scheme and Implements custom authorization as the service really works.
  2. Select Create order. Set Protocol to HTTPS. Switch on Authenticates source, Provides confidentiality and Provides integrity only where they are true. Switch on Carries JSON because the flow carries JSON, which adds the JSON processing threats.
  3. Repeat for every shape and flow. Each protection you switch on removes the threats it answers. Leave a protection off where the design does not have it yet.

Shape and flow switches shows each panel.

Step 3. Analyze and Get 29 STRIDE Threats¶

Choose Analyze diagram. The Analysis view lists 29 threats, all Not Started. The screenshot shows the list after the first decisions.

Threat list for the online store with 29 threats and the filter controls marked

The first threats sit on Browse and checkout, the flow that crosses from the Internet Boundary into the Corporate Network. Examples:

  • TMT-S02 Spoofing the Storefront Process, High
  • TMT-T10 Cross Site Scripting, High
  • TMT-E05 Cross Site Request Forgery, High
  • TMT-T07 Potential SQL Injection Vulnerability for Orders DB, High, on Write order

Step 4. Triage the High Threats in a 30-Minute Review¶

  1. Set the priority filter to High.
  2. Open each threat. The diagram highlights the flow it applies to.
  3. Set the status and write the justification.

Cross Site Scripting set to Mitigated with a justification

Example decision for TMT-T10 Cross Site Scripting: status Mitigated, justification "Output encoding and a strict CSP are in place."

Status Use it when
Mitigated A control is in place. Name it
Not Applicable The threat does not apply here. Say why
Needs Investigation Someone must check before the team decides

The review finds an internal flow inside the Corporate Network with Authenticates source still off, because the service has no authentication yet. The tech lead sets the spoofing threats on that flow to Needs Investigation and opens a task to add service authentication before the build starts.

Step 5. Add the Pen Test Finding as a Manual Threat¶

A penetration test later shows that payment callbacks are not signature-checked. No rule can know this, so the engineer adds it.

Add threat dialog filled in for unsigned payment callbacks

  1. Choose Add threat.
  2. Enter the title "Payment webhook accepts unsigned callbacks".
  3. Set Category to Tampering and Priority to High.
  4. Set Applies to to Orders API → Charge card → Stripe.
  5. Enter the description "Stripe callbacks are processed without verifying the signature header."
  6. Choose Add threat.

The threat carries the Manual label and survives every re-analysis.

Step 6. Share for Sign-Off, Then Export the Evidence¶

  1. Choose Share and invite the security reviewer by email.
  2. The reviewer filters to Not Started and works down the list until the count reads 0.
  3. Choose Export, then Threats CSV. Each row holds the threat, its priority, the decision and the justification, ready for an auditor.
  4. Choose Export, then Model JSON, and store the .tm.json file as the backup.

The Team Ends With a Decided List and Audit Evidence¶

  • Design gap caught early. The missing authentication on an internal call is found before any code exists.
  • One list. 29 generated threats and 1 pen test finding sit in one place.
  • Sign-off as a list. Security approves when no threat is Not Started.
  • Evidence in minutes. The Threats CSV answers the auditor's question of how design risks were assessed.

Track the Threats in AccuKnox After Release¶

When the store runs on infrastructure AccuKnox protects, push the threats to AccuKnox. The design threats then sit beside cloud and runtime findings for the same services, and the team reports on them together. A status change made in AccuKnox comes back to Threat Modeler through Sync findings for review. See Push threats to AccuKnox.