threat-composer

awslabsApache-2.0活跃维护

一款轻量级威胁建模工具,帮助安全团队快速上手威胁建模,缩短从开始到产出价值的时间。

A simple threat modeling tool to help humans to reduce time-to-value when threat modeling

v1.0.91发布于 2026-11-06 00:27 UTC793star128fork同步于 2026-11-10 23:54 UTC

怎么上手

由 README 提炼,执行前请确认
uv tool install --from "git+https://github.com/awslabs/threat-composer.git#subdirectory=packages/threat-composer-ai" threat-composer-ai
threat-composer-ai-cli /path/to/your/code
硬件要求按 README 说明

README 未说明本地硬件要求;AI CLI 与 MCP Server 依赖 AWS Bedrock,会产生推理费用

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

AWS 开源的威胁建模工具集,用结构化语法和 AI 辅助帮你快速产出可迭代的威胁模型

一款轻量级威胁建模工具,帮助安全团队快速上手威胁建模,缩短从开始到产出价值的时间。

核心能力

  • 用 Threat Grammar 结构化编写威胁语句并给出建议
  • 支持架构图与数据流图可视化
  • 用 AI CLI 分析代码库自动生成初始威胁模型
  • 提供洞察仪表盘给出质量指标与改进建议
  • 威胁模型存为 JSON,便于 Git 版本管理

容易踩的坑

