Generate Threat Model
generate_threat_modelTurn a feature description into a threat model with trust boundaries, assets, attackers, controls, and assumptions, while avoiding duplicates by suggesting similar existing models.
Instructions
Generate a complete threat model from a feature description.
Analyzes the feature using the Security Properties (Confidentiality, Integrity, Availability, Usage) methodology with capability-defined attackers. Produces trust boundaries, asset inventory, attacker inventory, control objective matrix, and assumptions.
Runs a multi-step AI pipeline. Progress is reported automatically.
Similar-model short-circuit: if the backend finds an existing
model in the workspace whose feature description substantially
overlaps with the new one, it does NOT generate a duplicate. This
tool returns {"similar_models": [{"id", "title", "reason"}, ...], "suggestion": "..."} with the candidate IDs instead. The agent
should then either:
Call
refine_threat_modelon one of the candidates to extend the existing model (usually the right answer — avoids duplicate modeling of the same system and preserves control/assertion history).Retry this tool with
force=Trueto bypass the check and create a genuinely new model anyway (e.g., when the similarity is superficial and the operator confirmed the new model is distinct).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| force | No | Skip the similar-model detection and always create a new model. Default False — the check fires unless the operator / agent has explicit reason to bypass it. | |
| parent_id | No | Optional ID of an existing model to wire the new model under as a child on the recursive composition tree. The child then inherits the parent's topology and participates in composition (delta / inherited control credit). Default None — the model is created flat. | |
| provenance_ref | No | Branch or tag name at that commit (optional). | |
| server_version | Yes | ||
| provenance_kind | No | Where the description came from, one of ``code``, ``ticket``, ``document``, ``manual``, ``mixed``. Empty (default) records nothing. For an existing repository pass ``provenance_kind="code"`` with ``provenance_repo_url`` and ``provenance_commit_sha`` (the HEAD you gathered from): the code is then authoritative and the model follows it. Any other kind means the description is intent and the code is measured against it. The same record can be set later with ``set_model_provenance``. | |
| feature_description | Yes | Description of the feature or system to threat model. Can be a few sentences or a detailed spec. | |
| provenance_repo_url | No | Repository URL the description was gathered from (``code`` kind). | |
| provenance_commit_sha | No | Commit SHA the description was gathered at (``code`` kind). | |
| provenance_source_ref | No | Identifier of the ticket or document the description came from (``ticket`` / ``document`` kinds). | |
| provenance_source_url | No | URL of that ticket or document. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||