Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

168 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

ThreatForge

Open-source threat modeling for teams that ship.

Getting Started  •  Features  •  File Format  •  Roadmap  •  Contributing  •  Website

License Platform Download size


ThreatForge — Cloud Microservices threat model


ThreatForge is a cross-platform desktop app for threat modeling. It produces human-readable, git-diffable YAML files and uses AI to accelerate threat analysis. Built with Tauri v2 and React. Runs on macOS, Windows, and Linux.

The Problem

Threat modeling tools fall into two camps. On one side: Microsoft's Threat Modeling Tool — free, but Windows-only, with a legacy UI and a .tm7 file that is an XML object graph — technically text, unreadable in review. On the other: procurement-oriented enterprise platforms like ThreatModeler, which acquired IriusRisk in 2026.

There's nothing in between for developers who want a modern interface, a clean file format, and AI assistance — without a procurement cycle.

ThreatForge fills that gap.

Features

Visual Data Flow Diagrams

Drag-and-drop canvas for building data flow diagrams. Typed components span services, databases, messaging, infrastructure, security, clients, networking, cloud/platform, and more, alongside resizable trust boundaries and text annotations. Connection handles auto-route between elements.

STRIDE Threat Engine

Built-in rule engine that applies Microsoft's STRIDE-per-element methodology to your architecture. Generates threats automatically based on element types and data flow patterns. Cross-boundary flows get elevated severity. No AI required — works fully offline.

AI-Assisted Analysis

Chat with Claude or GPT about your threat model. The AI sees your full architecture — elements, data flows, trust boundaries, and existing threats — and can suggest new threats, propose mitigations, or answer security questions. One-click to accept AI-suggested threats into your model.

Bring your own API key. Supports Anthropic (Claude Opus 4, Sonnet 4, Haiku 3.5) and OpenAI (GPT-4o, GPT-4o Mini). Desktop keys are AES-256-GCM encrypted at rest; browser keys are AES-GCM encrypted in IndexedDB under a non-extractable key.

Import from Microsoft TMT

Import existing .tm7 files from Microsoft's Threat Modeling Tool. ThreatForge converts elements, data flows, trust boundaries, and threats to the native .thf format — preserving positions and STRIDE categories. No more Windows lock-in.

Pre-built Templates

Start from six production-quality templates: Cloud Microservices, E-Commerce Platform, Mobile Banking, SaaS Platform, IoT Smart Building, and Healthcare System. Each includes a complete data flow diagram with elements, trust boundaries, data flows, and STRIDE threats.

Themes

Built-in dark and light themes can follow the system preference.

Keyboard-First Workflow

  • Command palette (Cmd/Ctrl+K) with fuzzy search across all actions and components
  • Keyboard shortcuts for file operations, canvas navigation, panel switching, and more
  • Undo/redo with full state history
  • Resizable panels — palette on the left, properties/threats/AI on the right
  • Canvas minimap, grid snapping, and arrow-key nudging
  • Copy/paste elements between models
  • Interactive onboarding guides for new users
  • Signed, verifiable auto-updates are planned; see the release-signing runbook

File Format

The .thf format is a single YAML file — human-readable, git-diffable, and portable. No binary blobs, no sidecar files, no vendor lock-in.

# ThreatForge Threat Model
version: "1.0"
metadata:
  title: "Payment Processing Service"
  author: "Alex Chen"
  created: 2026-03-15

elements:
  - id: api-gateway
    type: process
    name: "API Gateway"
    trust_zone: dmz
    technologies: [nginx, rate-limiting]
    position: { x: 400, y: 200 }

  - id: payment-db
    type: data_store
    name: "Payment Database"
    trust_zone: internal
    encryption: AES-256-at-rest
    position: { x: 700, y: 200 }

data_flows:
  - id: flow-1
    from: api-gateway
    to: payment-db
    protocol: PostgreSQL/TLS
    data: [transaction_records]

trust_boundaries:
  - id: boundary-1
    name: "Corporate Network"
    contains: [api-gateway, payment-db]

threats:
  - id: threat-1
    title: "SQL Injection on payment queries"
    category: Tampering
    element: api-gateway
    severity: high
    mitigation:
      status: mitigated
      description: "Parameterized queries via ORM"

