https://github.com/awslabs/threat-designer
Threat Designer is a GenerativeAI application designed to automate and streamline the threat modeling process for secure system design.
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.9%) to scientific vocabulary
Keywords
Repository
Threat Designer is a GenerativeAI application designed to automate and streamline the threat modeling process for secure system design.
Basic Info
Statistics
- Stars: 140
- Watchers: 2
- Forks: 17
- Open Issues: 5
- Releases: 13
Topics
Metadata Files
README.md
Threat Designer: AI-powered threat modeling for secure system design
Check the blogpost: Accelerate threat modeling with generative AI for an in-depth overview of the solution.
Architecture diagram

Agent logic
Description
Threat Designer is an AI-driven agent designed to automate and streamline the threat modeling process for secure system design.
Harnessing the power of large language models (LLMs), it analyzes system architectures, identifies potential security threats, and generates detailed threat models. By automating this complex and time-intensive task, Threat Designer empowers developers and security professionals to seamlessly incorporate security considerations from the earliest stages of development, enhancing both efficiency and system resilience.
The project deploys resources running on the following AWS services:
- AWS Amplify
- Amazon API Gateway
- Amazon Cognito
- AWS Lambda
- Amazon DynamodB Tables
- Amazon S3 Bucket
Repository Structure
.
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── assets
├── backend
│ ├── app
│ ├── authorizer
│ ├── dependencies
│ └── threat_designer
├── deployment.sh
├── destroy.sh
├── index.html
├── infra
├── package.json
├── public
├── src
└── vite.config.js
Features
- Submit architecture diagrams and analyze for threats.
- Update threat modeling results via the user interface.
- Replay threat modeling based on your edits and additional input.
- Export results in pdf/docx format.
- Explore past threat models via the
Threat Catalogpage.






