-
Notifications
You must be signed in to change notification settings - Fork 0
Creating Your First Threat Model
This guide walks you through creating your first threat model in TMI, from start to finish.
- You have accessed TMI and are signed in
- You're familiar with basic threat modeling concepts
- You have a system or application you want to analyze
-
Navigate to the Dashboard
- After signing in, you'll see your TMI dashboard
- Click "New Threat Model" or "Create Threat Model"
-
Fill in Basic Information
-
Name: Give your threat model a descriptive name
- Example: "Payment Processing System"
-
Description: Provide a brief overview
- Example: "Threat model for the e-commerce payment flow"
-
Framework: Choose a threat modeling framework
- STRIDE (recommended for applications)
- CIA (for infrastructure/data)
- Custom (define your own; requires creating a new framework definition file; see frameworks).
-
Name: Give your threat model a descriptive name
-
Set Initial Permissions (optional)
- By default, you're the owner
- You can add collaborators later
- If you want to make your threat model visible to everyone on your TMI instance, add permission for the group "everyone".
-
Click "Create"
Data flow diagrams (DFDs) help visualize your system's components and interactions.
-
In your threat model, click "New Diagram" or "Add Diagram"
-
Name your diagram
- Example: "Payment Flow Overview"
- Use descriptive names for multiple diagrams
-
Add Components
TMI diagrams support several component types:
-
Process: A component that transforms data
- Example: "Payment Processor", "Authentication Service"
-
Data Store: Where data is stored
- Example: "Customer Database", "Transaction Log"
-
External Entity: External user or system
- Example: "Customer", "Payment Gateway"
-
Trust Boundary: Security boundary between trust zones
- Example: Separating internet-facing components from internal systems
-
Process: A component that transforms data
-
Add Data Flows
- Connect components with arrows showing data movement
- Label flows with data description
- Example: "Credit Card Info", "User Credentials", "Order Data"
Here's a simple payment system diagram:
[Customer] --credit card--> [Web Server]
|
payment request
↓
[Payment Processor] --transaction--> [Payment Gateway]
|
confirmation
↓
[Transaction DB]
- Start simple: Begin with high-level components
- Add detail gradually: Create separate diagrams for subsystems
- Show trust boundaries: Identify where trust zones change
- Label everything: Clear labels make threat identification easier
- Use consistent naming: Keep component names clear and consistent
With your diagram in place, identify potential threats.
If you chose STRIDE, consider each category:
- Spoofing: Can an attacker impersonate a user or component?
- Tampering: Can an attacker modify data or code?
- Repudiation: Can actions be denied after the fact?
- Information Disclosure: Can sensitive data be exposed?
- Denial of Service: Can the system be made unavailable?
- Elevation of Privilege: Can an attacker gain unauthorized access?
-
Click "New Threat" or "Add Threat"
-
Fill in threat details:
-
Title: Short, descriptive title
- Example: "SQL Injection in Payment Query"
-
Category: Select from your framework
- Example: "Tampering" (in STRIDE)
- Description: Detailed description of the threat
- Impact: What happens if exploited?
- Likelihood: How likely is this threat?
- Risk Level: High, Medium, Low
- Status: New, Investigating, Mitigated, Accepted
-
Title: Short, descriptive title
-
Link to diagram components (optional but recommended)
- Associate threats with specific diagram elements
- Helps track where threats exist in your system
-
Add mitigation strategies:
- Describe how to address the threat
- Link to related security controls
- Track implementation status
Title: "Customer Credit Card Data Interception"
Category: Information Disclosure (STRIDE)
Description: An attacker could intercept credit card data transmitted between the customer browser and web server if TLS is not properly implemented.
Impact: HIGH - Exposure of customer payment information, regulatory penalties, reputational damage
Likelihood: MEDIUM - Requires network position, but possible on public WiFi
Mitigation:
- Implement TLS 1.3 for all connections
- Use HSTS headers
- Regular TLS configuration audits
Document your analysis using Notes.
-
Click "New Note" or "Add Note"
-
Give it a title
- Example: "Security Assumptions", "Threat Modeling Decisions"
-
Use Markdown for formatting:
## Security Assumptions - Users authenticate via OAuth 2.0 - All data in transit uses TLS 1.3+ - Payment card data is not stored ## Trust Boundaries - Internet to DMZ - DMZ to internal network - Application tier to data tier
-
Include Mermaid diagrams for visual documentation:
```mermaid flowchart LR A[Customer] --> B[Web App] B --> C[Payment Service] C --> D[Payment Gateway] ```
- Document assumptions: What are you assuming about security?
- Record decisions: Why did you make certain choices?
- Note out of scope items: What's not included?
- Link to external docs: Reference architecture docs, security policies
Extend your threat model with custom metadata.
-
Select any object (threat model, diagram, threat)
-
Find the metadata section
-
Add key-value pairs:
compliance: PCI-DSSowner: security-teamenvironment: productionreview-date: 2025-06-01
- Categorization: Group related items
- Compliance tracking: Link to compliance requirements
- Workflow integration: Connect to external systems
- Custom reporting: Filter and report based on metadata
Share your threat model with your team.
-
Click "Share" or "Manage Access"
-
Add collaborators:
- Enter email address or username
- If you want to share the document with everyone on your TMI instance, add the group "everyone".
- If you are authenticated with SAML or your OAuth provider includes groups claims, you can choose a group you belong to.
- Select permission level:
- Reader: View only
- Writer: Reader, and additionally can edit
- Owner: Writer, and can change permissions or delete the threat model
- Enter email address or username
-
Send invitations
- Multiple users can edit simultaneously
- See collaborator cursors and changes in real-time
- WebSocket-based synchronization
- No need to refresh or save manually
- Set clear roles: Assign appropriate permission levels
- Communicate changes: Use notes to document major changes
- Review together: Use real-time editing for review sessions
- Version tracking: Review change history
Link threats to your issue tracking system by adding the issue URL to your threat.
-
In a threat, find the "Issue Tracker" section
-
Create or link an issue:
- Click "Create Issue" to create new
-
Track implementation:
- Issue status syncs with TMI
- Track remediation progress
See Issue Tracker Integration for detailed setup.
- Create high-level architecture diagram
- Create detailed diagrams for each major component
- Identify threats using STRIDE
- Document security controls
- Track remediation in issue tracker
- Create network topology diagram
- Show trust boundaries and security zones
- Identify threats using CIA framework
- Document existing controls
- Prioritize gaps
- Create sequence diagrams showing API flows
- Focus on authentication and authorization
- Identify data validation threats
- Document rate limiting and abuse prevention
- Track API security requirements
- Begin with a manageable scope
- Expand as you become comfortable
- Don't try to model everything at once
- Prioritize high-risk areas
- Don't get lost in low-risk details
- Focus on actionable threats
- Threat modeling is not one-and-done
- Update as your system evolves
- Regular reviews keep models relevant
- Involve developers, architects, security
- Different perspectives find different threats
- Make it a team activity
Now that you've created your first threat model:
- Learn more about Working with Data Flow Diagrams
- Deep dive into Managing Threats
- Explore Collaborative Threat Modeling
- Review Security Best Practices
- See Common Issues for troubleshooting
- Check the FAQ for common questions
- Visit Getting Help for support
- Using TMI for Threat Modeling
- Accessing TMI
- Creating Your First Threat Model
- Understanding the User Interface
- Working with Data Flow Diagrams
- Managing Threats
- Collaborative Threat Modeling
- Using Notes and Documentation
- Metadata and Extensions
- Planning Your Deployment
- Deploying TMI Server
- Deploying TMI Web Application
- Setting Up Authentication
- Database Setup
- Component Integration
- Post-Deployment
- Monitoring and Health
- Database Operations
- Security Operations
- Performance and Scaling
- Maintenance Tasks