ai-risk-management
Apply the NIST AI Risk Management Framework (AI RMF 1.0) and adjacent guidance to AI / ML systems — model lifecycle governance,…
Run a structured threat-modeling session for a new feature, system, or architecture — STRIDE, attack trees, data flow diagrams, abuse cases. Use when the user mentions 'threat model,' 'threat modeling,' 'STRIDE,' 'attack tree,' 'abuse case,' 'data flow diagram,' 'DFD,' 'security
$ npx -y skills add briiirussell/cybersecurity-skills --skill threat-modeling --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/threat-modelingContext preview
The summary Claude sees to decide when to auto-load this skill.
Run a structured threat-modeling session for a new feature, system, or architecture — STRIDE, attack trees, data flow diagrams, abuse cases. Use when the user mentions 'threat model,' 'threat modeling,' 'STRIDE,' 'attack tree,' 'abuse case,' 'data flow diagram,' 'DFD,' 'security
name: threat-modeling description: "Run a structured threat-modeling session for a new feature, system, or architecture — STRIDE, attack trees, data flow diagrams, abuse cases. Use when the user mentions 'threat model,' 'threat modeling,' 'STRIDE,' 'attack tree,' 'abuse case,' 'data flow diagram,' 'DFD,' 'security architecture review,' 'security review,' 'design review,' 'pre-implementation security,' 'shift left,' 'what could go wrong,' or needs strategic security thinking before code is written." allowed-tools: Read, Write, Grep, Glob, WebSearch
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).
Adam Shostack's framing — every threat model answers these four:
1. **What are we working on?** (Scope and model) 2. **What can go wrong?** (Threats) 3. **What are we going to do about it?** (Mitigations) 4. **Did we do a good job?** (Validation)
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:
A collection of cybersecurity skills for AI coding agents. The AI does the heavy lifting; you bring the context about your stack and your priorities.
Apply the NIST AI Risk Management Framework (AI RMF 1.0) and adjacent guidance to AI / ML systems — model lifecycle governance,…
Audit REST, GraphQL, and RPC APIs against the OWASP API Security Top 10 (2023). Use when the user mentions 'API security,' 'API…
Learn from public breach disclosures — extract the audit question each one implies and check your own stack. Capital One IMDS…
Audit cloud infrastructure (AWS, GCP, Azure) for misconfigurations, excessive permissions, and security gaps. Use when the user…
Audit container images, Dockerfiles, and Kubernetes manifests for misconfigurations, excessive privileges, exposed secrets, and…
Audit cryptography implementation — algorithm choice, key sizes, KDF parameters, IV/nonce handling, signature verification,…