Prerequisites
The following tools must be installed on your local machine:
- Node.js (v18 or later) and npm
- curl
- jq
- Python (v3.12 or later) and pip
- Terraform CLI
- AWS CLI configured with appropriate credentials
AWS Bedrock Model Access
You must enable access to the following model in your AWS region:
- Claude 4 Sonnet
To enable Claude, follow the instructions here.
Installation and Deployment
- Clone the Repository
bash
git clone https://github.com/awslabs/threat-designer.git
cd threat-designer
- Make the deployment script executable:
bash
chmod +x deployment.sh
- Export AWS credentials
```bash
Option I: Export AWS temporary credentials
export AWSACCESSKEYID="yourtempaccesskey" export AWSSECRETACCESSKEY="yourtempsecretkey" export AWSSESSIONTOKEN="yourtempsessiontoken" export AWSDEFAULTREGION="yourregion"
Option II: Export AWS Profile
export AWSPROFILE="yourprofile_name" ```
- Deploy with required parameters:
Note: Make sure to provide a valid email address during the deployment wizard. A user in Amazon Cognito User Pool will be created and the temporary credentials will be sent to the configured email address.
bash
./deployment.sh
Accessing the Application
After successful deployment, you can find the Login URL in the output of ./deployment:
sh
Application Login page: https://dev.xxxxxxxxxxxxxxxx.amplifyapp.com
Configuration Options
Model Selection
If you want to use a different model than "Claude 4 Sonnet", update the variables model_main and model_struct in ./infra/variables.tf with the correct model ID and max_token configuration:
```hcl variable "modelmain" { type = object({ id = string maxtokens = number }) default = { id = "us.anthropic.claude-sonnet-4-20250514-v1:0" max_tokens = 64000 } }
variable "modelstruct" { type = object({ id = string maxtokens = number }) default = { id = "us.anthropic.claude-sonnet-4-20250514-v1:0" max_tokens = 16000 } } ```
Note: This application has been primarily tested with "Claude 4 Sonnet". While other Bedrock models may work, using different models might lead to unexpected results. The default model is set to us.anthropic.claude-sonnet-4-20250514-v1:0.
Reasoning boost will only work with us.anthropic.claude-sonnet-4-20250514-v1:0
Clean up
Empty the Architecture Bucket, following instructions here
Make the destroy script executable:
bash
chmod +x destroy.sh
- Export AWS credentials
```bash
Option I: Export AWS temporary credentials
export AWSACCESSKEYID="yourtempaccesskey" export AWSSECRETACCESSKEY="yourtempsecretkey" export AWSSESSIONTOKEN="yourtempsessiontoken" export AWSDEFAULTREGION="yourregion"
Option II: Export AWS Profile
export AWSPROFILE="yourprofile_name"
```
- Execute the script:
bash
./destroy.sh
Contributing
See CONTRIBUTING for more information.
License
This library is licensed under the Apache License. See the LICENSE file.
Owner
- Name: Amazon Web Services - Labs
- Login: awslabs
- Kind: organization
- Location: Seattle, WA
- Website: http://amazon.com/aws/
- Repositories: 914
- Profile: https://github.com/awslabs
AWS Labs
GitHub Events
Total
- Create event: 25
- Issues event: 5
- Release event: 10
- Watch event: 100
- Delete event: 7
- Issue comment event: 26
- Push event: 29
- Public event: 1
- Pull request review comment event: 51
- Pull request review event: 51
- Pull request event: 36
- Fork event: 11
Last Year
- Create event: 25
- Issues event: 5
- Release event: 10
- Watch event: 100
- Delete event: 7
- Issue comment event: 26
- Push event: 29
- Public event: 1
- Pull request review comment event: 51
- Pull request review event: 51
- Pull request event: 36
- Fork event: 11
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 0
- Total pull requests: 3
- Average time to close issues: N/A
- Average time to close pull requests: 4 minutes
- Total issue authors: 0
- Total pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 2.67
- Merged pull requests: 2
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 3
- Average time to close issues: N/A
- Average time to close pull requests: 4 minutes
- Issue authors: 0
- Pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 2.67
- Merged pull requests: 2
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- kimberleyhallifax (3)
- andr780 (1)
Pull Request Authors
- edvinhallvaxhiu (16)
- dependabot[bot] (7)
- pacohope (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- @aws-sdk/client-ssm ^3.614.0 development
- @babel/core ^7.24.9 development
- @babel/eslint-parser ^7.24.8 development
- @babel/preset-react ^7.24.7 development
- @cloudscape-design/jest-preset ^2.0.36 development
- @vitejs/plugin-react ^4.3.4 development
- eslint ^8.57.1 development
- eslint-config-prettier ^10.0.2 development
- eslint-plugin-prettier ^5.2.3 development
- eslint-plugin-react ^7.37.4 development
- eslint-plugin-react-hooks ^5.2.0 development
- eslint-plugin-unused-imports ^4.1.4 development
- jest ^29.7.0 development
- lint-staged ^15.2.7 development
- prettier ^3.5.2 development
- vite ^6.1.0 development
- @aws-amplify/auth ^6.10.2
- @aws-amplify/ui-react ^6.9.1
- @cloudscape-design/chat-components ^1.0.4
- @cloudscape-design/components ^3.0.839
- @cloudscape-design/design-tokens ^3.0.42
- @cloudscape-design/global-styles ^1.0.31
- @emotion/react ^11.11.4
- @emotion/styled ^11.11.5
- @types/node ^20.14.10
- @types/react ^18.3.3
- antd ^5.19.2
- aws-amplify ^6.12.3
- axios ^1.7.2
- babel-jest ^29.7.0
- docx ^9.1.1
- dompurify ^3.1.6
- jspdf ^2.5.2
- jspdf-autotable ^3.8.4
- lodash ^4.17.21
- prop-types ^15.8.1
- react ^18.3.1
- react-device-detect ^2.2.3
- react-dom ^18.3.1
- react-router ^6.24.1
- react-router-dom ^6.24.1
- styled-components ^6.1.11
- PyJWT ==2.10.1
- cryptography ==44.0.0
- langchain-aws ==0.2.14
- langgraph ==0.2.71