From secure-sdlc-agents
Generates structured STRIDE threat models and architecture reviews for new features, APIs, auth changes, or design decisions before coding. Includes LINDDUN for privacy.
npx claudepluginhub kaademos/secure-sdlc-agents --plugin secure-sdlc-agentsThis skill uses the workspace's default tool permissions.
This skill runs a structured threat model against a proposed design or architecture.
Systematically identify and document threats using the STRIDE framework (Spoofing, Tampering, Repudiation, Information Disclosure, Denial of Service, Elevation of Privilege). Use when designing systems, reviewing architectures, conducting security design reviews, or updating threat models.
Applies STRIDE threat modeling to Data Flow Diagrams, identifying threats like spoofing, tampering, repudiation, disclosure, DoS, and privilege elevation for system design and reviews.
Generates threat models using OWASP Four-Question Framework and STRIDE methodology, producing matrices with risk ratings, mitigations, and prioritization for attack surface analysis and security reviews.
Share bugs, ideas, or general feedback.
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 risks