mcpField
T
threat-modeling

threat-modeling

github.com/mn-youssefSecurity49177 installsUpdated 20w ago
Repository

About threat-modeling

A threat-modeling skill for the security planning phase, helping teams map assets, entry points, and trust boundaries before testing. It applies STRIDE and ranks risks by likelihood and impact to produce a prioritized list for audits and penetration tests.

Key features

  1. 01Inventory assets and input points
  2. 02Map trust boundaries
  3. 03Analyze threats with STRIDE
  4. 04Score risk by likelihood and impact
  5. 05Produce a prioritized test-target list

Use cases

  1. 01Prioritize security testing efforts
  2. 02Review threats across APIs and internal entry points
  3. 03Prepare targets for code audits
  4. 04Identify attack surfaces without specialist coverage

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/mn-youssef/security-skills --skill threat-modeling

After installing, type/threat-modelingin Claude Code to confirm it loaded.

Bundled filesreferences/stride-and-surface.md

Details

From the project README

Threat Modeling (PLAN phase)

Overview

Decide what to worry about and test first before spending effort. Map assets, entry points, and trust boundaries; apply STRIDE; rank risks by likelihood × impact.

Core principle: You can't test everything. Spend effort where a break hurts most.

Process

  1. Inventory assets — What's valuable? (user data, money, credentials, PII, admin control, IP)
  2. Map entry points — Every place untrusted input enters: routes/endpoints, forms, file uploads, query params, headers, webhooks, message queues, mobile API calls, third-party callbacks.
  3. Draw trust boundaries — Where does data cross from less-trusted to more-trusted? (browser→API, API→DB, service→service, user→admin). Bugs cluster on these lines.
  4. Apply STRIDE per boundary/component — see references/stride-and-surface.md.
  5. Rank — score each threat: risk = likelihood × impact (1–3 each → 1–9). Test high scores first.

Quick reference — STRIDE

ThreatQuestionDefends
SpoofingCan someone pretend to be another user/service?Authentication
TamperingCan data be modified in transit/at rest?Integrity
RepudiationCan an action be denied / is it logged?Non-repudiation
Information disclosureCan data leak?Confidentiality
Denial of serviceCan it be made unavailable?Availability
Elevation of privilegeCan a user gain rights they shouldn't?Authorization

Output: prioritized target list

A table the next phases consume:

#AssetEntry pointSTRIDELikelihoodImpactRiskTest via
1User PIIGET /api/users/:idI (IDOR)339code-audit + active-pentest
2AuthPOST /loginS236code-audit

Hand-off

Feed the top items into security-code-audit (find) and active-pentest (validate).

The surface inventory is also the applicability driver. It tells the security-testing orchestrator which specialists apply (surface present → run) and which to skip (absent → N/A), and exposes any surface with no matching specialist as a coverage gap to handle with the generic methodology + a recommendation to build a new skill. List every surface you found — including ones no current skill covers — so nothing is silently missed.

Common mistakes

  • Modeling the happy path only — attackers use the unhappy paths.
  • Forgetting internal/trusted entry points (admin panels, internal APIs, cron, queues).
  • Treating all findings as equal — rank, or you'll drown in low-value work.

Comments

Markdown supported