Future Directions in Threat Modeling
local graph
Chapter 10 — Future Directions in Threat Modeling
Section titled “Chapter 10 — Future Directions in Threat Modeling”Fundamentally, threat modeling consists of learning how to identify assets, classify threats, and integrate security analysis into the development life cycle as a continuous practice rather than a one-time exercise. We’ve covered the essential mechanics of threat modeling, such as creating architectural diagrams, applying frameworks such as STRIDE, documenting assumptions, and iterating on threat models as systems evolve. These foundational skills represent the current state of threat modeling practice in most organizations today, where security analysis often requires specialized expertise and happens at discrete points in the development process. However, the landscape of product development, deployment, and security is changing, and threat modeling must change with it.
The future of threat modeling is being shaped by several converging forces that are transforming how we approach security analysis. Cloud-native architectures, AI integration, regulatory changes driven by geopolitical considerations, and the increasing democratization of development tools are all creating new requirements and capabilities for how we identify, assess, and mitigate security risks. At the same time, organizations are recognizing that the traditional model of security specialists acting as gatekeepers is no longer sustainable in environments where development teams deploy code multiple times per day and where new services can be provisioned in minutes. This chapter explores how threat modeling can no longer be a specialized security practice and must move toward an integrated, automated, and democratized capability that enables every team member to contribute to building secure systems.
In this chapter, we’ll cover the following:
- Future direction in threat modeling
- Enhancing collaboration in threat modeling
- Improving ease of use
- Integrating AI
- Adapting to new IT innovations and security vulnerabilities
- Embracing continuous improvement and preparing for the future
Future direction in threat modeling
Section titled “Future direction in threat modeling”If I could predict the future of threat modeling, or any part of security and technology, I would be rich. While the future holds surprises, the current trends in cloud adoption, AI integration, and regulatory changes are already shaping how we approach threat modeling into the future.
Where are we today?
Section titled “Where are we today?”Today, threat modeling is still largely manual. Tools for drawing can make the process easier, and there are some tools that exist that are purpose-built to create threat models. But not many of them provide automation with the same ease of use and integration that developers and security folks come to expect with their tooling. This leaves the practice of threat modeling often in a vacuum that is detached from day-to-day work, where security practitioners take architecture diagrams off the shelf, produce a threat model, create findings, design remediations, and open tasks for the engineering teams. Rinse and repeat. Granted, this is not the experience of every organization, but it is a majority case in today’s security world.
To be clear, there are many organizations that choose not to threat model at all or have not even heard of the term and assume it’s another case of security wizardry. Or once they hear of the term, they instantly calculate the weight of the process against the current demands on their teams and choose not to pursue it. Threat modeling is not wizardry, and I hope that through this book, I’ve been able to show that there are ways to accomplish threat modeling without breaking the bank. However, there is still a fundamental issue that the tools, by and large, do not support a fast-paced environment and one that requires the ability to be Agile. We still view threat modeling as a snapshot in time that is more of an assessment or audit rather than a continuous security practice. This means that the tools, as well as the practitioners, need to be able to support a more Agile development world.
Additionally, many organizations still don’t know what to do with threat modeling findings. Are there vulnerabilities that should be treated the same as a finding from a scan? Are they requirements? Are they vapor threats, never to materialize? The reality is that findings from a threat model are exactly that. They are findings in a system or architecture that has the potential to reduce the value of some assets. They could never be acted upon, or they could lead to the collapse of an organization. Without coupling the information from a threat model with risk management practices, you’re left blindly chasing findings without context. This, again, leads to organizations scrapping threat modeling in favor of scan-and-patch practice. To use a quote from most infomercials: “ There has to be a better way.”
Where is threat modeling heading?
Section titled “Where is threat modeling heading?”While manual processes are still the order of the day for many organizations when it comes to threat modeling, there are some tools making strides toward integrating more seamlessly into current development processes. For this to work well, threat modeling needs to be integrated at every stage of development and part of the fabric of how work is accomplished in an organization’s processes and people. I’ll highlight what I believe should be basic capabilities that are integrated into future (and present) tools and processes.
Threat modeling an individual user story or feature request
Section titled “Threat modeling an individual user story or feature request”Integrating threat modeling at the granular level of individual user stories and feature requests align naturally with Agile development, where features are built incrementally. Given the velocity of change in an Agile environment, threat modeling needs to occur in increments that mirror the development teams.
As an example, consider a student coursework portal at a university that allows students to upload their assignments. The user story may look something like this:
As a student, I want to upload my assignment files to the course portal so that my professor can review and grade them.In this case, we can perform a small threat model by leaning on the principles that we’ve discussed throughout the book, namely, by asking “ What can go wrong?”. We can ask the following questions based on STRIDE and develop requirements that remediate the threats:
- Spoofing: Could someone pretend to be a student and upload malicious files?
- Tampering: Could an attacker modify a student’s uploaded assignment?
- Repudiation: Is there a way to prove who uploaded what and when?
- Information disclosure: Could unauthorized users access uploaded assignments?
- Denial of service: Could someone flood the system with large or malicious files?
- Elevation of privilege: Could a student gain access to other students’ submissions?
By focusing on discrete functionality, teams can identify specific threats that emerge from new capabilities without getting overwhelmed by the complexity of the entire system. The biggest benefit of this is that controls to mitigate the threat can be designed early. Tools that enable this level of integration with the Agile process will make threat modeling a natural extension of story refinement and sprint planning, rather than a separate, heavyweight process that teams often defer or skip entirely.
Integration with current processes
Section titled “Integration with current processes”Modern threat modeling tools must seamlessly embed within existing development workflows. Tools such as SD Elements integrate with issue tracking, DevOps pipelines, LDAP synchronization, and project portfolio management (PPM) systems to ensure that threat models are woven into the tools that are commonly used by development teams.
However, in the future, we should look to go a step further by integrating threat modeling into our integrated development environments (IDEs) such as VS Code, Eclipse, or IntelliJ. While there are currently extensions that can be used in an IDE such as VS Code, they are largely used to visualize threat models in VS Code. Where we need to mature is in the ability to look at functions or classes and develop threat models based on that code natively within the IDE. This might look similar to an application security static analysis scan that reviews the code, looks for common weaknesses, and offers suggestions for remediation.
However, threat modeling inside the IDE would look to incorporate a broader understanding of the application, including the assets and the attack surface, and help frame the written code in the context of the overall threat model. Taking the example of the file upload mentioned in the previous section, the developer would be notified in the IDE that the fileupload() function is an entry point into the application for malicious actors and is likely to open the attack surface.
The developer would be presented with remediation opportunities that can be coded in at that time. For instance, to remediate the finding described previously of a denial-of-service attack where an attacker could upload large or malicious files, the developer would be provided with remediation techniques such as sending the uploaded file synchronously to a virus scanner or adding file size and file type limits.
Integration with the security fabric
Section titled “Integration with the security fabric”Many organizations manage a myriad of security tools. SIEM, endpoint protection platform (EPP), identity and access management (IAM), data loss prevention (DLP), security orchestration, automation, and response (SOAR), and posture management tools are common in most organizations. To get real effectiveness from threat modeling, a bi-directional relationship needs to exist between the organization’s security tools and the output from threat models. Threat modeling effectively means pulling data from and pushing insights to relevant security platforms. Integration with scanners and vulnerability management systems creates a broader and real-time view of risk that goes beyond simple threats to include actual vulnerabilities and exposures as they exist.
Consider a fintech that is preparing to release a new feature that handles customer transactions. Before deployment, the security team uses its threat modeling process to identify potential threats and generate security requirements. These outputs could be threats such as API abuse, injection, and privilege escalation. These threats would then be exported from the threat modeling tool and ingested into SOAR as playbook triggers, detection rules, and asset tagging.
Conversely, once the application is running in production, the SOAR platform can monitor telemetry, execute playbooks in response to malicious activity, and generate incident reports and threat intelligence. This information is then fed back into the threat modeling process to better inform current and future threat models by updating likelihood factors, refined mitigations, and adding new threat vectors and scenarios.
The best part of this type of integration is that, as threats arise and risk profiles and environments change, the threat model can be changed with it. The result is threat modeling that goes beyond an artifact and is instead part of the fabric of security.
Auto-generation of models
Section titled “Auto-generation of models”Wouldn’t it be great if threat models would just create themselves? Pointing a tool at a code repository, or a series of architecture diagrams (or both for better results), and having that auto-generate a threat model would get us much further along in our threat modeling journey. While there are real concerns with accuracy, false positives, and a check-the-box mentality, automated threat modeling can certainly scale much better and faster than many of our current processes. One other caution with the approach is that it largely must rely on AI/ML to accomplish this feat. This can lead to a lack of accountability and auditability when it comes to the output.
Using AI to speed up the process
Section titled “Using AI to speed up the process”There is no denying that AI will be generating perhaps all threat models in the near future. However, AI capabilities should augment human expertise in threat modeling, not replace it, and security teams should become proficient in creating prompts and preparing diagrams for AI integration. A well-equipped threat model practitioner will be able to generate threat models utilizing AI tools that require less rework by the practitioner. AI has the ability to generate scenarios that humans may not, and which will help teams move beyond generic STRIDE categories to identify context-specific risks. Additionally, ML models trained on historical incident data and indicators of compromise can predict likely attack vectors based on architectural patterns and technology choices, helping to inform likelihood factors while threat modeling.
While AI and ML can change how threat models are created, there needs to be a balance between generating valuable threat models and speed. When we increase speed, quality usually suffers. Additionally, the integration of AI and ML in a threat modeling practice can quickly lead to a check-the-box mentality, where we offload the responsibility of determining threats to the AI. For humans and AI to work together with regard to threat modeling, the practitioners need to consider AI-integrated threat modeling as a tool to enhance their own capabilities, detect novel threats, and be able to understand large and complex systems better than we humans can.
There are a few tools in the market today (Devici, TrustOnCloud, and IriusRisk, to name a few) that are starting to or already have incorporated some of these suggestions. You should also take into consideration what capabilities exist and which ones to look for when shopping for a threat modeling tool. Keep in mind that making threat modeling part of the culture of the organization will provide better long-term outcomes. The tools are there to support that effort.
Supporting Secure by Design
Section titled “Supporting Secure by Design”The Cybersecurity and Infrastructure Security Agency (CISA) has launched the Secure by Design initiative, which aims to transform how organizations responsibly handle their cybersecurity posture. Threat modeling serves a critical role in that security responsibility. There are three core principles that define the Secure by Design approach:
- Taking ownership of customer security outcomes requires manufacturers to assume responsibility for customer security rather than shifting burdens to end users. Products must be secure out of the box, with minimal configuration, focusing on preventing entire vulnerability classes rather than patching individual instances.
- Embracing radical transparency and accountability mandates public sharing of security statistics, threat models, vulnerability trends, and improvement efforts. Complete CVE records with proper root cause analysis become essential, as transparency establishes industry conventions and accelerates collective security improvements. In practice, this means that organizations should publish their threat models as part of demonstrating their commitment to security.
- Leading from the top requires security to be an executive-driven business priority, not merely a technical function. Senior leadership must demonstrate accountability for customer security outcomes through corporate governance integration and financial reporting inclusion.
The process of threat modeling directly supports these three principles through integration with the development process. It’s imperative that, as we look for ways to enhance the future of threat modeling, we take into consideration these basic principles as a “north star.”
Enhancing collaboration in threat modeling
Section titled “Enhancing collaboration in threat modeling”Threat modeling is a team sport involving individuals from all parts of the organization. Creating threat models in a vacuum with little to no input from the stakeholders is a recipe for never getting your threat modeling process off the ground. However, as I’ve mentioned before, in many organizations, threat modeling is a distant concept and not a well-known process.
For better adoption and increased threat identification and reduction, organizations need to bridge the gaps between the different teams and raise awareness of the threat modeling process. This goes beyond simple basic training of threat modeling specialists and presentations to the business stakeholders about what threat modeling is. We must include the “why” and the “what’s in it for the business” while we are demystifying the practice itself.
Breaking the security specialist bottleneck
Section titled “Breaking the security specialist bottleneck”Security teams and their members have held a bit of mystique around them for some time. The reality is that these teams specialize in a particular area (security, in this case), which is little different than other teams in an organization. Furthermore, the work that is completed and managed by security teams can often be done by others in the technology teams. In fact, most of us in cybersecurity push for others in the organization to take ownership of many of the duties. This is largely due to cybersecurity teams being undersized and lacking the proper resources to scale. Additionally, technology teams often have better insight and access into what the security teams are attempting to drive, for instance, vulnerability management or secure access management.
Threat modeling should be put into the hands of those who understand the systems the best. Architects, developers, and systems administrators should be given the opportunity to create and manage their own threat models with oversight from the security teams and subject matter experts. We cannot say that “security is everyone’s responsibility” if we don’t practice it.
Cross-functional integration
Section titled “Cross-functional integration”You likely heard of the terms DevOps and DevSecOps. The concept here is to integrate different disciplines together into a single unit and reduce hand-offs between teams and reduce time to value. When it comes to threat modeling with cross-functional teams, we’re looking to shift away from a place where security is designated to only a few specialists and move to a more integrated approach.
One way to tackle this integration is to create threat modeling squads that embed the activity directly into the teams. The squad should include developers who understand implementation constraints and attack surfaces, designers who recognize user experience security trade-offs and social engineering vectors, product managers who connect business context to threat prioritization and risk tolerance, QA engineers who translate threat scenarios into security test cases, and security professionals who provide specialized knowledge of attack patterns and mitigation strategies.
Additionally, to further build that cross-functional integration, the organization should maintain shared key performance indicators (KPIs) that align with business objectives. This includes measuring security incidents that were prevented, compliance improvements, customer trust metrics, and improved time-to-remediation. These shared KPIs build integration when every stakeholder has an interest in ensuring that they are improving the overall security posture and response.
Lastly, we can integrate threat modeling when we include security subject matter experts in the sprint planning and feature development processes to ensure that threat considerations influence architectural decisions. Daily standups should include security context alongside feature progress, with team members sharing threat-relevant discoveries from their respective domains. Product managers can contribute business context about user workflows and sensitive data handling, designers can identify potential social engineering vectors and user security friction points, developers can surface implementation vulnerabilities and technical attack surfaces, and QA professionals can translate threat scenarios into testable security requirements.
End-to-end security ownership means that teams, regardless of their role in the organization, own the identification, mitigation, implementation, and monitoring of threats. This creates accountability for security outcomes at the team level while reducing the traditional friction between security requirements and delivery timelines.
Democratization through tools
Section titled “Democratization through tools”Another approach to gaining collaboration across the different teams is to build alignment with threat modeling tools and integrate them into the cross-functional teams within the organization. Given that threat models are tangentially like architectural diagrams, user stories, and technical specifications, integration with the same tools leveraged by the different teams makes the threat models more of a community effort. Utilizing collaboration and tracking tools, such as Jira, creates an environment where threat-driven security stories can be connected directly to development workflows. Confluence can host living threat models that update alongside system documentation, Figma incorporates security considerations into design systems and user flow documentation, and GitHub maintains threat model versioning alongside code changes, ensuring that security analysis remains synchronized with system evolution.
Without the tool collaboration and “meeting people where they are,” gaps in threat modeling can occur as activities related to threat modeling end up happening in silos. Some additional integration challenges include synchronizing threat models with architectural documentation, connecting security requirements to development workflows, and maintaining a consistent security context across design, development, and deployment tools. Without the collaboration across tools, threat models would become an addendum to already completed work and would not help build the security mindset that needs to be embedded in the design and development process. While collaborating on the threat model is ideal, building API-driven integration between tools and using unified platforms enables better adoption and can provide the often missing security context within existing team workflows. With successful implementation, threat modeling data flows seamlessly between design tools, development environments, testing frameworks, and monitoring systems.
Building a security culture
Section titled “Building a security culture”I’m a big proponent of building a security culture. It’s one of the cheapest ways to effectively integrate security into an organization. While there is always an “opportunity cost,” events such as brown bags, lunch-and-learns, newsletters, and internal webinars are all low-cost and effective ways to raise the security IQ of team members. To build a security culture that integrates threat modeling into the fabric of the team, consider running interactive workshops and gamified threat modeling. The following is an example of a workshop that can be run in an organization.
Exercise: Threat model workshop – security quest
Section titled “Exercise: Threat model workshop – security quest”In this exercise, we’ll look at a threat model workshop that requires a few hours and a small team that consists of developers, architects, DevOps practitioners, and product designers. A basic outline of the workshop looks like the following:
- Goal: Democratize threat modeling while making security analysis engaging and collaborative.
- Pre-workshop setup (15 minutes):
- Outline the scenario: Present the team with 2–3 application scenarios relevant to your organization (i.e., e-commerce platform: customer data, payment processing, inventory management).
- Team formation: Create mixed squads of 3–4 people, ensuring that each team has diverse representation (developer + architect + DevOps + designer). Have teams create names for their team to increase buy-in during the exercise.
- Digital leaderboard setup: Create a simple HTML local site that displays the team name, current scores, achievements, and threat counter.
- Outline the scenario: Present the team with 2–3 application scenarios relevant to your organization (i.e., e-commerce platform: customer data, payment processing, inventory management).
- Round 1 – System mapping challenge (45 minutes): Teams race to create the most comprehensive system diagram of their chosen application scenario.
- Game mechanics:
- Points: 5 points per correctly identified component, 10 points per trust boundary - Time pressure: 30 minutes to diagram, 15 minutes for team presentations
- Bonus achievements can be awarded for the following:
- Detail Detective (most granular data flows) - Boundary Boss (clearest trust boundaries) - User Champion (best user journey integration)
- Game mechanics:
- Round 2 – STRIDE threat hunt (60 minutes): Teams systematically hunt for threats using STRIDE categories, competing for quantity and creativity.
- Game mechanics (10 minutes per STRIDE category):
- Spoofing round: Find identity/authentication threats - Tampering round: Identify data integrity risks - Repudiation round: Discover logging/audit gaps - Information disclosure round: Spot data exposure risks - Denial of service round: Find availability threats - Elevation of privilege round: Identify authorization bypasses
- Scoring system:
- Basic threat: 10 points (obvious, well-known threats) - Advanced threat: 20 points (creative, context-specific threats) - Cross-boundary threat: 30 points (threats spanning multiple system components)
- Bonus multipliers for this round:
- First team to identify in category: 2x points - Most business-relevant threat: 1.5x points - Designer-identified social engineering threat: 2x points
- Game mechanics (10 minutes per STRIDE category):
- Round 3 – Mitigation innovation sprint (45 minutes): Teams propose creative solutions for the highest-scoring threats from Round 2. These should look like technical controls, process improvements, and user experience enhancements.
- Scoring:
- Feasible solution: 15 points - Cost-effective solution: 10 bonus points - User-friendly solution: 10 bonus points - Solutions incorporating all four disciplines: 25 bonus points
- Scoring:
- Round 4 – Scenario simulation (30 minutes): Present teams with a realistic attack scenario and have them trace through their system to identify impacts and response strategies. A sample scenario might be “ A phishing email successfully compromises an admin user’s credentials. Walk through what an attacker could accomplish using your system diagram and identified threats.”
- Scoring:
- Each correctly identified attack step: 10 points - Each effective mitigation that would stop the attack: 15 points - Most comprehensive attack chain: 25 bonus points - Best incident response plan: 20 bonus points
- Scoring:
Individual achievement badges can be provided at the facilitator’s discretion, but some sample achievements might be as follows:
- Threat Spotter: First to identify a threat in any STRIDE category
- Creative Genius: Most innovative threat or solution
- Collaboration Master: Best cross-functional solution proposal
- STRIDE Master: Highest total score across all STRIDE categories
- Defense Champion: Best mitigation strategies
- System Architect: Most comprehensive system diagram
- Business Focus: Most business-relevant threat identification
The event can be concluded with a “victory ceremony” where team winners and achievements will be announced. However, the real value comes from the transition to the practical application of learning. Here, the team can convert their discoveries in the event into user stories and technical debt items and assign clear ownership for developing the threat model documentation. Ongoing sessions should be scheduled to tackle other parts of the system that need threat modeling. This will maintain team engagement and allow for the continued performance of threat modeling check-ins.
While this approach may not be a fit for every organization, such as smaller and less mature organizations, it is a viable offering that raises engagement and takes some of the pain out of threat modeling. This type of activity is likely to be more memorable and leave a lasting impression on participants and spectators alike.
Improving ease of use
Section titled “Improving ease of use”The traditional view of threat modeling being a specialized security discipline that requires deep expertise and dedicated tools is morphing into a democratized approach with cross-functional tooling. As this method becomes more prevalent, the tools being used need to become more approachable, regardless of whether the user has a security background or not. A transformation like this centers on three critical shifts that can reshape how teams approach security analysis:
- Reducing the cognitive overhead and specialized knowledge required to participate in threat modeling exercises
- Leveraging automation to handle some tasks while preserving the strategic thinking that humans excel at
- Embedding threat modeling capabilities directly into the design and development tools that teams use daily
These changes show a recognition that effective security requires broad organizational participation rather than concentrated expertise, and that the most successful security tools are often those that are intuitive to the user. As tools become easier to use, the bench of users gets bigger, leading to more adoption.
User experience evolution
Section titled “User experience evolution”We’ve realized early in threat modeling practices that as systems became more complex, threat modeling would not be able to meet the demand. To solve this, tools were developed to create a more user-friendly environment that was aimed at reducing the time to complete a threat model. Tools such as OWASP Threat Dragon and the Microsoft Threat Modeling tool were designed to make threat modeling more accessible to both security and non-security professionals. While these tools often don’t provide the depth that many security professionals would look for in a threat modeling tool, there is no doubt that they have made threat modeling easier to complete for many.
Both offered free, user-friendly interfaces with built-in guidance that allow team members (outside of security) to engage in the threat modeling practice without requiring extensive security expertise. To drive this point home, Microsoft explicitly designed its tool “ with non-security experts in mind, making threat modeling easier for all developers by providing clear guidance on creating and analyzing threat models,” representing a paradigm shift from specialized security tools to inclusive ones that treat security analysis as a shared capability rather than exclusive domain knowledge.
While many tools today aim to make threat modeling more accessible across the organization, the trend for current and future tools is to build drag-and-drop interfaces with additional intelligence that further reduces the effort it takes to build threat models. While the drag-and-drop approach speeds up the design effort, the stencils or objects are, in many cases, generic and don’t represent the environment of the organization. While common stencils, such as cloud services, Linux hosts, and network devices, are easy to drag onto a canvas in a threat modeling tool, the configuration and settings of each of those stencils will vary, depending on the organization.
This can be solved by tools that create the ability to pull data from asset management tools, cloud access security brokers (CASBs), or posture management tools to define the stencil library for the organization and its systems. Alternatively, organizations should embrace a community set of templates that are crowd-sourced and bring the best and brightest from different organizations and industries. Organizations that can support this open threat modeling activity will be working toward raising the overall security of our interconnected services, all while supporting CISA’s Secure by Design principle of radical transparency.
Code approaches
Section titled “Code approaches”While drag-and-drop tools can help make threat modeling more efficient, there are other approaches that are picking up steam – namely, turning threat modeling into an “as-code” activity where threat models are generated and maintained through coding efforts. One example of this is PyTM.
PyTM is a developer-centric, code-first threat modeling framework built in Python and maintained by OWASP. It’s designed to shift threat modeling “left” in the SDLC by making it more automated, repeatable, and integrated into engineering workflows.
PyTM is run on a local machine in a Python development environment. You will need Python and PyTM installed and running properly in order to execute the commands. For more information, visit github.com/OWASP/PyTM.
We’ve covered a lot of threat modeling that takes the form of diagrams and documentation activities, but where threat-model-as-code differs is putting it into the language that developers understand: code. This allows for threat models to be generated as source code with all the relevant findings, threats, and remediations.
Exercise
Section titled “Exercise”A university’s IT department is developing a new campus health portal that allows students to book appointments, view medical records, and receive health alerts. Using PyTM, you, as the security practitioner in the department, model potential threats before the portal goes live.
The following steps will take you through the basic flow of this effort and can be executed in a Python environment running PyTM:
- Create the system architecture using basic Python classes such as Actor, Server, Datastore, Dataflow, and Boundary. Alternatively, you can build your own classes or extend the current ones to make them specific to your organization:
from pytm import TM, Server, Datastore, Dataflow, Boundary, Actor
- Initialize the threat model by creating the main threat model container:
tm = TM("Campus health portal threat model")tm.description = "Health portal for university students to manage their health records and interaction with campus clinics."
- Define the boundaries of the threat model, such as the internet, internal network, and cloud service:
internet = Boundary("Internet")internal_network = Boundary("Internal Network")
- Create the system components, such as the following:
user = Actor("User")web_server = Server("Web Server")database = Datastore("Database")
- Establish the data flow between the components and assign the components to boundaries:
user_to_web_server = Dataflow(user, web_server, "View Health Information") and web_server_to_database = Dataflow(web_server, database, "Save or Retrieve Data")web_server.inBoundary = internetdatabase.inBoundary = internal_network
- Process the threat model using the pytm command and generate the outputs:
tm.process()Data Flow Diagram: ./tm.py --dfd | dot -Tpng -o tm/dfd.pngSequence Diagram: ./tm.py --seq | java -Djava.awt.headless=true -jar $PLANTUML_PATH -tpng -pipe > tm/seq.pngReport: ./tm.py --report docs/basic_template.md | pandoc -f markdown -t html > tm/report.html
This produces a diagram showing how the data moves between the components in the threat model, creates a sequence diagram that shows the order of interactions between components, and generates a human-readable report that lists the threats, affected components, and suggested mitigations.
The benefit of having threat models treated as code is that they live alongside the code base. This approach allows developers to define the system and all its elements and properties using the PyTM framework, shifting threat modeling closer to the design and implementation time. It then becomes a natural extension of the coding effort as opposed to a separate effort completed by security team members.
There are very few tools or platforms taking this approach, but as the threat-mode-as-code concept matures, look for organizations to normalize this, as it helps to keep the models in sync with changes that are actively being made in the code. Additionally, organizations should be looking for more ways to integrate automated generation of threat models, where changes to the code automatically update the threat model in the code base.
No-code/low-code approaches
Section titled “No-code/low-code approaches”Other tools are chipping away at the barriers to entry for threat modeling. One of those approaches is through visual tools that automatically transform existing diagrams into threat models. This removes the need to recreate architectural representations in specialized security tools. Some tools, such as SecureFlag’s ThreatCanvas and AWS’s Threat Designer, are already bringing this capability to the market. They will enable teams to upload existing drawings or diagrams and analyze them for threats from the images and architectural documents.
To create the threat model, these tools rely on optical character recognition (OCR) or AI to read and understand the uploaded information, identifying assets, actors, relationships, and threats. Because of the ability to read and understand a diagram from an image or other documentation, the threat model becomes more tool-agnostic. In other words, you can create your diagram in a tool that is preferable to your team and then upload it to a platform that will read and understand the threats.
One last approach that relates to no-code/low-code efforts is questionnaire-driven threat models. These represent a structured approach to threat modeling that guides non-security professionals through security analysis by replacing open-ended brainstorming with more targeted questions. While there are tools to create these questionnaires, the organization can generate them themselves, and they often look like a business impact assessment (BIA) questionnaire with the intention of identifying the parts of the system and the threats it may face. The structure of the questionnaire will put forward questions about the technical architecture, the planned features, and the security context of the application, allowing the team to conduct a comprehensive threat analysis without requiring deep security expertise. With this approach, organizations can ensure that every user story has enough security analysis while simultaneously creating a record of the analysis that enables consistent threat coverage across development teams.
Both approaches offer a broadening of the threat modeling population by making it easier to perform threat models by non-security personnel. While the accuracy and depth of the subsequent threat models may not reach the level of a threat modeling session with security experts, it enables more of them to be created and raises the security knowledge of the teams.
Integrating AI
Section titled “Integrating AI”AI is changing everything in technology and security. While there are serious concerns about how it will change the attacker landscape, it also has its benefits for the defenders. It can be a force multiplier in almost all scenarios in a security organization, such as security operations, threat hunting, penetration testing, and secure code reviews. It can enable efficiency, accuracy, and a reduction of manual work. Threat modeling is ripe for the application of AI to enhance the ability to generate threats in a faster, more streamlined manner.
Current AI applications
Section titled “Current AI applications”While it’s hard to walk a vendor floor at a security conference without seeing AI being sprinkled into every aspect of security tools, there are tools such as StrideGPT that are pursuing the integration of AI into threat modeling. StrideGPT uses large language models with multi-modal support, including text, images, diagrams, and documents. It was developed by Matthew Adams and is actively maintained on GitHub (github.com/mrwadams/stride-gpt). It continues to evolve its capabilities, including support for OpenAI’s and Anthropic’s latest models.
The tool can analyze architecture diagrams, flowcharts, and other visual representations, along with analyzing GitHub repositories and Gherkin test cases. Once threats are identified, DREAD can be applied to score the risks found. The integration with multiple AI providers and support for local model hosting through Ollama means that StrideGPT can provide enterprise-grade flexibility and take enterprise data privacy into consideration.
While StrideGPT and other similar AI threat modeling tools are introduced in the market, simply using a GPT tool in general can produce valid results as well. Simple or complex prompts can be created to generate a threat model based on the following prompt in a service such as ChatGPT:
We're designing a containerized web application with the following components:- Frontend: ReactJS served via Nginx- Backend: Node.js API running in a Docker container- Database: PostgreSQL with TLS enabled- Identity: OAuth 2.0 authentication via Auth0- API Gateway: Envoy with OPA for policy enforcement- CI/CD: GitHub Actions with SBOM generation using Syft and vulnerability scanning via GrypePlease generate a STRIDE-based threat model considering this architecture. Include:1. Component-level threat categorization (Spoofing, Tampering, etc.)2. A visual or textual attack tree3. DREAD scores for top threats4. Suggested mitigations aligned with DevSecOps best practices5. Gherkin-style test cases for validating key security controlsYou are probably familiar with the normal disclaimer about AI tools producing invalid results or even making things up in their response. This condition will be with us for some time and will require a human in the loop to validate results. So, while the marrying of threat modeling with AI tools is the future of the practice, at least in the short term, there will be a need for security specialists to work with these tools and validate the results.
Machine learning for pattern recognition
Section titled “Machine learning for pattern recognition”The integration of machine learning (ML) into threat modeling moves from a static, rule-based security analysis approach to a more dynamic and adaptive threat intelligence system that learns from the organization’s threat landscape. While AI can help practitioners create novel attack scenarios, ML’s power is in its ability to draw conclusions from vast amounts of data, including security logs, vulnerability databases, and threat intelligence. Through this insight, the ML applications can uncover threats and risks that would take a human far longer. So, what does this mean for the future of threat modeling? For one, ML should be used to validate the assumptions and the identified threats that come from a model. Let’s look at a simple example.
Consider you have an application that is built using containers, and it creates a software bill of materials (SBOM) with provenance attestation with supply chain levels for software artifacts (SLSA) and Sigstore. You have a policy gate in place that utilizes policy-as-code to verify that your build and deploy scripts adhere to organizational security policies. You build artifacts that are pushed to an artifact registry prior to deployment.
For part of your threat model, you assume that signed provenance equals a trusted build. You identify a threat that compromised base images or tampered build process, leading to a poisoned build despite a valid signature.
To validate this assumption and determine whether the threat is real, the organization can utilize ML in its CI/CD monitoring tools to correlate and validate the real-time build telemetry – something that could go unseen by a human observer. Data from registry access logs, build container diff snapshots, policy-as-code evaluations, dependency tree evaluation, and SBOM mutation patterns could all be fed into an ML evaluation to look for the following:
- Base images that consistently result in SBOMs with significant changes. This might suggest injected code despite verified provenance.
- Policy-as-code evaluations that show erratic pass/fail results when a hash changes.
- Signed attestations from a specific builder node that later result in downstream package tampering may signify a compromised build node.
Looking beyond the present day, threat modeling using ML is likely to become a more autonomous, predictive security system that integrates well with the development workflows. The ML-powered tools of the future are likely to offer validation of the threat model, while also enhancing the ability to create more realistic threat models that are based on the organization’s actual defenses.
Predictive threat intelligence integration
Section titled “Predictive threat intelligence integration”Integration of threat intelligence into threat modeling, especially practices that incorporate AI/ML, will likely supercharge the practice and better inform the predictive nature of threat modeling, allowing you to know that a particular set of techniques is being used by attackers targeting your industry and technology stack. Additionally, when we integrate AI/ML with threat intelligence in design and development practices, we get more than just updated threat models; we get automated updates and a stronger risk posture.
Imagine an organization that deploys a containerized microservice architecture. Through threat modeling, a credential stuffing risk has been identified due to weak authentication. The security operations team integrates threat intelligence from external and internal sources to monitor for API request patterns, container metrics, and SIEM data to look for indicators of credential stuffing. Threat intelligence may spot a new campaign that can bypass rate limits and tie that to bursts of login traffic from varied locations, and policy evaluation that correlates to failed device validation. Based on the threat model, the intelligence, and the integration with the development pipeline, policies can be altered automatically to lower login thresholds, and deployment templates can be updated to include anomaly detection in pre-prod canaries.
There is no doubt that the future of threat modeling will be greatly impacted by AI/ML and the integration of threat intelligence. It will revolutionize how threat models are completed and enable more people, specifically non-security experts, to create and maintain threat models while simultaneously raising the security posture of the organization through automation. Ideally, we will see threat modeling become one with the design and development of new software, where designers can simply ask, “ What’s wrong with this design?” and receive valuable feedback on how to create a more secure design.
Adapting to new IT innovations and security vulnerabilities
Section titled “Adapting to new IT innovations and security vulnerabilities”One fundamental fact about technology is that it changes quickly. I’ve been lucky enough to be in the field of technology or engineering for almost the entirety of my life. The growth of technology from when I got my first Casio calculator watch to where it is today is unrecognizable. However, that’s often the fun and exciting part of technology. For those of us in it, it keeps us on our toes. That’s even more so for those of us in security. However, there are a few things we can call out as truths as we look at technology in the future.
Cloud-native security modeling
Section titled “Cloud-native security modeling”The shift toward cloud-first strategies has created new opportunities but also added complexity for threat modeling practitioners. Traditional threat modeling analyzes the security of a system as a well-fortified castle where every entrance, every wall, and every potential weakness is relatively well known. Cloud-native environments, however, are more like analyzing the security of a sandcastle where the composition of the castle can change with a stiff breeze or a high tide. Containers spin up and down in seconds, microservices communicate across ephemeral network paths, and serverless functions execute in isolation before vanishing. And don’t forget about shadow IT. This dynamic nature means that static threat models become obsolete almost as quickly as they’re created.
The future of threat modeling must take into consideration this reality by becoming as dynamic and automated as the systems it is putting into focus. Rather than relying on manual updates to threat models every time a service is deployed or a container is updated, we need threat modeling platforms that can automatically discover new services, map their communication patterns, and identify potential attack vectors in real time. This requires a change in our current mindset, where threat modeling as a periodic design exercise becomes threat modeling as a continuous, automated process that shifts with every change in the infrastructure and system. Tools and platforms such as cloud security posture management (CSPM) focus on continuous posture assessment, looking for common weaknesses and threats while enforcing compliance. An example is Prisma Cloud, which offers threat detection using behavior analytics and threat intelligence. These powerful tools can peer into the cloud-native architectures and provide automatic (and well-informed) security insights without requiring human intervention for every microservice deployment.
Additionally, zero-trust architecture has been reimagining how we think about trust boundaries and threat models in general. Traditional threat modeling often relied on the concept of a network perimeter, where we could assume that anything inside the firewall was relatively trustworthy and anything outside was potentially hostile. Zero trust eliminates this assumption entirely, requiring us to treat every interaction, every service call, and every data access as potentially suspicious. This is likely to remove the concept of trust boundaries in future threat models, as the boundary no longer exists. Or to put it better, the boundary has become so discrete that it’s everywhere.
The evolution toward zero trust is driving threat modeling tools to become far more granular and actor- (or identity-) focused. This is good. Instead of mapping threats at the network level, future threat modeling platforms must analyze trust relationships at the identity, service, and data levels. This means understanding not just how services communicate, but who or what has permission to access what data, under what circumstances, and with what level of assurance about their identity. The complexity multiplies when you consider that in cloud environments, identities can be human users, service accounts, or even compute instances that exist for minutes or seconds.
There is some help. Cloud service providers (CSPs) have blueprints that offer prebuilt security patterns that can be customized rather than created from scratch. These blueprints aid in threat modeling and in deployment, as they are security templates that have been well tested and have been refined based on real-world attack patterns and compliance requirements. Rather than an organization having to reinvent the wheel with common cloud security patterns, teams can start with a template, allowing them to focus their threat modeling efforts on the unique aspects of their business logic and data flows. This approach can make threat modeling and deploying secure cloud architecture much easier while ensuring that common cloud security pitfalls are avoided.
The integration of infrastructure-as-code with threat modeling represents the next logical step in making security analysis as automated and repeatable as the infrastructure deployment process itself. When infrastructure definitions become code, threat models can be automatically generated from those same definitions, creating a direct link between what gets deployed and what gets analyzed for security risks. This means that every time a developer updates a Terraform configuration or modifies a Kubernetes manifest, the threat model can be automatically updated to reflect those changes. Future threat modeling platforms will need to understand the security implications of infrastructure code changes and provide immediate feedback to development teams about potential security risks before those changes reach production environments.
Emerging threat landscapes
Section titled “Emerging threat landscapes”AI/ML systems introduce entirely new categories of threats that require us to expand our threat modeling vocabulary beyond traditional concepts such as injection attacks and privilege escalation. We’ve covered in previous chapters what the various attacks are against AI systems, but recall that AI is creating opportunities as well as headaches for security teams and threat modeling in general. Data poisoning attacks, for example, don’t target the application infrastructure but rather the training data that shapes how AI models make decisions. Adversarial attacks exploit the mathematical properties of neural networks to cause misclassification, while model extraction attacks attempt to steal intellectual property by reverse-engineering AI models through careful probing. These threats operate at a conceptual level, which is a shift from the more traditional network and application security threats.
Agentic AI only increases these challenges by creating autonomous entities that can make decisions and take actions without human oversight. Unlike traditional software that follows predictable code paths, AI agents are designed to act in a way that achieves the outcome without a predictable path, making it extremely difficult to predict all possible attack scenarios. Frameworks such as MAESTRO are beginning to address these challenges, but the threat modeling community needs tools that can analyze agent behavior patterns, assess the autonomous decisions, and model potential cascading failures when AI agents interact with critical business systems. Perhaps even more critical is understanding how the AI models and agents are being designed and trained. In other words, understanding the provenance and security posture of AI models and their dependencies is non-negotiable when it comes to analyzing the threats related to the models.
Further complicating this space is the fact that technology and its applications are changing rapidly. What we understand today about the uses of AI will likely be outdated within months. This means that security teams need to get smart on how AI works, how it’s built, and how it’s used.
Regulatory and compliance evolution
Section titled “Regulatory and compliance evolution”Rather than mandating a threat modeling practice, few regulations only recommend it as a best practice. However, the trend is shifting toward making it a requirement. This shift means that threat modeling can no longer be treated as an optional security practice or something that happens only during major architectural reviews. Instead, organizations need to demonstrate that they understand threat modeling and can show auditable evidence that threat modeling has been integrated into every design decision. The challenge is that compliance with regulations such as the Digital Operational Resilience Act (DORA) and Cyber Resilience Act (CRA) is becoming increasingly specific, requiring or implying the use of threat modeling in a security practice.
Compliance-as-code represents the logical evolution of this trend, where regulatory requirements are encoded into automated policies that can be continuously validated against system architectures, development pipelines, and threat models. This approach moves compliance from a periodic audit exercise into continuous validation. Future threat modeling platforms will need to integrate deeply with governance, risk, and compliance systems to provide solid reporting while also mapping threat modeling activities to regulatory requirements. Our threat models should show continuous compliance while supporting the functions in the development process that allow for that continuous compliance.
Embracing continuous improvement and preparing for the future
Section titled “Embracing continuous improvement and preparing for the future”I started this chapter by stating that if I could predict the future of threat modeling and security, I would be rich, and I still stand by it. The only thing that is constant is change, and we, as security and technology practitioners, need to be willing and able to evolve with it. Let’s look at a few ways for us to prepare for the future changes.
Policy-as-code implementation
Section titled “Policy-as-code implementation”Understanding policy-as-code in the context of threat modeling requires us to think about security policies in the same way we think about application code: versioned, testable, and deployable artifacts. Traditional security policies often exist as static documents that are not well read and typically only accessed upon request. They are also rarely implementable as they tend to be extremely high-level documentation. They can become outdated the moment they’re published, much like trying to navigate using a paper map through a city where the roads and buildings change daily.
Policy-as-code transforms these static documents into executable rules that can be automatically applied, tested, and updated alongside the systems they’re designed to protect. Consider that we can have a policy related to securing data at rest, where we state that all customer data must be encrypted at rest using industry-standard algorithms. Pretty generic. However, we can turn this into policy-as-code that ensures that our infrastructure always deploys with encryption enabled:
# Input: Cloud storage configuration (e.g., Terraform plan or Kubernetes manifest)deny[msg] if { input.resource_type == "cloud_storage" input.environment == "production" not input.encryption.enabled msg := sprintf("Encryption at rest is required for %s in production.", [input.name])}deny[msg] if { input.resource_type == "cloud_storage" input.environment == "production" input.encryption.algorithm != "AES256" msg := sprintf("Unsupported encryption algorithm for %s. Use AES256.", [input.name])}When we utilize threat modeling frameworks such as STRIDE through automated security assessments, we’re essentially teaching our development pipelines to think like security experts, evaluating every code change against established threat patterns and policies.
Policy-as-code utilizes domain-specific languages (DSLs) for threat modeling and allows for security analysis to be both scalable and maintainable. Think of DSLs as specialized vocabularies that allow security teams to express complex threat scenarios in a format that both humans and machines can understand. Rather than requiring security experts to manually review every architectural change, organizations can codify their threat modeling expertise into automated policies that evaluate new services, data flows, and trust boundaries as they’re being developed. This is like the threat-modeling-as-code concept we covered earlier and similarly creates a modular approach to security enforcement that can adapt and scale to changing threats.
Continuous integration strategies
Section titled “Continuous integration strategies”The integration of threat modeling into continuous integration pipelines changes how organizations approach security assessment: from periodic security reviews to continuous security validation. Traditional threat modeling often resembled a security checkpoint or gate, with often unclear outcomes. Continuous threat modeling, by contrast, can create an environment where continuous monitoring and real-time guidance about potential threats are ever-present and feed into the automation tools that streamline threat modeling efforts so that they feel like a natural extension of the development process. This ensures that every code commit, every infrastructure change, and every new service deployment trigger appropriate security analysis and feedback into the threat model without slowing down development velocity.
The challenge is getting threat modeling tools that can adapt to the pace and complexity of modern development practices. Developers are accustomed to moving quickly, and this is only becoming more acute as AI begins to increase development velocity. Organizations will need to build feedback loops that provide immediate, actionable security insights to developers at the moment they’re making design decisions, rather than waiting for formal security reviews days or weeks later. Some of the most effective continuous integration strategies create iterative improvement cycles where threat modeling results inform not just immediate security decisions, but also help refine the automated policies, detection capabilities, and design practices. This creates a learning system where the quality and relevance of security analysis improve over time based on real-world development patterns and emerging threat intelligence.
Future readiness framework
Section titled “Future readiness framework”The trajectory toward advanced automation and AI/ML capabilities in threat modeling represents more than just technological advancement. It will change how we conceptualize security analysis itself. Current threat modeling approaches rely heavily on human expertise to identify potential attack vectors and assess risk levels, but future systems will leverage AI to analyze patterns across thousands of applications, learn from historical attack data, and predict emerging threats before they materialize, all while automating the update of the organization’s systems based on the patterns. Skilled security experts are not going away. They will still be needed to perform more strategic work, perform risk management activities, and orchestrate the various AI systems to perform work and increase their productivity.
Adapting to evolving geopolitical landscapes and regulatory fragmentation requires threat modeling platforms that can manage the complexity of international data sovereignty laws, export controls, and cross-border security requirements that now define the global technology ecosystem. It’s not uncommon for global organizations to build in “kill switches” in regions that are not exactly friendly. Think of modern threat modeling like trying to plan a supply chain route through a world where trade agreements, sanctions, and data transfer rules change frequently. What worked yesterday may be prohibited today, and what’s compliant in one jurisdiction may violate regulations in another. This reality means developing tools and intelligence that inform those tools of the regulatory implications of data flows, evaluate the compliance risks of using services from different geographic regions, and model the security implications of changing threat actors.
The preparation for regulatory-driven threat scenarios will require that we build threat modeling frameworks that can incorporate new compliance requirements as governments implement digital sovereignty measures. We’re seeing a rising nationalism both politically and digitally. Rather than treating regulatory compliance as a separate concern from technical security, organizations will need to invest in threat modeling platforms that understand how data localization requirements affect attack surfaces, how export control restrictions limit available security tools, and how sanctions against specific technology providers create new supply chain vulnerabilities.
The future readiness framework must also account for the accelerating pace of technological change, where new computing paradigms, deployment models, and interaction patterns emerge faster than traditional security processes can adapt – threat modeling tools that can automatically discover and analyze new architectural patterns, learn from the security implications of similar patterns in other organizations, and provide guidance for securing technologies that may not have established security best practices yet. The organizations that will thrive in this environment are those that view threat modeling not as a compliance exercise or security gate, but as a continuous learning system that helps them stay ahead of technology that never sleeps.
I hope that, throughout this book, you’ve been able to see that while we can use and implement threat modeling tools and processes, threat modeling is a mindset and cultural change. When we create an environment where every person involved in the design of a product begins by asking the fundamental question of “ What can go wrong?”, we are making progress toward more secure products and a more secure world.
Summary
Section titled “Summary”The future of threat modeling represents a transformation in how organizations approach security analysis, moving from periodic, specialist-driven exercises toward continuous, democratized practices that integrate seamlessly into modern development workflows. In this chapter, we’ve explored the evolutionary path that threat modeling is taking as it adapts to the realities of cloud-native architectures, AI integration, and the increasing pace of regulatory change across global markets.
We’ve examined how the field is addressing one of its most persistent challenges with scalability and a limited number of security specialists who have traditionally limited threat modeling adoption. Through enhanced collaboration frameworks, cross-functional integration strategies, and the democratization of threat modeling through intuitive tools, we’re seeing a shift toward making threat modeling accessible to the entire development team and beyond. This transformation is supported by significant improvements in user experience design, the emergence of code-based approaches that treat threat models as executable artifacts, and no-code solutions that enable non-technical stakeholders to participate meaningfully in security discussions.
The integration of AI and machine learning capabilities represents perhaps the most significant advancement today and into the future. This technology offers the potential to automate pattern recognition, enhance predictive threat intelligence, and scale threat modeling practices to match the velocity of modern software development. We’ve also explored how threat modeling must evolve to address emerging challenges in cloud-native environments, adapt to new regulatory frameworks shaped by geopolitical considerations, and incorporate policy-as-code implementations that enable continuous security validation throughout the development life cycle.
By understanding these emerging trends and preparing for the shift toward continuous, AI-enhanced, and democratized security analysis, organizations can position themselves to build more secure systems while maintaining the agility and innovation speed that modern business demands. The future belongs to those who can make security analysis a shared responsibility rather than a specialized gate, enabling every team member to contribute to building resilient, secure systems that evolve alongside emerging threats and changing business requirements.
Get This Book’s PDF Version and Exclusive Extras
|