A DevOps-first CLI tool for documenting threat models using HashiCorp Configuration Language (HCL).
threatcl is an open-source CLI tool that allows security engineers and DevOps teams to document threat models using HashiCorp Configuration Language (HCL). It solves the problem of cumbersome, static threat modeling documentation by providing a version-controlled, programmatic format that integrates seamlessly into modern development workflows. The tool automatically generates data flow diagrams, supports GraphQL queries, and exports to industry-standard formats.
Security engineers, DevOps practitioners, and infrastructure teams who need to integrate threat modeling into CI/CD pipelines and infrastructure-as-code practices. It's particularly valuable for organizations using Terraform or similar IaC tools.
Developers choose threatcl because it replaces manual, document-heavy threat modeling with an automated, code-first approach that fits naturally into DevOps workflows. Its unique selling point is the combination of HCL's human-readable syntax with powerful automation features like Terraform integration and GraphQL APIs.
Documenting your Threat Models with HCL
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses HashiCorp Configuration Language, making threat models easy to write, read, and version control, as shown in the example HCL snippet for defining assets and threats.
Automatically generates PNG or DOT data flow diagrams from HCL definitions, visualizing system architecture without manual drawing, leveraging the go-dfd package.
Offers a GraphQL API server and CLI queries for integrating threat model data into CI/CD pipelines, enabling automated checks and statistics extraction.
Exports threat models to JSON, OpenThreatModel (OTM), or back to HCL, ensuring compatibility with other security tools and facilitating data exchange.
Automatically generates information asset blocks from Terraform state or plan files, keeping threat models synchronized with infrastructure-as-code deployments.
When using JSON files, import modules and variables are not supported, restricting full functionality and making HCL the preferred but required format.
The Model Context Protocol server functionality is described as 'pretty beta' in the README, indicating it may be unstable or lack mature features for AI/LLM integration.
Requires familiarity with HashiCorp Configuration Language, which could be a barrier for teams not already using Terraform or similar DevOps tools.
Lacks built-in centralized management or real-time collaboration, relying entirely on version control systems for sharing and updates, which may not suit all workflows.