pytm

Generate DFDs and STRIDE threat lists from Python-defined system architecture.

232|38|Updated Jan 18, 2026
One-click install
npx skills add https://github.com/rohunj/claude-build-workflow --skill pytm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pytm
Source: https://github.com/rohunj/claude-build-workflow/tree/main/skills/security/pytm
Command: npx skills add https://github.com/rohunj/claude-build-workflow --skill pytm

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Python-based threat modeling uses pytm to encode system architecture and STRIDE threats as code, enabling reproducible security analyses.

Core Features & Use Cases

  • Programmatic threat modeling with a code-first approach using pytm to define boundaries, components, and data flows.
  • Automatic generation of data flow diagrams (DFDs) and STRIDE threat identification for security reviews.
  • Integration into CI/CD and architecture reviews to produce threat reports and mitigations, supporting shift-left security.

Quick Start

Install pytm and graphviz, then define a threat model in Python and run the process to generate threat reports and DFD diagrams.

Frequently Asked Questions about pytm

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate STRIDE threat modeling in a CI/CD pipeline?

To automate STRIDE threat modeling in a CI/CD pipeline, you define system architecture and threats as Python code using pytm, which then generates DFDs, threat lists, and mitigation recommendations automatically.

What is code-first threat modeling and how does it work?

Code-first threat modeling is the process of defining boundaries, components, and data flows programmatically as Python code, enabling reproducible security analyses and automatic STRIDE threat identification for architecture reviews.

How do I generate a Data Flow Diagram for security architecture reviews?

You generate a Data Flow Diagram for security architecture reviews by encoding your system boundaries and data flows in a Python script using pytm, then running the process to output the DFD automatically.

Do I need graphviz installed to generate DFDs and threat reports with pytm?

Yes, you need to install graphviz alongside pytm to successfully generate Data Flow Diagrams and process your Python scripts to output threat reports and mitigation recommendations.

Can I use Python to identify STRIDE threats and risk mitigations for my application?

Yes, you can use Python to identify STRIDE threats and risk mitigations by programmatically defining your application's architecture and data flows with pytm, which automatically outputs identified threats and corresponding mitigation strategies.