Threat Modeling With AWS Security Agent
AWSOfficialPublished by AWS
- Skill
- Review and audit
- Security
- Apache-2.0
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill enables an AI agent to perform automated threat modeling on software design and requirement documents. By leveraging the AWS Security Agent, it analyzes project documentation against the source code to identify potential security risks using the STRIDE methodology. The process involves packaging the workspace, uploading relevant specification files to S3, initiating a threat model job, and polling for results to provide a structured security report.
What it does
- Performs automated STRIDE-based threat modeling on design and requirement files.
- Integrates with AWS infrastructure to execute security scans and manage threat model jobs.
- Generates detailed security reports including threat statements, severity levels, and mitigation recommendations.
- Tracks security posture changes by comparing current specifications against existing source code.
- Provides periodic status updates during long-running analysis jobs.
- Saves comprehensive findings to local project documentation for review.
When to use it
- When you need to perform a security review of project requirements or design documents.
- When you want to identify potential security risks introduced by new architectural changes.
- When you need to conduct a formal STRIDE analysis on your current software project.
- When you need to verify if proposed design changes align with existing security postures.
Advantages
- Automates complex threat modeling tasks, reducing manual security review overhead.
- Provides standardized security reporting based on industry-recognized STRIDE methodology.
- Directly links security findings to specific project assets and documentation.
- Enables continuous security assessment within the development lifecycle.
Usage examples
- “Run a threat model review on my design.md file.”
- The agent will package the workspace, upload the design document to AWS, initiate the threat model job, and report back with identified threats once the analysis is complete.
- “Check if the new requirements.md introduces any security risks.”
- The agent performs a STRIDE analysis comparing the new requirements against the current codebase and provides a report detailing any critical or high-severity security concerns.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/aws/threat-modeling-with-aws-security-agent/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip threat-modeling-with-aws-security-agent.zip -d .agents/skills
Documentation by AWS
AWS Security Agent — Threat Model Review
Analyze spec documents (requirements.md, design.md) against the source code to identify security-posture changes using STRIDE methodology. No prior scan needed.
Local state
Read .security-agent/config.json for agent_space_id and region. If missing, run the setup-security-agent workflow inline first.
Resolving the values you need
| Placeholder | How to resolve |
|---|---|
<id> (agent space) | config.agent_space_id |
<region> | config.region (default us-east-1) |
<account> | aws sts get-caller-identity --query Account --output text |
<role-arn> | arn:aws:iam::<account>:role/SecurityAgentScanRole |
<bucket> | security-agent-scans-<account>-<region> |
Workflow
Pre-checks. Read config, verify agent space, resolve values.
Collect spec files. Identify the
requirements.mdand/ordesign.mdthe user is working on. Use absolute paths. Ask if unclear which files to review.Zip the workspace (same exclusions as code scan):
cd <absolute-workspace-path> zip -r /tmp/source.zip . \ -x ".git/*" -x ".security-agent/*" -x "node_modules/*" \ -x "__pycache__/*" -x ".venv/*" -x "venv/*" \ -x "dist/*" -x "build/*" -x "target/*" \ -x ".mypy_cache/*" -x ".pytest_cache/*" -x ".tox/*" \ -x ".next/*" -x "cdk.out/*" -x ".DS_Store" -x "*.pyc"Upload source zip:
SCAN_ID="tm-$(date +%s)-$(openssl rand -hex 3)" WORKSPACE_ID=$(printf '%s' "$(pwd)" | md5sum | cut -c1-12) aws s3 cp /tmp/source.zip s3://<bucket>/security-scans/source/${WORKSPACE_ID}/source.zip --expected-bucket-owner <account>Upload spec files:
aws s3 cp /path/to/requirements.md s3://<bucket>/security-scans/threat-models/${SCAN_ID}/specs/requirements.md --expected-bucket-owner <account> aws s3 cp /path/to/design.md s3://<bucket>/security-scans/threat-models/${SCAN_ID}/specs/design.md --expected-bucket-owner <account>Create threat model:
aws securityagent create-threat-model --agent-space-id <id> --title <title> \ --service-role <role-arn> \ --assets sourceCode=[{s3Location=s3://<bucket>/security-scans/source/${WORKSPACE_ID}/source.zip}] \ --scope-docs '[{"s3Location":"s3://<bucket>/security-scans/threat-models/'${SCAN_ID}'/specs/requirements.md"},{"s3Location":"s3://<bucket>/security-scans/threat-models/'${SCAN_ID}'/specs/design.md"}]'Capture
threatModelId.Start threat model job:
aws securityagent start-threat-model-job --agent-space-id <id> --threat-model-id <tm-id>Capture
threatJobId.Persist to
scans.jsonwithscan_type: "THREAT_MODEL".Tell user: "Threat model review started. Runtime varies with workspace size. I'll check every 2 minutes — say 'stop polling' to opt out."
Poll every 2 minutes:
aws securityagent batch-get-threat-model-jobs --agent-space-id <id> --threat-model-job-ids <tj-id>Only respond when status changes.
On COMPLETED → fetch threats:
aws securityagent list-threats --agent-space-id <id> --threat-job-id <tj-id>If
nextToken, paginate with--next-token.
Findings presentation
Each threat includes: statement, severity, stride category, threatImpact, recommendation, impactedAssets.
🟣 CRITICAL: {statement}
STRIDE: {stride}
Impact: {threatImpact}
Assets: {impactedAssets}
Recommendation: {recommendation}
🔴 HIGH: {statement}
...Write full report to .security-agent/findings-{scan_id}.md. Call out any threat that represents a regression from the prior design.
Rules
Threat model reviews are standalone — no prior scan needed
Poll every 2 minutes, not faster
At least one spec file is required
Use absolute paths for workspace and spec files
Title:
threat-model-<feature-name>(no spaces)
Files
- ATTRIBUTION.mdAdded by AutoGineer964 B
- LICENSELicence file added by AutoGineer9.9 KiB
- NOTICELicence file added by AutoGineer67 B
- SKILL.md4.3 KiB
NOTICE
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs a command-line tool
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- AWS
- Publisher
- AWS (Official)
- Source
- aws/agent-toolkit-for-aws · plugins/aws-agents-for-devsecops/skills/threat-modeling-with-aws-security-agent · commit 0a218f8
- Licence
- Apache License 2.0 (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- NOTICE (added by AutoGineer from NOTICE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by AWS.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download threat-modeling-with-aws-security-agent.zip