How fr33d3m0n/threat-modeling works
This repository is an AI-native threat-modeling skill, not a standalone scanning service: a user invokes it through Claude Code, which guides project analysis and produces security findings and reports. Its principal workflow covers eight documented phases, from understanding a project through mitigation and reporting. Distinct capabilities include code/module discovery, STRIDE analysis, tool-assisted vulnerability and binary analysis, and knowledge-base consultation. The excerpts show the discovery, phase-data, STRIDE, knowledge-query, and report-generation modules; workflow phase links and integrations are based on README documentation rather than inspected phase implementations.
Main entry points: SKILL.md Threat Modeling Skill · P1-PROJECT-UNDERSTANDING.md Project Understanding · P5-STRIDE-ANALYSIS.md STRIDE Analysis · unified_kb_query.py Knowledge Query
Components 18
Threat Workflow
- Threat Modeling Skill
SKILL.md - Project Understanding
phases/P1-PROJECT-UNDERSTANDING.md - DFD Analysis
phases/P2-DFD-ANALYSIS.md - Trust Boundaries
phases/P3-TRUST-BOUNDARY.md - Design Review
phases/P4-SECURITY-DESIGN-REVIEW.md - STRIDE Analysis
phases/P5-STRIDE-ANALYSIS.md - Risk Validation
phases/P6-RISK-VALIDATION.md - Mitigation Planning
phases/P7-MITIGATION-PLANNING.md - Report Generation
phases/P8-REPORT-GENERATION.md
Analysis
- Module Discovery
scripts/module_discovery.py - Phase Data Manager
scripts/phase_data.py - STRIDE Calculator
scripts/stride_matrix.py - Analysis Tools
Knowledge
- Knowledge Query
scripts/unified_kb_query.py - Security Knowledge Base
knowledge/security_kb.sqlite - Curated Security Data
knowledge
Reporting
- Report Renderer
scripts/report_generator.py
Other components
- Project Analyst
Connections 18
- Project Analyst → Threat Modeling Skill: invokes
README.md - Threat Modeling Skill → Project Understanding: starts workflow
README.md - Project Understanding → DFD Analysis: continues to
README.md - DFD Analysis → Trust Boundaries: continues to
README.md - Trust Boundaries → Design Review: continues to
README.md - Design Review → STRIDE Analysis: continues to
README.md - STRIDE Analysis → Risk Validation: continues to
README.md - Risk Validation → Mitigation Planning: continues to
README.md - Mitigation Planning → Report Generation: continues to
README.md - Project Understanding → Module Discovery: discovers modules
- Threat Modeling Skill → Phase Data Manager: manages phase data
- Phase Data Manager → Risk Validation: validates coverage
- STRIDE Analysis → STRIDE Calculator: calculates STRIDE
- Threat Modeling Skill → Knowledge Query: queries knowledge
- Knowledge Query → Security Knowledge Base: reads
- Knowledge Query → Curated Security Data: reads
- Report Generation → Report Renderer: renders reports
- Threat Modeling Skill → Analysis Tools: uses optionally
README.md