Raw view: Threat Model a Feature

No invisible, zero-width, or bidi-control characters detected.

Threat model the feature below. The output goes to the engineers building it, so every threat must come with an attack path they can picture and a mitigation they can implement or consciously decline. Generic warnings ("validate all input") are not findings.

<feature>
{{FEATURE_DESCRIPTION}}
</feature>

<architecture>
{{ARCHITECTURE}}
</architecture>

<data_handled>
{{DATA_HANDLED}}
</data_handled>

<existing_controls>
{{EXISTING_CONTROLS}}
</existing_controls>

<threat_actors>
{{THREAT_ACTORS}}
</threat_actors>

<architecture> may be prose, a diagram description, or a list of components and the calls between them. <existing_controls> lists what is already in place (auth middleware, WAF, encryption at rest, rate limits); do not recommend controls that are already there. <threat_actors> may be empty; if so, assume an unauthenticated internet attacker, an authenticated low-privilege user, and a malicious or compromised insider with deploy access.

Method:

1. Enumerate assets: the data in <data_handled> plus the implicit ones (session tokens, audit logs, availability of the feature itself, the reputation cost of misuse). Rank them by what an attacker would most want.
2. Draw the trust boundaries from <architecture>: every point where data crosses from less-trusted to more-trusted (browser to API, service to service, service to datastore, third-party callbacks, queues). List each boundary with what crosses it.
3. For each boundary, walk STRIDE (spoofing, tampering, repudiation, information disclosure, denial of service, elevation of privilege) and ask what each actor in <threat_actors> could do. Record only threats that are plausible given <architecture>; skip categories that do not apply at a boundary and say why in one clause.
4. For each threat, write the attack path as 2-4 concrete steps an attacker would take, naming the component and the input or request involved. If you cannot write the steps, the threat is too vague to keep.
5. Rate likelihood and impact separately on a 3-point scale (low/medium/high) and explain each rating in one clause tied to <existing_controls> or <data_handled>.
6. Propose mitigations that are specific to the component (a parameterized query in service X, an idempotency key on endpoint Y, a signed URL with 10-minute expiry). Note which mitigations are already partially covered by <existing_controls>.
7. Finish by stating what you could not assess from the inputs, so the team knows which questions to answer before signing off.

## Output format

**Scope** - 2-3 sentences: what is in the model, what is explicitly out, and which actors were assumed.

**Assets** - table: asset, where it lives, why an attacker wants it, ranked.

**Trust boundaries** - numbered list; each: from, to, what crosses, existing control(s) at that boundary.

**Threats** - table with columns: ID (T1, T2, ...), boundary number, STRIDE category, threat statement, attack path (numbered steps, compact), likelihood, impact, existing control, proposed mitigation. Sort by impact then likelihood.

**Top three to fix before launch** - IDs from the table with one sentence each on why they rank highest.

**Accepted or deferred** - threats you judge acceptable at current likelihood/impact, with the one-line justification a reviewer would need to agree.

**Unknowns** - bullet list of the questions whose answers would change the model.