agentleFS
aws-solutionsaws-solutions/konductor/skills/threat-modeling/SKILL.md

threat-modeling

Skill12 starsChanged 2 months agoApache-2.0View on GitHub

Generates AWS service threat models using STRIDE methodology. Use when asked for a threat model or STRIDE analysis, the security risks of a design, or prep for a security review. Covers architecture analysis, threats, and security controls.

54 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use iac-security, container-security and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • hardw00tSkill

    iac-security

    Infrastructure-as-Code security scanning router for Terraform, CloudFormation, Kubernetes manifests, Helm, ARM/Bicep. Orchestrates Checkov, tfsec, Terrascan, KICS, kubesec, kube-linter, Polaris, cfn-lint/cfn-nag, and OPA/Conftest. Use when auditing IaC for misconfigurations, scanning Terraform plans, validating K8s security policies, checking cloud infrastructure compliance, or authoring custom policy-as-code (Rego).

    Also in 4 projects that use this

  • vbrevikSkill

    container-security

    Scan container images, Dockerfiles, docker-compose files, and Kubernetes manifests for security misconfigurations and vulnerabilities. Uses Trivy for image/IaC scanning and Kubescape for K8s policy compliance. Falls back to regex-based Dockerfile and K8s YAML analysis when tools are unavailable. Produces STIG V-ID-tagged findings for /stig-compliance pipeline. Use when (1) reviewing Docker or K8s configuration changes, (2) scanning container images for OS-level CVEs, (3) validating K8s RBAC and NetworkPolicy configuration, (4) before deployment. Works air-gapped with pre-downloaded vulnerability database.

    Also in 4 projects that use this

  • wgpsecSkill

    prompt-injection

    AI/LLM 间接 Prompt 注入攻击。当目标 AI 系统会处理外部数据源(网页、文档、邮件、数据库、API 返回)时使用。覆盖间接注入、工具链劫持、RAG 投毒、数据外泄等技术。OWASP LLM Top 10 #1 漏洞类别

    Also in 4 projects that use this

  • narlyseorgSkill

    secure-code-review

    Use when reviewing source code for security vulnerabilities, performing static analysis of a codebase, auditing code for injection flaws, authentication issues, cryptographic weaknesses, insecure deserialization, SSRF, path traversal, memory safety bugs, hardcoded secrets, or misconfigurations. Use when the user asks to find security bugs in code, assess code quality from a security perspective, or review pull requests for security implications. Use when performing dependency audits, secrets scanning, or configuration review of application source.

    Also in 4 projects that use this

  • allanninalSkill

    threat-hunting

    Hunt threats using Sigma detection rules and security analysis techniques. Use when investigating security incidents, creating detection rules, or analyzing suspicious activity.

    Also in 3 projects that use this

  • testified-ossSkill

    exploratory-testing

    Guide exploratory testing sessions including charter creation, session-based testing, heuristics application, and finding documentation. Use when planning exploratory testing, conducting test sessions, or documenting discoveries.

    Also in 3 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

24 rules. 0 are common, 22 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 48 edited versions we read keep these.

  • 22

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when:

    line 16
  2. Distinctive:

    Collect Service Information: - Document service functionality and security context

    line 34
  3. Distinctive:

    Analyze Template: - Use the Threat Model Template below, plus any reference models

    line 35
  4. Distinctive:

    CRITICAL: Follow these principles to ensure accurate, non-speculative threat modeling:

    line 74
  5. Distinctive:

    No Component Hallucination: Never assume or infer the existence of security controls, services, or architecture components not clearly …

    line 77
  6. Distinctive:

    Validation-First Approach: When components or security implementations are unclear, ask clarifying questions rather than making assumptions …

    line 78
  7. Distinctive:

    Evidence-Based Threats: Only identify threats that apply to the actual documented implementation, not theoretical possibilities

    line 80
  8. Distinctive:

    Document out-of-scope elements explicitly

    line 90
  9. Distinctive:

    Consider threat model objective (launch, compliance, security review)

    line 92
  10. Distinctive:

    Ask clarifying questions for ambiguous information

    line 104
  11. Very specific:

    Use the Threat Model Template below unless the user gave a template_url:

    line 121
  12. Distinctive:

    Document architecture focusing on defined scope:

    line 141
  13. Distinctive:

    Create STRIDE-based threat categorization, rating each threat's likelihood and impact and deriving its priority from both

    line 157
  14. Distinctive:

    Use consistent threat numbering (T-001, T-002, etc.)

    line 158
  15. Distinctive:

    Document comprehensive mitigations for identified threats:

    line 165
  16. Distinctive:

    Ensure each threat has at least one mitigation

    line 173
  17. Distinctive:

    Ensure all required sections are complete

    line 181
  18. Distinctive:

    Create appendices for terminology, references, etc.

    line 182
  19. Distinctive:

    Default sections for the final document:

    line 194
  20. Very specific:

    Template Access: If a template_url can't be read, tell the user and use the Threat Model Template above

    line 238
  21. Distinctive:

    Scope Definition: Start with specific features, consider data flows and trust boundaries, focus on highest risk components

    line 240
  22. Distinctive:

    Document Integration: Create consolidated information maps, resolve contradictions, ask user for precedence clarification

    line 242
  23. Distinctive:

    Mitigation Mapping: Start with highest priority threats, use AWS standard controls, look for patterns in reference models

    line 246
  24. Distinctive:

    No mitigations defined for HIGH severity threats

    line 254

