threat-model-lite
Skill4 starsChanged 10 days agoMITView on GitHub
Run a 10-minute STRIDE pass on a new feature or significant change and produce a table of assets, entry points, abuse cases, required controls mapped to OWASP Top 10:2025, and tests to add. Use before building a feature that touches authentication, payments, file uploads, personal data, external integrations, LLM or agent features, or a new public endpoint, or when asked for a threat model or security design review.
In this repository32 other files it gives its agents.
- llms.txtllms.txt
- cve-checkSkill
- dependency-vetSkill
- git-commitSkill
- incident-supply-chainSkill
- migrate-angularjsSkill
- migrate-class-to-hooksSkill
- migrate-cordovaSkill
- migrate-cra-to-viteSkill
- migrate-dotnet-frameworkSkill
- migrate-ingress-nginxSkill
- migrate-strutsSkill
- migrate-vue2Skill
- migrate-xamarinSkill
- secrets-scanSkill
- security-auditSkill
- upgrade-angularSkill
- upgrade-djangoSkill
- upgrade-dotnetSkill
- upgrade-expressSkill
- upgrade-jquerySkill
- upgrade-laravelSkill
- upgrade-nestjsSkill
- upgrade-nextjsSkill
- upgrade-nodeSkill
- upgrade-nuxtSkill
- upgrade-phpSkill
- upgrade-pythonSkill
- upgrade-railsSkill
- upgrade-react-nativeSkill
- upgrade-spring-bootSkill
- upgrade-supabaseSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 6 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
Before building a feature that touches auth, money, files, personal data, an external integration, an LLM or agent, or adds a public …
- Very specific: line 16
When core/security-baseline (A06) asks for abuse cases.
- Distinctive: line 17
When the user asks for a threat model or security design review.
- Very specific: line 52
Abuse cases: Write each threat as one concrete sentence: "An authenticated user changes invoiceId in the request to download another …
- Distinctive: line 77
Every entry point from step 2 appears in at least one row, or is explicitly noted as low risk.
- Distinctive: line 78
Every row has a concrete abuse case, a control with a location, an OWASP category and a test.
- Very specific: line 79
No control contradicts the stack rules or core/security-baseline.
- Distinctive: line 84
Don't put real secrets, customer data or internal hostnames in the output.
- Distinctive: line 85
Don't claim the feature is "secure" after the pass.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Threat model lite
When to use
- Before building a feature that touches auth, money, files, personal data, an external integration, an LLM or agent, or adds a public endpoint.
- When
core/security-baseline(A06) asks for abuse cases. - When the user asks for a threat model or security design review.
It's a short design check, not a full threat model. For regulated systems or high-value targets, recommend a full threat-modeling session with the team.
Before you start
You need two inputs. Ask for whichever is missing; infer from the code only what you can confirm.
- Feature description: what it does, who uses it (anonymous, signed-in, admin, other services), and what "done" looks like.
Data flows: where data enters, which components handle it, where it's stored, and which external services it reaches. A bullet list is enough:
browser → POST /api/invoices/:id/pdf (Next.js Server Action) → invoices table (Postgres, RLS) Server Action → PDF service (internal HTTP) → S3 private bucket → signed URL back to browser
Also check the existing auth model, tenancy model and the stack rules that apply.
Steps
Spend about 10 minutes. Prefer three concrete threats over ten generic ones.
- Assets. List what an attacker would want: data (personal data, payment data, secrets, tokens), capabilities (sending email, spending money, running code, calling an LLM with tools) and availability.
- Entry points and trust boundaries. List every place untrusted input crosses into the system: endpoints, Server Actions, webhooks, file uploads, queue consumers, LLM inputs (including retrieved documents and tool output), and admin screens. Mark where trust changes (browser → server, service → third party, tenant → tenant).
STRIDE pass. For each entry point, ask one question per letter and keep only the threats that apply:
STRIDE Question Typical controls Spoofing Can someone act as another user, service or webhook sender? Proven auth, verified webhook signatures, mTLS or signed service tokens Tampering Can someone change data, prices, IDs, files or prompts they shouldn't? Server-side validation, object-level authorization, integrity checks Repudiation Could someone deny doing a sensitive action? Structured audit log with actor, action, resource, result Information disclosure Can data leak across users or tenants, or through errors, logs, URLs or LLM output? Tenant-scoped queries, response DTOs, generic errors, redaction Denial of service Can someone exhaust money, quota, CPU, storage or a third-party limit? Rate limits, quotas, size and time bounds, spend caps Elevation of privilege Can a user reach admin functions, other tenants, or code execution (injection, SSRF, tool abuse)? Deny by default, least privilege, parameterized queries, allowlists, human approval for risky tool calls - Abuse cases. Write each threat as one concrete sentence: "An authenticated user changes
invoiceIdin the request to download another tenant's invoice." - Controls. For each abuse case, name the control, map it to an OWASP Top 10:2025 category (A01–A10), and say where it goes in the code. Point to
core/security-baselineinstead of repeating it. For LLM and agent features, also map to the OWASP Top 10 for LLM or Agentic Applications. - Tests. For each control, name one test that would fail without it: a negative authorization test, an oversized upload, a replayed webhook, a rate-limit test, a prompt-injection fixture.
- Output the table below, then a short list of open questions for the user. Keep it in the chat unless the user asks for a file (for example
docs/threat-models/<feature>.md).
Output format
## Threat model: invoice PDF download (2026-10-29)
Assets: invoice data (personal data, amounts); signed S3 URLs; PDF service capacity.
Entry points: POST /api/invoices/:id/pdf (signed-in users); PDF service (internal); S3 bucket.
| # | STRIDE | Entry point | Abuse case | Control | OWASP 2025 | Where | Test |
|---|---|---|---|---|---|---|---|
| 1 | E/I | POST /api/invoices/:id/pdf | User swaps `id` to fetch another tenant's invoice | Load the invoice scoped to session.orgId; 404 otherwise | A01 | invoices/actions.ts | Request another org's invoice → 404 |
| 2 | D | POST /api/invoices/:id/pdf | Script requests thousands of PDFs to exhaust the PDF service | Rate limit per user and org; queue with max concurrency | A06 | middleware + queue config | 61st request in a minute → 429 |
| 3 | I | S3 signed URL | Signed URL shared or logged and reused later | 5-minute expiry; no URLs in logs | A01, A09 | storage/sign.ts | Expired URL → 403 |
Open questions:
- Can support staff download any tenant's invoices? If so, they need audit logging (A09).Verify
- Every entry point from step 2 appears in at least one row, or is explicitly noted as low risk.
- Every row has a concrete abuse case, a control with a location, an OWASP category and a test.
- No control contradicts the stack rules or
core/security-baseline.
Safety
- This is analysis only. Don't change code while running it; implement controls as a separate task after the user agrees.
- Don't put real secrets, customer data or internal hostnames in the output; use placeholders.
- Don't claim the feature is "secure" after the pass. Say which threats were considered and which questions are still open.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

