AI-powered threat modeling using the STRIDE methodology
pip install stride-gpt==0.21.0 Copy PIP instructions
STRIDE GPT is an AI-powered threat modelling tool that leverages Large Language Models (LLMs) to generate threat models and attack trees for a given application based on the STRIDE methodology. Users provide application details, such as the application type, authentication methods, and whether the application is internet-facing or processes sensitive data. The model then generates its output based on the provided information.
If you find STRIDE GPT useful, please consider supporting the project:
Want to customize STRIDE-GPT for your organization? Check out our comprehensive Operationalization Guide to learn how to:
The guide includes step-by-step instructions, code examples, and deployment patterns for organizations looking to scale AI-powered threat modeling across their teams.
In January 2024 I gave a talk about STRIDE GPT at the Open Security Summit. During the talk, I discussed the project's inception, its core functionalities, recent updates, and some future plans. You can watch the full presentation below:
This video is an excellent resource for anyone interested in understanding how STRIDE GPT works and how it can be used to improve threat modelling.
Upgrading: Checkpoints written by 0.20 don't resume, because the config hash changed when budget thinking was removed. Start those runs again. Findings files no longer use the skipped outcome.
Agentic AI Application Support: Added comprehensive support for threat modeling agentic AI systems with OWASP Top 10 for Agentic Applications (ASI01-ASI10) integration. Simply select "Agentic AI application" and describe your system - the LLM automatically detects architectural patterns and applies relevant threat categories. Each ASI risk is mapped to the appropriate STRIDE category for consistent threat analysis.
Generative AI Application Support: Added support for threat modeling GenAI applications with OWASP LLM Top 10 (LLM01-LLM10) integration. Select "Generative AI application" and describe your system to receive tailored LLM-specific threat analysis. Agentic AI applications include both LLM and ASI risk categories for comprehensive coverage.
MAESTRO-Inspired Architectural Pattern Detection: Enhanced agentic threat analysis with automatic detection of architectural patterns from application descriptions, inspired by the Cloud Security Alliance MAESTRO framework. The LLM now identifies and applies pattern-specific threats for:
Cross-Layer Threat Analysis: Threat models now include cross-component attack chains that show how compromise in one architectural layer can enable attacks on others (e.g., RAG poisoning → agent goal hijack → tool misuse → data exfiltration).
Enhanced Improvement Suggestions: For agentic applications, improvement suggestions now prompt for specific architectural details such as agent framework, inter-agent communication protocols, sandbox mechanisms, and circuit breaker implementations.
OpenAI Model Updates: Updated to GPT-5.2 series models (gpt-5.2, gpt-5.2-pro, gpt-5-mini, gpt-5-nano, gpt-5, gpt-4.1). Removed deprecated models (gpt-4o, gpt-4o-mini, o3, o3-mini, o4-mini).
Anthropic Claude 4.5 Models: Updated to Claude 4.5 series (claude-sonnet-4-5, claude-haiku-4-5, claude-opus-4-5). Added "Enable Extended Thinking" checkbox for enhanced reasoning capabilities on any Claude model. Increased max tokens to 32k (standard) and 48k (thinking mode).
Google Gemini 3 Preview: Added Gemini 3 preview models (gemini-3-pro-preview, gemini-3-flash-preview) alongside Gemini 2.5 models. Extended thinking mode support to Gemini 3 models.
Mistral Model Updates: Updated to latest versioned Mistral models including Mistral Large 3, Medium 3.1, Small 3.2, Ministral 3 (8B/14B), and Magistral 1.2 (Medium/Small).
New Project Logo: Refreshed branding with a cleaner, minimal shield + neural network design.
Bug Fix: Fixed issue where threat model output would disappear after clicking the download button.
This release added support for the following models:
GPT4o mini: I've added support for OpenAI's recently released GPT4o mini model. GPT4o mini is a cost-efficient small model that still provides high-quality responses for threat modelling tasks.
Gemini 1.5 Pro (stable): Users can now choose from either the stable or preview versions of the Gemini 1.5 Pro model.
DREAD Risk Scoring: STRIDE GPT now supports DREAD risk scoring, allowing users to assign risk scores to identified threats based on the DREAD model. This feature provides a more comprehensive threat assessment and helps prioritise mitigation efforts.
Gherkin Test Cases: Users can now generate Gherkin test cases based on the identified threats. This feature helps bridge the gap between threat modelling and testing, ensuring that security considerations are integrated into the testing process.
UI Enhancements: I've refreshed the user interface making it easier to navigate and interact with the application and its features.
Mistral API Integration: Users can now choose to use LLMs provided by Mistral AI to generate threat models, attack trees and mitigation suggestions. This provides an alternative to OpenAI's GPT models, offering greater flexibility and choice for users.
Refined Prompts: With more people using STRIDE GPT for work, I've updated the threat model prompt templates to encourage the LLMs to generate more comprehensive outputs. Users should now see multiple threats identified within each STRIDE category.
Public Roadmap: I've created a public roadmap to provide visibility into upcoming features and improvements.
UI Enhancements: I've made some minor updates to the UI to accommodate the new Mistral API integration and improve the overall user experience.
pip install stride-gpt This installs the stride-gpt command. The CLI and the Streamlit web UI are now distinct products — pip install stride-gpt gives you the lean CLI with no Streamlit footprint. To run the web UI from source, see Option 2 below.
git clone https://github.com/mrwadams/stride-gpt.git cd stride-gpt Install with uv (recommended — uv.lock is the single source of truth for dependencies):
# CLI plus the Streamlit web UI deps uv sync Or install just the CLI with pip:
pip install -e . (Optional) Set up environment variables:
cp .env.example .env Edit .env to add your API keys — or configure them later by running stride-gpt and using the /config command in the interactive REPL, or via the Streamlit UI.
The Streamlit web UI ships as a Docker image:
docker pull mrwadams/stridegpt:latest For the CLI, use pip install stride-gpt — there's no separate CLI image. If you need a sandboxed CLI, roll your own from a minimal Python base image.
STRIDE-GPT is organised as a small monorepo: one shared Python library, one or more apps that consume it.
stride-gpt/ ├── stride_gpt/ # shared library + Python CLI (core, agent loop, prompts, schemas, models) ├── apps/ │ └── web/ # Streamlit web UI ├── tests/ # pytest suite └── pyproject.toml # single project file; web UI deps live in the `web` dependency-group The apps/ directory is the slot for additional deployable frontends — for example, a future Node/TypeScript CLI would live alongside apps/web/. The Python CLI itself stays in stride_gpt/cli.py because it's tightly coupled to the shared library.
Agentic codebase analysis — the agent autonomously explores a codebase, plans its analysis, and produces a STRIDE threat model:
# Analyze the current directory stride-gpt analyze . # Specify a model and auto-approve the analysis plan stride-gpt analyze ./my-app --worker-model anthropic/claude-sonnet-5-5 -y # Export as JSON, SARIF, or browser-viewable HTML stride-gpt analyze . -o report.json -f json # also writes report.html alongside stride-gpt analyze . -o report.sarif -f sarif stride-gpt analyze . -o report.html -f html Every analysis also auto-saves a JSON and an HTML companion to ~/.stride-gpt/reports/analyze/, so the browser-viewable view is always one click away even when you run without -o.
Note on cost: Agentic analysis is thorough — the agent makes many LLM calls and reads many files as it explores. Token usage and cost scale with codebase size and your chosen model, and a full run on a large repository against a frontier model can be expensive. Set spending limits in your provider dashboard before running, and consider faster/cheaper models for first passes.
Quick single-shot mode — generate a threat model from a text description (like the Streamlit UI, but in the terminal):
# Read description from a file stride-gpt quick -i app-description.txt # Pipe from stdin echo "A web API that processes payments..." | stride-gpt quick Interactive REPL — launch an interactive session with tab completion and history:
stride-gpt Inside the REPL, type /help to see available commands and flags. The version is shown under the ASCII banner at startup. See the Interactive REPL cheat sheet below for the full command and shortcut reference.
Launch the REPL with stride-gpt (no arguments), then use these commands and shortcuts.
Commands — type a slash command at the prompt:
/analyze, /quick, and /reports accept flags: -o/--output , -f/--format , -y/--yes, and -i/--input (/quick). Type /help for the full list.
stride-gpt --version # prints e.g. "stride-gpt 0.21.0" and exits Common flags:
Each tier also accepts --worker-api-key / --worker-api-base / --worker-max-tokens (and the --architect-* equivalents). Run stride-gpt analyze --help or stride-gpt quick --help for the complete list.
Structured intermediates — when -o is used, three JSON siblings are written alongside the report so the run can be audited or consumed by downstream tools:
A subsystem's outcome is one of completed, budget_exhausted (the call or tool budget ran out and it reported in a final round), parse_failed (its closing answer couldn't be read), unfinished (it stopped without calling finish after reporting threats, which are kept), or error (it raised — see error_class). The first two count as analysed; the rest make the run partial, and the markdown and HTML reports say so under the affected subsystem.
The format flag (-f) controls the report artefact only; the siblings are always JSON. File paths in the manifest and findings are redacted (./… when under the working directory, ~/… when under $HOME) so a manifest is safe to share. The auto-archive at ~/.stride-gpt/reports/{analyze,quick}/ is unaffected — siblings are only emitted when you pass -o.
stride-gpt reports # List recent reports stride-gpt reports 1 # View report #1 stride-gpt reports 1 -o r.json -f json # Export a report Streamlit Web UI The web UI is a separate app from the CLI. Launch it with:
streamlit run apps/web/main.py Open the provided URL in your browser and follow the on-screen steps.
docker run -p 8501:8501 --env-file .env mrwadams/stridegpt Sample output Every stride-gpt analyze and stride-gpt quick run emits a markdown report by default (with JSON, SARIF, and a self-contained HTML view available via -f). The markdown groups threats by subsystem in STRIDE tables, adds a cross-cutting section for threats that span components, and closes with a run summary. Optional columns (OWASP LLM/ASI, Insider Category, MITRE ATT&CK, Evidence) appear only when a run populates them.
Threats from analyze cite the code they came from. The agent quotes a snippet, the snippet is matched against the file on disk, and the matched line range is recorded — so the Evidence column shows app/auth/jwt.py:14-19, the HTML report shows the quoted code, and each SARIF result points at those exact lines rather than at the subsystem's file list. A snippet that can't be found is marked unverified rather than dropped, so you can see what the model claimed and judge it.
Below is the markdown from a run against a fictional payments API, so you can see the shape of the output before running the tool. It is a real render from the report engine, not a mock-up.
# STRIDE Threat Model: acme-payments-api > Generated by STRIDE-GPT on 2026-07-16T09:42:00Z ## Overview A Python FastAPI service that accepts card payments, stores customer profiles in PostgreSQL, and calls a third-party payment processor. Authentication is handled by JWT bearer tokens issued by an internal auth service; the API is internet-facing behind an API gateway. ## Data Flow Diagram ```mermaid flowchart LR Client[Client App] -->|HTTPS + JWT| Gateway[API Gateway] Gateway --> API[Payments API] API -->|SQL| DB[(PostgreSQL)] API -->|HTTPS| Processor[Payment Processor] ``` ## Authentication & Authorization ### Files Analyzed - `app/auth/jwt.py` - `app/auth/dependencies.py` ### Threats | Threat Type | Scenario | Potential Impact | MITRE ATT&CK | Evidence | |-------------|----------|------------------|--------------|----------| | Spoofing | An attacker forges a JWT using a weak or leaked signing secret to impersonate another customer. | Full account takeover and unauthorized access to stored payment methods. | T1550.001 (Application Access Token) | app/auth/jwt.py:14-19 | | Elevation of Privilege | A standard user calls an admin-only refund endpoint that only checks authentication, not role. | Unauthorized refunds and financial loss. | T1068 (Exploitation for Privilege Escalation) | app/auth/dependencies.py:31-38 | ### Recommendations - Enforce role checks on every privileged route via a shared dependency, not per-handler logic. - Rotate and store the JWT signing secret in a managed secrets store rather than an env file. ## Payments & Data Storage ### Files Analyzed - `app/payments/routes.py` - `app/db/models.py` ### Threats | Threat Type | Scenario | Potential Impact | MITRE ATT&CK | Evidence | |-------------|----------|------------------|--------------|----------| | Information Disclosure | Full card numbers are logged in request debug logs when a payment fails. | PCI-DSS violation and exposure of cardholder data to anyone with log access. | T1552.001 (Credentials In Files) | app/payments/routes.py:88-91 | | Tampering | The payment amount is taken from a client-supplied field and not re-validated server-side against the order. | A user pays less than the order total by editing the request body. | | app/payments/routes.py:42-44 | ### Recommendations - Redact PANs before logging and route logs through a PCI-scoped sink. - Derive the charge amount from the server-side order record, never the request body. ## Cross-Cutting Threats | Threat Type | Scenario | Potential Impact | MITRE ATT&CK | Affected Subsystems | |-------------|----------|------------------|--------------|---------------------| | Denial of Service | No rate limiting on the payment endpoint lets an attacker exhaust the processor quota and DB connections. | Legitimate payments fail during the attack; possible processor throttling. | T1499 (Endpoint Denial of Service) | Authentication & Authorization, Payments & Data Storage | ## Summary - **Total threats identified**: 5 - **Subsystems analyzed**: 2 - **Cross-cutting threats**: 1 - **LLM calls**: 34 - **Tool calls**: 58 - **Architect model**: OpenAI API/gpt-6-sol - **Worker model**: Anthropic API/claude-sonnet-5-5 stride-gpt quick produces the same table shape from a written description, collapsed into a single Application subsystem instead of per-subsystem findings.
STRIDE GPT is designed for local, single-user deployment. When using the tool:
Your API keys are sensitive credentials that can incur charges on your account.
When you generate threat models, STRIDE GPT sends data to your chosen LLM provider:
If deploying STRIDE GPT for multiple users (not the default use case):
We maintain dependencies and monitor for vulnerabilities:
See SECURITY.md for comprehensive security information including automated security scanning, vulnerability reporting, and secure development practices.
Found a security issue? Please report it responsibly:
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Both files in this release have provenance metadata.
threat-modeling stride security owasp ai-security llm
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 7, 2026.
Both files in this release have been uploaded with provenance metadata.
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.