“Common” is measured: kept by at least 6 in 10 of the 48 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Threat Modeling

Overview

Generates threat models through a 9-step workflow: gathers architecture documentation, applies STRIDE methodology, maps security controls to threats, and produces a complete threat model document.

Usage

Use this skill when:

  • Completing system design and ready to identify security risks
  • Preparing for a security review or AppSec engagement
  • Documenting security controls for compliance

Core Concepts

STRIDE Methodology

Analyzes threats across six categories: Spoofing (identity), Tampering (data integrity), Repudiation (audit trails), Information Disclosure (data leaks), Denial of Service (availability), and Elevation of Privilege (authorization bypass). Each component in the architecture is evaluated against all six categories.

Workflow

Apply the Quality Gate before presenting output.

  1. Clarify Scope - Define threat model boundaries with user
  2. Gather Design Documents - Collect and analyze architecture documentation
  3. Collect Service Information - Document service functionality and security context
  4. Analyze Template - Use the Threat Model Template below, plus any reference models
  5. Create Introduction - Build project background and scope documentation
  6. Document Architecture - Detail system design and components
  7. Identify Threats - Systematic threat analysis using STRIDE methodology
  8. Define Mitigations - Map security controls to identified threats
  9. Generate Final Document - Compile complete threat model

Working Without Questions

If the user says not to ask questions, or nobody is there to answer, skip every "confirm with user" step and the closing "Fix these issues?" prompt. Make the smallest reasonable assumption instead, and record each one in the document's assumptions table with what changes if it is wrong. A reviewer can then check the assumptions in one place instead of hunting for them in the prose.

Change-Only Threat Models

When the request covers a change to an existing design, model only what the change adds or alters: new routes, new trust boundaries, and existing components whose behavior changes. Continue the threat and mitigation numbering from where the user says to start. Cite controls from the base design only when that design documents them.

Context Management

The design documents and reference models can be large. Process at most 2-3 large documents per batch, reference models included. Summarize each document as you read it and work from the summaries. Build the final document section by section. If context runs short, continue with the information you have and list what was left out.

Required Parameters

Core Parameters

  • service_name (required): AWS service name for threat modeling
  • threat_model_scope (required): Specific scope boundaries (may be narrower than full service)
  • design_document_urls (optional): Architecture documents, design specs, security reviews
  • existing_threat_models (optional): Related threat model references
  • template_url (optional): a team threat model template to use instead of the Threat Model Template below

Collection Guidelines

  • Collect all required parameters upfront in single interaction
  • Validate parameters before proceeding with analysis
  • Clarify scope boundaries explicitly with user
  • Support multiple URLs as comma-separated lists
  • Encourage optional parameters for comprehensive analysis

Security Assessment Principles

CRITICAL: Follow these principles to ensure accurate, non-speculative threat modeling:

  • Document-Driven Analysis: Base all threat assessments solely on components explicitly documented in design materials
  • No Component Hallucination: Never assume or infer the existence of security controls, services, or architecture components not clearly specified
  • Validation-First Approach: When components or security implementations are unclear, ask clarifying questions rather than making assumptions (see Working Without Questions when you cannot ask)
  • Scope Adherence: Limit threat analysis to documented architecture within the defined scope boundaries
  • Evidence-Based Threats: Only identify threats that apply to the actual documented implementation, not theoretical possibilities
  • User Confirmation: Validate understanding of architecture components and security controls with the user before proceeding with threat analysis

Implementation Steps

Step 1: Clarify Threat Model Scope

Define clear scope boundaries with user:

  • Identify in-scope components, features, and aspects
  • Document out-of-scope elements explicitly
  • Confirm scope understanding and alignment
  • Consider threat model objective (launch, compliance, security review)
  • Suggest appropriate scope boundaries based on common practices

Step 2: Gather and Analyze Design Documents

Process design documents in batches, following Context Management above:

Document Processing:

  • Categorize documents by type (architecture, API specs, security reviews)
  • Extract scope-relevant information
  • Identify gaps and inconsistencies between documents
  • Ask clarifying questions for ambiguous information
  • Consolidate summaries into unified architecture view

Step 3: Gather Service Information

Collect essential service information within defined scope:

  • Core functionality and architecture components
  • Data handling and storage mechanisms
  • Authentication and authorization systems
  • Integration points with other services
  • Security concerns and requirements
  • Deployment model (internal, external, multi-tenant)
  • Confirm understanding of critical security aspects

Step 4: Analyze Template and Reference Models

Use the Threat Model Template below unless the user gave a template_url:

  • Extract required sections and structure from the template
  • Process reference models in batches, following Context Management above
  • Identify applicable patterns and approaches
  • Consolidate template guidance for threat model generation

Step 5: Create Introduction Section

Build comprehensive introduction with user:

  • Project background and business context
  • Concise service overview
  • Clear scope documentation (in-scope and out-of-scope)
  • Security tenets aligned with AWS principles
  • Key assumptions with potential mitigations
  • Administrative information (AppSec reviews, team info, documentation references)

Step 6: Document System Architecture

Document architecture focusing on defined scope:

  • High-level design with architecture diagrams
  • Low-level design for in-scope components
  • Authentication/authorization mechanisms
  • API specifications (methods, operations, authorization, accessibility)
  • Asset inventory (new/existing assets, usage, data classifications, security considerations)
  • Clear indication of out-of-scope components

Step 7: Identify Threats

Systematic threat identification using STRIDE methodology:

  • Identify threat actors (external and internal)
  • Trace every credential, token, and secret through the flow: where it is created, sent, stored, logged, and forwarded. Leaks usually happen in URLs, headers, logs, and emails, not in the primary store
  • Analyze security anti-patterns within scope
  • Create STRIDE-based threat categorization, rating each threat's likelihood and impact and deriving its priority from both
  • Use consistent threat numbering (T-001, T-002, etc.)
  • Focus on in-scope assets and components
  • Suggest 10-15 potential threats for consideration
  • Confirm threat assessment with user

Step 8: Define Mitigations

Document comprehensive mitigations for identified threats:

  • Baseline Security Controls (BSCs) implementation
  • System-specific mitigations with threat mapping
  • Implementation status for each mitigation: Implemented (the design documents it), Partial, Not implemented, or Unknown. Do not mark something Implemented because it is a common default
  • State each mitigation as a concrete change to this design (which component, which setting or API), not "consider X"
  • Security testing strategy as a table: test ID, type, the concrete input or action, expected result, and the threat IDs it covers
  • Consistent mitigation numbering (M-001, M-002, etc.)
  • Ensure each threat has at least one mitigation
  • Confirm mitigation strategies with user

Step 9: Generate Final Document

Compile complete threat model document:

  • Organize all sections according to template structure
  • Ensure all required sections are complete
  • Create appendices for terminology, references, etc.
  • Review document for completeness against the Quality Gate
  • Validate final document accuracy with user
  • Offer to save document to file and suggest review process

Document Structure Validation:

  • Main document contains STRIDE threats and system-specific mitigations
  • Clear separation maintained between core analysis and supplementary guidance

Threat Model Template

Default sections for the final document:

Introduction

  • Project Background and Service Overview
  • Scope (In-Scope and Out-of-Scope components)
  • Security Tenets
  • Assumptions table: each assumption, what changes if it is wrong, and the threats it affects
  • Administrative Information (AppSec reviews, team info, documentation)

System Architecture

  • High-Level and Low-Level Design
  • Authentication and Authorization mechanisms
  • API Specifications and Asset Inventory

Threat Analysis

  • Trust Boundaries and Data Flows
  • Threat Actors and Security Anti-Patterns
  • STRIDE coverage matrix: each in-scope component against the six categories, with the threat IDs in each cell or "none found"
  • Threat table: ID, STRIDE category, component, description, likelihood, impact, priority, and mitigation IDs on the same row

Mitigations

  • Baseline Security Controls (BSCs)
  • System-Specific Mitigations table
  • Security Testing Strategy table

Residual Risk and Open Decisions

  • Risks that remain after the mitigations, and decisions the owners must make or accept
  • A launch recommendation: which mitigations must ship first
  • The Quality Gate results for this document

Appendix

  • Appendix A: Terminology and Monitoring/Logging
  • Appendix B: References and supporting documentation

Troubleshooting Guidelines

Common Issues and Solutions

Template Access: If a template_url can't be read, tell the user and use the Threat Model Template above

Scope Definition: Start with specific features, consider data flows and trust boundaries, focus on highest risk components

Document Integration: Create consolidated information maps, resolve contradictions, ask user for precedence clarification

Threat Identification: Review STRIDE methodology, consider components separately, reference similar service models

Mitigation Mapping: Start with highest priority threats, use AWS standard controls, look for patterns in reference models

Quality Gate

CRITICAL (must fix):

  • Authentication and authorization threats not analyzed
  • Data in transit and at rest encryption not addressed
  • No mitigations defined for HIGH severity threats
  • External trust boundaries not identified

IMPORTANT (should fix):

  • Threats lack likelihood and impact ratings
  • STRIDE categories not fully covered for each component
  • Security testing strategy not included
  • A threat has no mitigation
  • Scope, assumptions, or limitations not documented

SUGGESTION:

  • Mitigations lack implementation status
  • Could reference specific AWS security services for each mitigation

Present findings as: CRITICAL → IMPORTANT → SUGGESTION. Ask: "Fix these issues? [y/n]". Skip the question when scope_confirmed is true or the user asked for no questions. If both apply, scope_confirmed wins: the caller owns the fix step, so report the findings and leave fixing to the caller. Fix the findings yourself only in no-questions mode without scope_confirmed.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.