AI CLI 与 MCP Server 需配置 AWS_PROFILE 和 AWS_REGION 并依赖 Bedrock,会产生推理费用;AI CLI 与 MCP Server 标注为 Experimental,接口可能变动;自托管 Web 应用需先克隆仓库再执行 ./scripts/deployDev.sh 部署到 AWS 账户

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v1.0.91
  1. v1.0.91最新正式版2026-11-06 · 2026-11-06 00:27 UTC

    1.0.91 (2026-11-06)

    Bug Fixes

    • ai: Keep MCP stdout clean and accept null for optional tool args (#371) (0147b21)
  2. v1.0.902026-11-05 · 2026-11-05 05:25 UTC
    查看更新说明

    1.0.90 (2026-11-05)

    Bug Fixes

    • ai: Include the DFD icons in the built package (#373) (7a801e5)
  3. v1.0.892026-11-04 · 2026-11-04 05:13 UTC
    查看更新说明

    1.0.89 (2026-11-04)

    Bug Fixes

    • ai: Exclude git metadata files from the eval fixture pin (#372) (8f6cba7)
  4. v1.0.882026-11-01 · 2026-11-01 23:59 UTC
    查看更新说明

    1.0.88 (2026-11-01)

    Features

    • ai: Add a consistency eval for repeated runs (#355) (744ae2b)
  5. v1.0.872026-10-21 · 2026-10-21 20:55 UTC
    查看更新说明

    1.0.87 (2026-10-21)

    Bug Fixes

    • ai: Pin strands-agents version floors to avoid placeholder resolution (#362) (#363) (a840c8d)

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    Threat Composer

    An ecosystem of threat modeling tools to help humans reduce time-to-value when threat modeling.

    Animated gif of Full mode

    Live Demo | Documentation | Getting Started

    What is Threat Composer?

    Threat Composer is a threat modeling ecosystem that helps you identify security issues and develop strategies to address them in the context of your system. The various tools has been designed to support the iterative and non-linear nature of real-world threat modeling.

    Why Threat Composer?

    1. Helps you get started quickly - The AI-assisted CLI and MCP Server analyze your source code to generate a starter threat model, so you never face a blank page. Human expertise and participation remain essential to refine, validate, and evolve the threat model for your specific context
    2. Makes threat identification easier - Uses "Threat Grammar" to help you iteratively write useful threats, with full examples for inspiration
    3. Provides quality insights - Includes an insights dashboard to help identify areas for improvement
    4. Supports non-linear workflows - Designed for how threat modeling actually works in practice
    5. Enables iteration - Supports "living" threat models that evolve with your system

    Key Features

    • Threat Statement Composition: Structured threat grammar with adaptive suggestions
    • Visual Diagrams: Architecture and data flow diagram support
    • Assumptions Tracking: Document and link assumptions to threats and mitigations
    • Insights Dashboard: Quality metrics and improvement suggestions
    • Threat & Mitigation Packs: Reusable threat and mitigation libraries (self-hosted)
    • Multiple Export Formats: JSON, Markdown, DOCX, and PDF
    • Workspace Management: Work on multiple threat models simultaneously
    • Version Control Friendly: JSON format works seamlessly with Git

    Threat Composer Ecosystem

    Threat Composer is available in multiple complementary tools to fit your workflow:

    🌐 Web Application

    Hosted or Self-Hosted Static Website

    Status: Stable

    • GitHub Pages: Try the live demo
    • Self-Hosted: Deploy to your AWS account with full customization
    • Features: Full threat modeling capabilities, browser-based storage, import/export

    📖 Web App Documentation

    🤖 AI-Powered CLI & MCP Server

    Automated Threat Modeling

    Status: Experimental

    • CLI: Analyze codebases and generate starter threat models automatically
    • MCP Server: Workflow management and schema validation for AI assistants
    • Uses AWS Bedrock with multi-agent architecture
    • Note: Bedrock inference costs apply - see pricing

    📖 AI/CLI/MCP Documentation

    🔌 VS Code Extension

    Native Threat Modeling in Your IDE

    Status: Stable

    • Edit Threat Composer .tc.json files directly in VS Code
    • Integrated with AWS Toolkit extension
    • Full-featured editor with version control support

    📖 VS Code Extension Documentation

    🧩 Browser Extension

    View Threat Models on the Web

    Status: Experimental

    • One-click viewing of Threat Composer .tc.json files on GitHub, GitLab, Bitbucket and Amazon CodeCatalyst
    • Available for Chrome and Firefox

    📖 Browser Extension Documentation

    Getting Started

    Try It Now

    Web Application: Visit the live demo to start threat modeling immediately in your browser.

    VS Code: Install the AWS Toolkit extension to view and edit local .tc.json files.

    Use the AI CLI & MCP Server

    Generate threat models automatically from your codebase with the CLI, or integrate with AI assistants using the MCP server:

    # Install with uv (provides both CLI and MCP server)
    uv tool install --from "git+https://github.com/awslabs/threat-composer.git#subdirectory=packages/threat-composer-ai" threat-composer-ai
    
    # Use the CLI to analyze your codebase
    threat-composer-ai-cli /path/to/your/code
    

    MCP Server Configuration (for Kiro, Cline, Claude Desktop, etc.):

    {
      "mcpServers": {
        "threat-composer-ai": {
          "command": "threat-composer-ai-mcp",
          "env": {
            "AWS_PROFILE": "your-profile-name",
            "AWS_REGION": "us-west-2"
          }
        }
      }
    }
    

    Or run directly with uvx (no installation required):

    {
      "mcpServers": {
        "threat-composer-ai": {
          "command": "uvx",
          "args": [
            "--from",
            "git+https://github.com/awslabs/threat-composer.git#subdirectory=packages/threat-composer-ai",
            "threat-composer-ai-mcp"
          ]
        }
      }
    }
    

    The MCP server provides tools for starting workflows, monitoring progress, managing sessions, and validating threat models against the Threat Composer schema.

    💡 Best Experience: For the best experience when using the CLI from VS Code/Kiro terminal or when using AI assistants via MCP, install the AWS Toolkit extension which includes the Threat Composer VS Code extension. This allows you to view and edit the generated .tc.json files directly in your IDE with full visual editing capabilities.

    See AI/CLI/MCP Documentation for complete installation and usage instructions.

    Self-Host the Web Application

    Deploy Threat Composer to your AWS account:

    git clone https://github.com/awslabs/threat-composer.git
    cd threat-composer
    ./scripts/deployDev.sh
    

    See Web App Documentation for detailed deployment options including CI/CD setup.

    Example Threat Model

    We've included an example threat model of the Threat Composer Web App itself. This provides a reference point for getting started.

    To view it, switch to the Example workspace in the application. Note: Changes in the Example workspace are not saved.

    Documentation

    User Guides

    Developer Resources

    Learning Resources

    Feedback & Support

    We value your input!

    Quick Links

    For Users

    For Developers

    Repository Structure

    This is a monorepo containing multiple packages:

    PackageDescriptionDocumentation
    threat-composerCore UI components libraryREADME
    threat-composer-appWeb application (SPA)README
    threat-composer-app-browser-extensionBrowser extensionREADME
    threat-composer-infraAWS CDK infrastructureREADME
    threat-composer-aiAI CLI & MCP server (Experimental)README

    Contributing

    Contributions are welcome! Please see our Contributing Guidelines for details on:

    • Code of conduct
    • Development setup
    • Pull request process
    • Coding standards

    Security

    See CONTRIBUTING for information on reporting security issues.

    License

    This project is licensed under the Apache-2.0 License. See the LICENSE file for details.

    Acknowledgments

    Built with: