threat-model-generator
БесплатноБез исполняемых скриптовНе проверенCreates comprehensive threat models using STRIDE methodology with asset identification, threat enumeration, mitigation strategies, and residual risk…
от patricio0312rev★ 64 звезды на GitHubОб этом скилле
Threat Model Generator
Systematically identify and mitigate security threats.
STRIDE Methodology
S - Spoofing: Impersonating someone/something
T - Tampering: Modifying data or code
R - Repudiation: Claiming you didn't do something
I - Information Disclosure: Exposing protected information
D - Denial of Service: Making system unavailable
E - Elevation of Privilege: Gaining unauthorized permissions
Asset Identification
interface Asset {
name: string;
type: "data" | "service" | "user" | "infrastructure";
sensitivity: "public" | "internal" | "confidential" | "restricted";
criticality: "low" | "medium" | "high" | "critical";
}
const assets: Asset[] = [
{
name: "User Credentials (passwords, tokens)",
type: "data",
sensitivity: "restricted",
criticality: "critical",
},
{
name: "Payment Information (credit cards)",
type: "data",
sensitivity: "restricted",
criticality: "critical",
},
{
name: "API Service",
type: "service",
sensitivity: "internal",
criticality: "high",
},
{
name: "User Profile Data",
type: "data",
sensitivity: "confidential",
criticality: "medium",
},
];
Threat Enumeration
interface Threat {
id: string;
category: "S" | "T" | "R" | "I" | "D" | "E";
description: string;
asset: string;
attackVector: string;
likelihood: "low" | "medium" | "high";
impact: "low" | "medium" | "high" | "critical";
riskScore: number;
}
const threats: Threat[] = [
{
id: "T-001",
category: "S",
description: "Attacker impersonates user with stolen credentials",
asset: "User Credentials",
attackVector: "Phishing, credential stuffing, brute force",
likelihood: "high",
impact: "critical",
riskScore: 9,
},
{
id: "T-002",
category: "T",
description: "SQL injection allows data modification",
asset: "User Profile Data",
attackVector: "Malicious SQL in input fields",
likelihood: "medium",
impact: "high",
riskScore: 7,
},
{
id: "T-003",
category: "I",
description: "API exposes sensitive user data without auth",
asset: "User Profile Data",
attackVector: "Direct API access, IDOR",
likelihood: "medium",
impact: "high",
riskScore: 7,
},
{
id: "T-004",
category: "D",
description: "DDoS attack overwhelms API",
asset: "API Service",
attackVector: "Volumetric attack, application-layer flood",
likelihood: "medium",
impact: "high",
riskScore: 7,
},
{
id: "T-005",
category: "E",
description: "Privilege escalation via role manipulation",
asset: "User Profile Data",
attackVector: "Parameter tampering, insecure direct object reference",
likelihood: "low",
impact: "critical",
riskScore: 6,
},
];
Mitigation Strategies
interface Mitigation {
threatId: string;
strategy: string;
implementation: string;
effectiveness: "low" | "medium" | "high";
cost: "low" | "medium" | "high";
priority: 1 | 2 | 3;
}
const mitigations: Mitigation[] = [
{
threatId: "T-001",
strategy: "Multi-factor authentication",
implementation: "TOTP via authenticator app + SMS backup",
effectiveness: "high",
cost: "medium",
priority: 1,
},
{
threatId: "T-001",
strategy: "Rate limiting on login attempts",
implementation: "Max 5 attempts per 15 minutes per IP",
effectiveness: "medium",
cost: "low",
priority: 1,
},
{
threatId: "T-002",
strategy: "Parameterized queries",
implementation: "Use ORM (Prisma) for all database access",
effectiveness: "high",
cost: "low",
priority: 1,
},
{
threatId: "T-003",
strategy: "Authentication & Authorization",
implementation: "JWT tokens + RBAC middleware on all routes",
effectiveness: "high",
cost: "low",
priority: 1,
},
{
threatId: "T-004",
strategy: "Rate limiting & CDN",
implementation: "CloudFlare with rate limits + WAF rules",
effectiveness: "high",
cost: "medium",
priority: 2,
},
{
threatId: "T-005",
strategy: "Role-based access control",
implementation: "Enforce RBAC checks on all mutations",
effectiveness: "high",
cost: "low",
priority: 1,
},
];
Residual Risk Assessment
interface ResidualRisk {
threatId: string;
originalRisk: number;
mitigatedRisk: number;
residualRisk: number;
acceptanceReason?: string;
monitoringRequired: boolean;
}
function calculateResidualRisk(
threat: Threat,
mitigations: Mitigation[]
): ResidualRisk {
const threatMitigations = mitigations.filter((m) => m.threatId === threat.id);
// Calculate risk reduction
const maxEffectiveness = Math.max(
...threatMitigations.map((m) => {
if (m.effectiveness === "high") return 0.8;
if (m.effectiveness === "medium") return 0.5;
return 0.2;
})
);
const mitigatedRisk = threat.risk
Установить threat-model-generator в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл threat-model-generator?
Creates comprehensive threat models using STRIDE methodology with asset identification, threat enumeration, mitigation strategies, and residual risk assessment. Use for "threat modeling", "security analysis", "STRIDE", or "risk assessment".
Как установить скилл threat-model-generator?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл threat-model-generator запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic