Why Threat Modeling First?
Traditional scanners blindly check for patterns. Heimdall takes a threat-informed approach:Threat modeling reduces false positives by providing context. A SQL query in an internal admin tool has different risk than one in a public API endpoint.
STRIDE Methodology
Tyr applies the industry-standard STRIDE framework:Spoofing
Can an attacker impersonate another user or component?
Tampering
Can data be modified without authorization?
Repudiation
Can actions occur without being logged or auditable?
Information Disclosure
Can sensitive data leak to unauthorized parties?
Denial of Service
Can the system be made unavailable?
Elevation of Privilege
Can an attacker gain higher permissions?
Threat Model Structure
Every threat model contains four key components:1. Summary
A high-level analysis of the application’s architecture and security posture:2. Trust Boundaries
Points where data crosses between trust zones:Tyr identifies both external and internal boundaries. Internal boundaries matter because lateral movement is a common attack vector.
3. Attack Surfaces
Every reachable endpoint or input vector, ranked by risk:4. Data Flows
How sensitive data moves through the system:How Tyr Works
Tyr operates in three phases:Phase 1: Reconnaissance
Collects structural intelligence from the code index without any LLM calls:src/pipeline/tyr/mod.rs
- Tech Stack
- Entry Points
- Routes
- Security Patterns
Phase 2: LLM Analysis
Tyr sends the reconnaissance data to the configured LLM with a structured prompt:src/pipeline/tyr/mod.rs
src/pipeline/tyr/mod.rs
Tyr uses a low temperature (0.2) for consistent, deterministic output. This is crucial for reliable threat modeling across multiple scans.
Phase 3: Storage
The threat model is stored in thethreat_models table:
How It Guides Hunt Agents
Each attack surface becomes an investigation target:src/pipeline/hunt/mod.rs
- Surface name: “Payment webhook handler”
- Description: Full STRIDE analysis with threat categories
- Risk level: Priority signal (critical/high/medium/low)
- File location:
src/webhooks/payment.rs:67 - Endpoint:
POST /api/webhooks/payment
High-risk surfaces get the same investigation depth as low-risk ones. The risk level helps with reporting priority, not investigation scope.
Example Threat Model
Here’s a real threat model generated for a payment processing API:View Full Threat Model
View Full Threat Model
Viewing Threat Models
Access threat models through the API:Performance
Tyr typically completes in 30-120 seconds depending on codebase size:- Reconnaissance: 5-15 seconds (no LLM calls)
- LLM analysis: 20-90 seconds (depends on model and prompt size)
- Storage: < 1 second
Tyr’s reconnaissance phase is completely free — no LLM costs until Phase 2.
Next Steps
Hunt Agent
See how Hunt uses threat models to guide investigations
Scan Pipeline
Understand where Tyr fits in the complete workflow
Findings Management
Review and remediate discovered vulnerabilities
Sandbox Validation
Learn how Garmr validates findings with real exploits