Every element, flow, boundary, and threat is a discrete YAML block. Adding a component or resolving a threat produces a clean, reviewable diff. See the full file format spec.

Getting Started

Prerequisites

Install and Run

git clone https://github.com/exit-zero-labs/threat-forge.git
cd threat-forge
npm install
npm run tauri dev

The dev server starts with hot reload on port 1420.

Build

npm run tauri build

Produces a native desktop binary for your platform (a few megabytes on most platforms; the Linux AppImage bundles its runtime and is much larger).

Test

npx vitest --run                                       # Frontend test suite
cargo test --manifest-path src-tauri/Cargo.toml        # Rust test suite
npx playwright test                                    # Browser E2E test suite

For a local agent (or a contributor) to launch a single deterministic browser scenario in headed mode and inspect its evidence, see docs/runbooks/running-agent-e2e-scenarios.md.

Lint

npx biome check .                                      # TypeScript (incl. e2e/)
npx tsc --noEmit -p tsconfig.e2e.json                  # E2E TypeScript types
cargo clippy --manifest-path src-tauri/Cargo.toml      # Rust

Local CI

npm run ci:local          # Native lint + test + web/Worker build
npm run ci:docker         # Docker lint + test (clean environment)
npm run ci:docker:build   # Docker lint + test + Tauri build

Tech Stack

Layer Technology
Desktop framework Tauri v2 (Rust backend, native webview)
Frontend React 19, TypeScript (strict), Tailwind CSS 4, shadcn/ui
Diagramming ReactFlow / xyflow
State management Zustand
File format Custom YAML schema (serde_yaml)
Testing Vitest + React Testing Library, cargo test, Playwright
Linting Biome (TypeScript), Clippy (Rust)
CI/CD GitHub Actions (matrix: macOS, Windows, Linux)

Architecture

┌──────────────────────────────────────────────────┐
│                 Tauri v2 Shell                    │
├────────────────────┬─────────────────────────────┤
│   React Frontend   │        Rust Backend         │
│                    │                             │
│  ReactFlow Canvas ◄──IPC──► File I/O (YAML)     │
│  Zustand Stores   ◄──IPC──► STRIDE Engine       │
│  AI Chat Pane     ◄──IPC──► AI Providers (SSE)  │
│  Settings / UI    ◄──IPC──► Key Storage (AES)   │
└────────────────────┴─────────────────────────────┘
         │                        │
         ▼                        ▼
    Local .thf files       LLM APIs (optional)
                        (Anthropic / OpenAI)

All AI calls go directly from the user's machine with the user's API key. No proxy, no telemetry on model content. See the full architecture doc.

Security

ThreatForge is a security tool — the bar for security in our own code is high.

  • API keys use AES-256-GCM encrypted storage on desktop; browser keys are AES-GCM encrypted in IndexedDB under a non-extractable key
  • AI calls go directly to the provider — no intermediary server
  • LLM output is treated as untrusted; raw HTML is escaped by default
  • Strict CSP — no inline scripts, no remote code loading
  • Auto-update signature verification remains a roadmap Phase 0 gate
  • Supply chain checks include Dependabot, lockfile integrity, dependency review, and GitHub CodeQL default setup

To report a vulnerability, see SECURITY.md. Do not open a public issue.

Contributing

Contributions welcome. See CONTRIBUTING.md for setup instructions, code style, and PR guidelines.

Planning is public in GitHub Issues and the Threat Forge project. See the roadmap for product direction.

Areas where help is especially valuable:

  • STRIDE threat rule expansion
  • Import/export (OWASP Threat Dragon .json, PDF export)
  • Accessibility (WCAG compliance)
  • Documentation and example threat models

Support the Project

ThreatForge is free and open source. If it's useful to you:

  • Sponsor on GitHub — recurring or one-time
  • Star the repo — helps others find the project
  • Contribute — code, docs, threat rules (CONTRIBUTING.md)
  • Share — tell your team or post about it

License

Copyright 2026 Exit Zero Labs LLC. Licensed under the Apache License 2.0.


Built by Exit Zero Labs. Ship clean. Build forward.

About

Open-source threat modeling tool with a modern canvas, git-friendly YAML files, and AI-assisted STRIDE analysis — the alternative to Microsoft's TMT that works on Mac, Windows, and Linux.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

13 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages