Automated Threat Modeling: What It Can and Can't Do

"Automated threat modeling" is on nearly every security vendor's homepage in 2026, usually next to "AI". The promise is the same each time: threat models in minutes instead of weeks, kept current as the code changes. Part of that promise is real. Part of it can't be delivered by any tool, because it depends on things that aren't in the input.

This guide explains what automated threat modeling is, the four quite different things sold under the name, and what each can and can't find. We tested the idea against a real model, the ten threats from our threat model example, to show which ones automation would catch and which only a person who knows the business would.

The short version: Automated threat modeling means software produces some of the threat model for you, usually the list of threats, from a diagram, a model written as code, your code and cloud configuration, or a description given to an AI model. It is good at known patterns, consistency across many applications and keeping up with change. It can't know what matters to your business, spot flaws in your business logic, judge likelihood in your context or decide which risks to accept. On a real ten-threat model, a rules library would find most of the generic threats, find the rest only in generic form, and miss the one that came from how customers actually use the product. Use automation for the first draft and the routine coverage, and keep people responsible for scoring, the threats only they can see, and the decisions.

What is automated threat modeling?

Automated threat modeling is the use of software to produce parts of a threat model without a person writing them: most often the list of threats, sometimes the diagram, the mitigations or the mapping to standards. A manual threat model asks four questions: what are we building, what can go wrong, what are we going to do about it, and did we do a good job (the four-question framework). Automation mostly answers the second one. The first comes from whatever input you give the tool, and the third and fourth still need people.

Four kinds of automation, sold under one name

The products differ mainly in their input. That decides what they can know about your system, and so what they can find.

KindInputExamplesTypical weakness
Rules on a diagramA diagram you draw from a library of component typesMicrosoft Threat Modeling Tool, IriusRisk, ThreatModelerLong generic lists that need triage. Only as good as the diagram.
Threat modeling as codeA model of the system written in code or YAML, kept in the repositoryOWASP pytm, ThreagileSomeone still has to write and maintain the model. Same rule-based limits.
Derived from code and cloudSource code, infrastructure as code, cloud configurationCode- and cloud-scanning platformsSees what's deployed, not what was intended. Misses people, processes and third parties.
Written by an AI modelDesign documents, diagrams or code given to an LLMAI threat modeling assistantsPlausible but unverified threats, different answers on different runs, and your architecture sent to a model.

Many products combine two or more of these. The first two are deterministic: the same input gives the same threats, and each threat can be traced to the rule that produced it. The last is not, which matters when an auditor asks why a threat is or isn't in the model. Our guide to AI-assisted threat modeling covers where LLMs help and where they don't.

A test: what would automation find on a real model?

Invoicely is the small invoicing SaaS from our threat model example, with ten threats a team found by hand and then scored. The table gives our reading of how a typical rules library, matching threats to component types such as "web API", "file storage" and "webhook", would handle each. It isn't a test of any particular product.

#Threat (score)Rules libraryWhy
T1Credential stuffing on login (16)FoundA standard threat for any login.
T2Another customer's invoices via the invoice ID (20)Generic"Broken object-level authorization" appears for any API. Knowing the invoice endpoints don't check ownership, and that this is the top risk, takes someone who knows the code.
T3PDF links that never expire (10)Generic"Unauthorised access to stored files" appears. That the links are shareable and permanent is a design detail the rules can't see.
T4Forged payment webhook (10)FoundUnverified webhooks are a common rule, if the webhook is drawn as its own component.
T5Admin console shares the app's database role (15)Generic"Excessive privilege" may appear. That support staff can change any customer's data through it depends on how the console was built.
T6No audit log in the admin console (6)FoundRepudiation per element is standard in STRIDE-based rules.
T7Stored XSS in invoice notes (8)FoundA standard web application threat.
T8Session token readable by scripts (12)Generic"Session hijacking" appears. That the token sits in browser storage, which turns T7 into account takeover, needs the implementation.
T9Render queue flooded at month end (9)Generic"Queue denial of service" appears, but not that most invoices go out in the last three days of the month, which is what makes the impact real.
T10Invoice emailed to a mistyped address (6)MissedNo component is attacked. It comes from how customers use the product, and the team accepted the residual risk.

Four found, five only in generic form, one missed. That's a useful first draft: nothing important is entirely absent, and the generic entries point at the right places. But the scores are where the value is, and none of them would be right. The two highest risks, T2 and T5, are exactly the ones a rules library can only describe in general terms, because their severity comes from how Invoicely was built. And the list it produced would have been much longer than ten, because rules also fire for threats that don't apply, which someone has to read and dismiss.

What automation does well

  • Known patterns. The threats that apply to every login, every API and every storage bucket are exactly what a rules library is for. Nobody should be typing "SQL injection" by hand for the hundredth time.
  • Consistency. Two teams modeling similar services get the same baseline, which matters when a security team reviews dozens of applications.
  • A faster first draft. Starting from suggestions beats a blank page, especially for teams new to STRIDE.
  • Keeping up with change. When the model lives in code or is derived from configuration, a new component can produce new threats without anyone scheduling a review.
  • Mapping. Linking each threat to CWE, CAPEC, MITRE ATT&CK or a control framework is tedious by hand and easy for software.

