Most endpoints ship with no threat model because the full ceremony — workshop, whiteboard, security team booking three weeks out — costs more than teams will pay.
Tier: Core · Workflow area: Architecture & Design
The lightweight version is different: AI drafts a STRIDE pass against your actual endpoint spec in minutes, you validate and prune it as the engineer who knows the system, and the mitigations land as tickets in the same sprint. It will not replace a security review for your auth service — it raises the floor for the forty endpoints that would otherwise get nothing.
Do not rely on this alone for authentication systems, payment flows, or crypto design — those earn the real security review. This playbook's output is also that review's best pre-read.
Draft the model with the spec pinned.
Threat-model this endpoint using STRIDE. Spec:
POST /v1/webhooks/payment-provider — receives payment status callbacks.
Auth: HMAC signature header (shared secret per provider). Body: JSON,
provider's schema. On success: updates payment status in Postgres, emits
payment.updated event. Callers: 2 external providers over the internet.
Data: payment IDs, amounts, last-4 card digits.
For each STRIDE category: 2-4 concrete threats SPECIFIC to this spec (not
generic "use HTTPS" advice), each with: attack scenario in one sentence,
what the attacker gains, likelihood (H/M/L) and impact (H/M/L) with a
one-line justification, and a specific mitigation naming the component
that changes. Mark any threat that depends on an assumption about our
infra you cannot verify with [ASSUMES: ...].
Validate as the system expert. Walk every threat: Is it real here? (The model does not know your WAF exists — kill mitigations already in place, but record them as "existing control", which is half the compliance value.) Is the likelihood honest for your exposure? Did it miss the threat only an insider would know (the admin bypass header from 2022, the staging endpoint sharing the secret)? Add those — the model's list is a floor, your knowledge is the ceiling.
Interrogate the gaps. Two follow-ups that reliably harvest more: What threats emerge from the interaction of this endpoint with the payment.updated consumers downstream? and Which threats change if the HMAC secret leaks — what is the blast radius and how would we detect and rotate? Secret-compromise blast radius is the question lightweight models of webhook endpoints most often skip.
Convert to tickets with acceptance criteria. For each accepted threat above your risk line:
Turn accepted threats T2 (replay of captured callback) and T5 (status
spoof via schema-valid forged body) into engineering tickets: title,
context paragraph, specific change (timestamp + nonce validation with 5-min
window; provider IP allowlist as defense-in-depth), acceptance criteria
including the negative test that proves the mitigation (replayed request
returns 401 and increments a metric), and an effort guess.
Below-the-line threats get an explicit "accepted risk" entry with a named accepter — the honest artifact auditors actually respect.
File the model next to the code. docs/threat-models/payment-webhook.md: the validated table (threat, rating, mitigation-or-accepted, existing controls), dated, with a revisit trigger ("re-run when a new provider is added or the event gains consumers"). Re-running the same prompt after a change and diffing the output is the cheapest threat-model refresh in existence.
The model will confidently rate likelihoods for an infrastructure it cannot see. Every [ASSUMES] tag must be resolved by you before the rating stands — an H/M/L column full of unvalidated guesses is security theater with a table format.
Threat models are doubly sensitive: they contain both client architecture and a curated list of its weaknesses. Never run them through unsanctioned tools. Use the client's approved tenant; failing that, abstract the spec (neutral names, keep auth mechanism/data categories/trust boundaries — those drive the threats) and re-concretize locally. Local Ollama models produce a usable first-pass STRIDE table from a well-written spec — the categories scaffold the weaker model effectively — but step 3's interaction questions degrade most; run those as a written exercise with a colleague. Store finished models with the same access controls as incident reports, not in the world-readable wiki.