/secure-sdlc-agents:threat-modelingfrom secure-sdlc-agents
Runs a structured STRIDE threat model and architecture review before code is written, producing a docs/threat-model.md that feeds security requirements and PR review. Extends with LINDDUN for privacy when PII is involved.
Ships in secure-sdlc-agents. 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.
This skill runs a structured threat model against a proposed design or architecture.
It applies STRIDE (and LINDDUN for privacy) to enumerate what can go wrong before
any code exists to exploit. The output is a docs/threat-model.md that every other
agent can reference throughout the SDLC.
The discipline: spec the threats before you write the code. AI agents that skip this step produce features that are locally correct but architecturally broken.
Document:
Draw or describe a simple data flow diagram. Even ASCII is sufficient.
For each component and data flow, systematically enumerate threats across all six categories:
| Category | Question to ask |
|---|---|
| Spoofing | Can an attacker pretend to be a legitimate user, service, or system? |
| Tampering | Can data be modified in transit, in storage, or during processing? |
| Repudiation | Can a user deny having performed an action — and would logs prove otherwise? |
| Information Disclosure | Can data be accessed by an unauthorised party or leaked in error messages? |
| Denial of Service | Can an attacker exhaust resources — compute, memory, storage, rate limits? |
| Elevation of Privilege | Can a lower-privilege user or process gain higher-privilege access? |
Produce a threat table:
| Component / Flow | Threat Category | Threat Description | Likelihood | Impact | Mitigation |
|---|---|---|---|---|---|
| Login endpoint | Spoofing | Credential stuffing via enumerable usernames | High | High | Account lockout, MFA |
| JWT token | Tampering | Signature bypass via alg=none | Medium | Critical | Enforce alg allowlist; use RS256 |
| User records API | Info Disclosure | IDOR — UUID in path param, no object-level auth | High | High | Verify resource ownership per request |
If the feature processes personal data, extend the model:
| Category | What to check |
|---|---|
| Linking | Can user records be correlated across sessions or services? |
| Identifying | Can data reveal a user's identity when combined? |
| Non-repudiation | Are users stuck with data they can't delete or correct? |
| Detecting | Can an attacker infer sensitive facts from system behaviour? |
| Data disclosure | Is PII exposed to parties who shouldn't see it? |
| Unawareness | Are users informed about what data is collected and why? |
| Non-compliance | Does the feature conflict with GDPR, CCPA, or applicable regulation? |
For each identified threat:
Write docs/threat-model.md using this structure:
## Threat Model: [Feature Name]
**Date:** YYYY-MM-DD
**Feature:** [Brief description]
**ASVS Level:** L[1/2/3]
**Conducted by:** appsec-engineer (AI) + [human reviewer]
### Data Flow Summary
[Describe or diagram the data flows and trust boundaries]
### STRIDE Threat Table
[Full table from Step 2]
### LINDDUN Privacy Threats (if applicable)
[Full table from Step 3]
### Architecture Review Checklist
- [ ] Authentication enforced on all endpoints
- [ ] Authorisation follows least-privilege; no IDOR vectors
- [ ] All inputs validated server-side; output encoding in place
- [ ] Sensitive data identified and encryption requirements confirmed
- [ ] Third-party integrations reviewed for supply chain risk
- [ ] Error handling does not leak internal state
- [ ] Logging captures security events without logging secrets
- [ ] Rate limiting and anti-automation controls present
### Mitigations Required (prioritised)
[Ordered list by severity]
| Excuse | Counter |
|---|---|
| "We'll do threat modeling after we build the MVP" | Design-level flaws cost 10–100x more to fix after implementation. The MVP will have the flaw baked in. |
| "It's a simple feature, no need for a threat model" | The features that skip threat modeling are the features that produce the breach post-mortems. |
| "We've done this before, we know the risks" | Every feature has novel combinations of data, trust boundaries, and integrations. Past experience is input, not a substitute. |
| "The threat model would just say the same things every time" | Then produce a short one quickly. If you can't identify any threats, you haven't looked hard enough. |
| "Security will review it in staging" | Staging review catches implementation bugs. Architectural flaws require an architectural fix — which means redesign and rebuild. |
Do not close the threat model until:
docs/threat-model.md has been written and linked from the feature specdocs/security-requirements.md (via product-manager agent)docs/risk-register.md is updated with any accepted risksWhat SKILL.md sets; muted values are Claude Code's defaults
4 skills in this plugin
/ai-securityUse when building any feature that calls an LLM API, processes user input sent to a model, uses RAG or embeddings, deploys an AI agent with tool access, or makes AI-generated output visible to users or downstream systems.
/compliance-and-auditUse when a project requires a compliance framework mapping, when risks need formal documentation, when audit evidence must be collected, or when producing a compliance attestation before release. Applies to SOC 2, ISO 27001, GDPR, PCI DSS, NIST CSF, and DORA.
/security-and-hardeningUse when writing or reviewing code that handles user input, authentication, access control, cryptography, error handling, file uploads, or dependency management. Also activates when a pull request touches any security-sensitive component.
Claude Code refuses to install this plugin
.claude-plugin/plugin.json: agents.0: Invalid string: must start with "./", agents.1: Invalid string: must start with "./", agents.2: Invalid string: must start with "./", agents.3: Invalid string: must start with "./", agents.4: Invalid string: must start with "./", agents.5: Invalid string: must start with "./", agents.6: Invalid string: must start with "./", agents.7: Invalid string: must start with "./"
.claude-plugin/plugin.json: agents.0: Invalid string: must start with "./", agents.1: Invalid string: must start with "./", agents.2: Invalid string: must start with "./", agents.3: Invalid string: must start with "./", agents.4: Invalid string: must start with "./", agents.5: Invalid string: must start with "./", agents.6: Invalid string: must start with "./", agents.7: Invalid string: must start with "./"
Checked against Claude Code 2.1.332's install rules. The listing below is what the repository ships; Claude Code cannot install it as published.
Other plugins' skills for the same job