/cybersecurity-skills:threat-modelingfrom cybersecurity-skills
Runs a structured threat-modeling session using STRIDE, attack trees, data flow diagrams, and abuse cases. Use during design phase for features touching auth, payments, PII, or new integrations.
Ships in cybersecurity-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Run a structured threat-modeling session against a proposed feature, system, or architecture. This is the design-time security skill — different from audit (which inspects code that exists). Use this when there's a design doc, a feature spec, an architecture diagram — but not yet code.
When to use:
Cross-references: owasp-audit (code-level checklist that lines up with the threats this surfaces), api-audit (API-specific category mapping), iam-audit (identity decisions touch every threat model).
Model systems the user owns, builds or is authorized to assess, from designs, diagrams and code they provide. Threat modeling is design analysis; it doesn't test anything. Don't build an attack tree of someone else's product without their authorization.
Adam Shostack's framing — every threat model answers these four:
The rest of this skill walks through each in order.
Produce a Data Flow Diagram (DFD) at one of three levels:
A useful DFD has:
Trust boundaries are the most useful element. If you can draw exactly one diagram that shows every trust boundary in your feature, you've already done 60% of the work.
For text-only environments, render the DFD in Mermaid:
flowchart LR
User[User] -- HTTPS --> WAF[WAF / CDN]
WAF -- request --> API[API Gateway]
API -- JWT --> Service[Service]
Service -- SQL --> DB[(Postgres)]
Service -- HTTPS --> Stripe[Stripe]
classDef trust fill:#fff,stroke:#f00,stroke-dasharray:4 4
class API,Service trust
For each process, data store, and data flow, ask STRIDE — one threat category per letter. Not every category applies to every element, and that's fine.
| Letter | Threat | Property violated | Examples |
|---|---|---|---|
| S | Spoofing | Authentication | Stolen token, forged JWT, replay attack, impersonating a service |
| T | Tampering | Integrity | Modifying a request mid-flight, parameter tampering, modifying stored data |
| R | Repudiation | Non-repudiation | User denies an action; logs don't prove they did it |
| I | Information Disclosure | Confidentiality | Leak via error messages, IDOR exposing other users' data, exposed S3 bucket |
| D | Denial of Service | Availability | Resource exhaustion, expensive query bomb, billing exhaustion via paid downstream APIs |
| E | Elevation of Privilege | Authorization | User → admin via mass assignment, BFLA, escape from sandbox |
A useful threat-modeling habit: for each element of the DFD, write a short table.
**Element:** API Gateway
| STRIDE | Threat | Likelihood | Impact |
|---|---|---|---|
| S | Forged JWT — symmetric secret in env, leaks if .env exposed | M | H |
| T | Request body modified between gateway and upstream service | L | M |
| R | Gateway access logs deleted by attacker post-breach | L | H |
| I | Verbose error responses expose internal hostnames | M | L |
| D | No rate limit at the gateway → upstream services overwhelmed | H | H |
| E | "X-Admin: true" header pass-through from external requests | L | C |
Likelihood and impact: L / M / H / C(ritical) — qualitative is fine; quantitative scoring is theater for most engagements.
For features with business-flow concerns, also walk abuse cases. The format is:
As a malicious actor, I want to [goal] so that I can [outcome].
Examples:
Abuse cases catch what STRIDE misses — STRIDE is great at "security properties violated"; abuse cases are great at "business intent violated."
For each threat surfaced in Step 2, pick one of four responses:
Mitigations should be specific:
| Bad mitigation | Good mitigation |
|---|---|
| "Add rate limiting" | "Add 5 req/min per user IP to /api/coupon/redeem, with Redis-backed counter; queue 429 responses to be alerted on" |
| "Validate inputs" | "Reject ?next= URLs that contain control bytes (\t, \n, \0), backslashes, or percent-encoded slashes; normalize via new URL(target, ...).pathname (see owasp-audit A01)" |
| "Encrypt the data" | "Application-level encryption with AWS KMS-managed CMK, envelope encryption per row, key rotation every 90 days, audit log of every Decrypt call" |
iam-audit)api-audit API3)can(user, action, resource), deny-by-default, sister-route audit (see owasp-audit A06 sister-route)Validation comes from three sources:
owasp-audit Second-Opinion Pass.Worth it:
prompt-injection)Probably not worth it:
The test: if the change introduces a new trust boundary, moves an existing one, or changes what crosses one — threat model it. Otherwise, skip.
A threat model is a living document, not a one-shot report. Keep it short and reviewable.
# Threat Model: [Feature / System Name]
## Status: Draft / In Review / Approved
## Owner: [name]
## Date: [date]
## Reviewers: [names]
## 1. Scope
[2-3 sentences — what's in, what's out]
## 2. Data Flow Diagram
[Mermaid diagram or link to image]
## 3. Assumptions and constraints
- [Anything taken as given — e.g. "users authenticate via Okta, MFA enforced"]
## 4. Threats and mitigations
[STRIDE-per-element tables, then abuse cases]
## 5. Open questions
[Things we deferred or couldn't decide]
## 6. Decision log
[Material design decisions and why — including risks accepted]
## 7. Action items
| Item | Owner | Deadline | Status |
|------|-------|----------|--------|
Keep this in the repo alongside the design doc, not in a separate security tracker. Drift between the threat model and the implementation is the dominant failure mode — proximity helps.
web-pentest or owasp-audit for verificationWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
threat-modeling, stride, attack-tree, data-flow-diagram, security-design
npx claudepluginhub briiirussell/cybersecurity-skills --plugin cybersecurity-skills42 skills in this plugin
/agent-supply-chain-auditAudit the extensions AI coding agents load and trust (skills, plugins, marketplaces, hooks, settings, MCP servers, and instruction files like CLAUDE.md, AGENTS.md and .cursor/rules) across Claude Code, Cursor, Codex, Gemini CLI and GitHub Copilot. Read-only: inventories each item with its source and pin, greps for hidden instructions, exfiltration, credential reads, persistence, curl|bash and over-broad tool grants, reviews hooks and MCP pinning and tool poisoning, and gives each item a SAFE / CAUTION / DO-NOT-INSTALL verdict. Use when the user mentions 'audit my skills,' 'is this skill malicious,' 'is this skill safe,' 'is this MCP server safe,' 'review CLAUDE.md,' 'review AGENTS.md,' 'plugin security,' 'check my hooks,' 'CODEOWNERS for .claude,' 'audit my MCP servers,' 'agent supply chain,' 'SkillSpector,' 'tool poisoning,' 'rug pull,' 'audit my IDE extensions,' 'is this VS Code extension safe,' 'is this repo safe to open,' or is about to install a skill, plugin, MCP server, or IDE extension./ai-risk-managementApply the NIST AI Risk Management Framework (AI RMF 1.0) and adjacent guidance to AI / ML systems — model lifecycle governance, fairness and bias evaluation, robustness, transparency, accountability, third-party model risk, monitoring for drift, and AI incident response. Broader than prompt-injection (which is the security slice). Use when the user mentions 'AI risk,' 'AI governance,' 'NIST AI RMF,' 'AI compliance,' 'ML governance,' 'model risk management,' 'AI fairness,' 'AI bias,' 'algorithmic accountability,' 'AI Bill of Rights,' 'EU AI Act,' 'AI transparency,' 'model card,' 'AI red-team program,' 'AI safety,' 'responsible AI,' 'model drift,' 'concept drift,' 'AI monitoring,' 'AI incident,' or needs to assess or govern an AI / ML system./api-auditAudit REST, GraphQL, and RPC APIs against the OWASP API Security Top 10 (2023). Use when the user mentions 'API security,' 'API audit,' 'BOLA,' 'broken object level authorization,' 'BFLA,' 'function-level authorization,' 'mass assignment,' 'API rate limiting,' 'GraphQL security,' 'REST security,' 'API authentication,' 'API authorization,' 'excessive data exposure,' 'redact the API transcript,' 'structured identities for a BOLA test,' or needs to review API endpoints for security weaknesses./breach-patternsLearn from public breach disclosures — extract the audit question each one implies and turn it into a checklist for your own stack. Capital One IMDS abuse, LastPass vault exfiltration, Okta Lapsus$, Snowflake credential reuse, MOVEit, SolarWinds, Equifax, Target POS, Codecov, Uber, Twilio, Polymarket's compromised DebugBear script, the OPTIMJACK Optimizely snippet injection — what would you check now if your boss said 'could that happen to us?' Use when the user mentions 'breach analysis,' 'lessons learned,' 'security postmortem,' 'breach patterns,' 'breach lessons,' 'has this happened to us,' 'apply breach lessons,' 'preempt breaches,' 'security retrospective,' 'real-world security incidents,' 'Optimizely compromise,' 'tag manager hacked,' or wants to harden against known attacker playbooks./business-logic-testingTest an authorized web application for business-logic flaws and race conditions — the classes scanners cannot find. Model invariants (conservation of value, uniqueness, monotonicity, exclusivity), build an Actor x Action x Resource matrix, abuse state machines (skip/reorder/replay steps, limit-slicing), find numeric bugs (float-vs-decimal rounding, cross-currency refund arbitrage, negative amounts), stale feature gates, and saga gaps; prove concurrency bugs (double-spend, lost update, idempotency-key reuse) with controlled parallel requests. Use when the user mentions 'business logic testing,' 'race condition,' 'double spend,' 'TOCTOU,' 'concurrency bug,' 'idempotency,' 'coupon reuse,' 'workflow bypass,' 'limit bypass,' 'negative amount,' 'refund arbitrage,' 'parallel request attack,' or 'logic flaw.'/cicd-securityAudit CI/CD pipelines (GitHub Actions; GitLab CI and CircleCI briefly) for paths giving an outsider code execution, secrets or a write token: pull_request_target and workflow_run running untrusted code, expression injection, missing or broad permissions, third-party actions not pinned to a SHA or lockfile, OIDC trust with wildcard subjects, self-hosted runners on public repos, secrets reaching forks, cache and artifact trust, and AI agents in CI reading issue or PR text with a write token, sandbox or not. Runs zizmor and actionlint read-only, writes findings.json. Use when the user mentions 'pull_request_target,' 'pwn request,' 'workflow injection,' 'zizmor,' 'actionlint,' 'pin actions to SHA,' 'actions.lock,' 'workflow lockfile,' 'GITHUB_TOKEN permissions,' 'self-hosted runner,' 'ACTIONS_RUNTIME_TOKEN,' 'stolen write token,' 'bot bypasses branch protection,' 'claude-code-action,' 'AI agent in CI,' 'GitLab CI security,' 'CircleCI security,' 'is this workflow safe,' or needs to secure a build pipeline.Other plugins' skills for the same job