agentsclimarketplace

Threat modeling

Skill kinhluan/skills/.agent-skills/threat-modeling

πŸš€ Professional Multi-Agent Skills

Install
npx -y skills add kinhluan/skills --skill threat-modeling

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Security threat modeling and risk assessment using STRIDE, Attack Trees, and DREAD scoring. Use when designing secure architecture, conducting security design reviews, assessing risks, or creating threat models for applications, systems, or cloud infrastructure.

SKILL.md

8.2 KB, as published. Nobody here has run it

Threat Modeling

Systematic approach to identifying, quantifying, and addressing security threats in software architecture and system design.

"Threat modeling is the key to a secure design." β€” Adam Shostack


🎯 When to Use

  • Designing new systems or architecture
  • Conducting security design reviews
  • Assessing risks before implementation
  • Reviewing third-party integrations
  • Cloud migration security planning
  • Compliance and audit preparation

πŸ”§ Core Methodologies

STRIDE

Threat CategoryDescriptionExample
SpoofingPretending to be someone elseFake JWT token, stolen credentials
TamperingModifying data or codeMan-in-the-middle, code injection
RepudiationDenying an actionMissing audit logs, no transaction records
Information DisclosureExposing sensitive dataSQL injection, verbose error messages
Denial of ServiceMaking system unavailableDDoS, resource exhaustion
Elevation of PrivilegeGaining unauthorized accessPrivilege escalation, IDOR

DREAD Scoring

FactorQuestionScore (1-10)
DamageHow bad is the damage?1=Minimal, 10=Total compromise
ReproducibilityHow easy to reproduce?1=Very hard, 10=Always works
ExploitabilityHow easy to exploit?1=Expert only, 10=Script kiddie
Affected UsersHow many users affected?1=None, 10=All users
DiscoverabilityHow easy to discover?1=Very hard, 10=Obvious

Risk Score = (D + R + E + A + D) / 5

Risk LevelScore Range
Critical9.0-10.0
High7.0-8.9
Medium4.0-6.9
Low0.1-3.9

πŸ—οΈ Threat Modeling Process

Step 1: Define Scope & Assets

Identify:
β”œβ”€ What are we building? (system, feature, API)
β”œβ”€ What data flows through it?
β”œβ”€ Who are the users/actors?
β”œβ”€ What are the trust boundaries?
└─ What are the high-value assets?

Step 2: Create Data Flow Diagram (DFD)

Elements:
β”œβ”€ External Entity (rectangle) β€” User, third-party service
β”œβ”€ Process (circle) β€” Application, microservice
β”œβ”€ Data Store (two horizontal lines) β€” Database, cache
β”œβ”€ Data Flow (arrow) β€” HTTP request, message queue
└─ Trust Boundary (dashed line) β€” Network perimeter, tenant boundary

Example: E-commerce Checkout

[User] --HTTPS--> [Web App] --SQL--> [Database]
    |                  |
    |                  | --API--> [Payment Gateway]
    |                  |
Trust Boundary 1   Trust Boundary 2

Step 3: Identify Threats (STRIDE-per-Element)

For each element in DFD, apply STRIDE:

External Entity:
  β”œβ”€ Spoofing: Can someone impersonate this user?
  └─ Repudiation: Can the user deny their actions?

Process:
  β”œβ”€ Spoofing: Can someone fake the process identity?
  β”œβ”€ Tampering: Can the process code be modified?
  β”œβ”€ Repudiation: Are actions logged?
  β”œβ”€ Information Disclosure: Does the process leak data?
  β”œβ”€ Denial of Service: Can the process be overwhelmed?
  └─ Elevation of Privilege: Can the process gain more rights?

Data Store:
  β”œβ”€ Tampering: Can stored data be modified?
  β”œβ”€ Information Disclosure: Can unauthorized access occur?
  └─ Denial of Service: Can the store be made unavailable?

Data Flow:
  β”œβ”€ Tampering: Can data in transit be modified?
  β”œβ”€ Information Disclosure: Can data be intercepted?
  └─ Denial of Service: Can the flow be blocked?

Step 4: Score & Prioritize (DREAD)

Example: SQL Injection in Checkout API

Damage: 9 (Full database access, customer data exposed)
Reproducibility: 8 (Always reproducible with crafted input)
Exploitability: 7 (Basic SQL knowledge needed)
Affected Users: 9 (All customers)
Discoverability: 6 (Requires some probing)