What automation can't do

  • Know what matters. Impact depends on your customers, your contracts and your regulators. A tool can't know that a payment status matters more than a profile picture unless someone tells it.
  • See business logic flaws. Abusing a refund flow, a referral scheme or an approval step isn't a property of any component. These are found by people asking how the product could be misused (see abuse cases).
  • Judge likelihood in your context. Whether a threat is likely depends on who would attack you, what controls already exist and how exposed the component is. Generic severity is not risk, the same trap as treating CVSS scores as risk.
  • Model what isn't in the input. The undocumented integration, the spreadsheet export someone emails every Friday and the support process all sit outside the diagram, the code and the cloud account.
  • Make decisions. Accepting a risk, choosing a treatment and naming an owner are accountable decisions. Standards such as ISO 27001 and SOC 2 expect a named person to make them.
  • Stay quiet. A tool that reports two hundred threats per application trains teams to dismiss them. Triage takes time the automation was supposed to save.

"AI threat modeling" means two different things

The phrase is used for using AI to write a threat model, the fourth kind in the table above. It is also used for threat modeling systems that contain AI, such as LLM applications, retrieval and agents, which bring their own threats like prompt injection. The second is a well-defined discipline with its own frameworks: the OWASP Top 10 for LLM Applications and MITRE ATLAS. See threat modeling for AI and ML systems for how that works, and threat modeling AI agents for a worked example.

How to evaluate an automated threat modeling tool

  1. What does it need as input, and who will keep that input current?
  2. Can you see why each threat was suggested, down to the rule or the element it came from?
  3. Does the same input give the same output? If not, how will you explain changes to an auditor?
  4. Do suggestions stay separate from accepted risks until someone reviews them, or do they go straight into the register?
  5. Can you score each threat in your context, not just inherit a generic severity?
  6. How does it handle threats it can't see, such as business logic and process risks? Can you add them in the same model?
  7. Where does your architecture go? If an AI model is involved, which one, in which region, and is your data used for training?
  8. Can you get the model out, as a report for auditors and as data for your other tools?

Where ThreatTree sits

ThreatTree is mostly a tool for people doing the thinking, with automation for the first draft. Its "Generate attack trees" feature reads the components on your data flow diagram and lets you pick from a dictionary of more than 1,100 threats across more than 170 element types, then drafts attack trees grouped by attacker goal. The drafts are marked as suggestions and stay out of the risk register until your team reviews and scores them. It uses no AI: the same diagram and selection always give the same tree, and nothing about your system is sent to a model. There is no rules engine attaching countermeasures. Your team writes the treatments, adds the threats only it can see and decides what to accept.

That suits teams who want a fast, explainable start and a model they own. If you need fully automated threat generation across hundreds of applications, an enterprise rules-engine platform is built for that instead. Our comparison of threat modeling software covers both kinds.

Frequently asked questions

Can threat modeling be fully automated?

No. Software can produce a good first list of threats for known patterns and keep it current as the system changes. It can't know what matters to your business, find flaws in business logic, judge likelihood in your context or make accountable decisions about which risks to accept. Those still need people who know the system.

Is AI-generated threat modeling reliable?

As a source of ideas, often yes. As a finished model, no. LLMs produce plausible threats that may not apply, can give different answers to the same input, and don't know your implementation or business context. Treat their output as suggestions that a person reviews and scores, and check where your architecture is sent before you use one.

What is the difference between automated threat modeling and threat modeling as code?

Threat modeling as code is one kind of automated threat modeling. You describe the system in code or YAML kept in the repository, and a tool such as OWASP pytm or Threagile generates threats and diagrams from it. Other kinds work from a drawn diagram, from code and cloud configuration, or from an AI model.

Does an automated threat model satisfy SOC 2, ISO 27001 or PCI DSS?

Not on its own. These standards expect a risk assessment process with risks evaluated in your context, treatments chosen and owners named, and evidence that the process runs. Automated output can be part of that evidence, but an unreviewed list of generated threats doesn't show that anyone assessed or treated the risks.

Does ThreatTree do automated threat modeling?

Partly. Its attack tree generator drafts attack trees from your data flow diagram using a dictionary of more than 1,100 threats, without AI, and keeps the drafts out of the risk register until your team reviews them. It doesn't attach countermeasures automatically or generate threats from code. Scoring, treatments and decisions stay with your team.

Try a first draft, then do the thinking

Draw your system as a data flow diagram, then use Generate attack trees to draft trees from more than 1,100 threats matched to its components. Review the suggestions, add the threats only your team can see, score each one in context and give it an owner in the risk register, free. Or open the finished Invoicely example from this post and compare it with what a generator would give you.

See the attack tree generator →

Not ready to sign up? Get new threat-modeling guides by email instead.