Risk Score = (9 + 8 + 7 + 9 + 6) / 5 = 7.8 β†’ HIGH

Step 5: Mitigate & Validate

Mitigation Strategies:
β”œβ”€ Eliminate: Remove the threat entirely
β”œβ”€ Reduce: Lower likelihood or impact
β”œβ”€ Transfer: Move risk to another party (insurance)
└─ Accept: Document and monitor

For each threat, define:
β”œβ”€ Mitigation technique
β”œβ”€ Implementation owner
β”œβ”€ Validation method
└─ Timeline

🌳 Attack Trees

Structure

Goal: Steal customer credit card data
β”‚
β”œβ”€ AND: Gain database access
β”‚   β”œβ”€ Exploit SQL injection
β”‚   β”‚   └─ Find vulnerable endpoint
β”‚   β”‚   └─ Craft payload
β”‚   β”œβ”€ Compromise application server
β”‚   β”‚   └─ Exploit RCE
β”‚   β”‚   └─ Use stolen credentials
β”‚   └─ Social engineer DBA
β”‚
β”œβ”€ OR: Intercept payment data
β”‚   β”œβ”€ Man-in-the-middle attack
β”‚   β”‚   └─ Compromise network infrastructure
β”‚   β”œβ”€ Compromise payment gateway
β”‚   β”‚   └─ Exploit API vulnerability
β”‚   └─ Insider threat
β”‚       └─ Bribe employee
β”‚
└─ AND: Exfiltrate data
    β”œβ”€ Establish covert channel
    └─ Bypass DLP controls

Attack Tree Analysis

For each node, calculate:
β”œβ”€ Cost (effort/resources needed)
β”œβ”€ Time (how long to execute)
β”œβ”€ Skill (expertise required)
└─ Detection (likelihood of being caught)

Leaf nodes with lowest cost + time + skill = highest risk paths

☁️ Cloud-Specific Threat Modeling

AWS Threat Model Template

Assets:
β”œβ”€ S3 buckets (customer data, backups)
β”œβ”€ RDS databases (transaction records)
β”œβ”€ Lambda functions (business logic)
β”œβ”€ IAM roles (privilege escalation vectors)
└─ VPC (network segmentation)

Trust Boundaries:
β”œβ”€ Internet β†’ CloudFront/WAF
β”œβ”€ CloudFront β†’ ALB
β”œβ”€ ALB β†’ ECS/EKS (container workloads)
β”œβ”€ ECS β†’ RDS (database tier)
└─ Cross-account boundaries

Key Threats:
β”œβ”€ S3 bucket misconfiguration (public access)
β”œβ”€ IAM over-permission (wildcard policies)
β”œβ”€ Lambda injection (event source poisoning)
β”œβ”€ VPC peering exposure
└─ Secrets in CloudWatch logs

Kubernetes Threat Model

Assets:
β”œβ”€ etcd (cluster state, secrets)
β”œβ”€ API Server (control plane)
β”œβ”€ kubelet (node agent)
β”œβ”€ Container images
└─ Network policies

Threats:
β”œβ”€ etcd unauthorized access β†’ cluster compromise
β”œβ”€ API Server exposed β†’ entire cluster at risk
β”œβ”€ Privileged containers β†’ host escape
β”œβ”€ Weak network policies β†’ lateral movement
└─ Malicious images β†’ supply chain attack

πŸ“‹ Threat Modeling Checklist

Pre-Modeling

  • System architecture documented
  • Data classification completed
  • User roles and permissions defined
  • Third-party integrations identified
  • Compliance requirements known

During Modeling

  • DFD created with trust boundaries
  • STRIDE applied to all elements
  • Attack trees for critical assets
  • DREAD scoring for all threats
  • Mitigations identified per threat

Post-Modeling

  • Threats prioritized by risk score
  • Mitigation roadmap created
  • Validation tests defined
  • Review scheduled (quarterly)
  • Documentation updated

πŸ› οΈ Tools

ToolPurpose
Microsoft Threat Modeling ToolDFD creation, STRIDE analysis
OWASP Threat DragonOpen-source threat modeling
pytmPython threat modeling framework
ThreatSpecThreat modeling as code
IriusRiskEnterprise threat modeling platform

πŸ“š References

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.