threat-modeling
Skill59 starsChanged 2 months agoMITView on GitHub
Work out what is actually worth defending in this system — the trust boundaries data crosses, the assets behind them, what an attacker can already do, and the small number of threats that justify a control. Use when designing or changing a system's shape, before building auth, payments, uploads, file sharing or multi-tenancy, when adding an integration that crosses a boundary, or when asked whether a design is safe. Not for finding bugs in code that already exists (that is secure-code-review), not a compliance questionnaire, and not incident response.
29 other projects use a version of this.
Adopted by
Most recently taken up by
- cellrishi-code/claude-skills-atlastheir own version, first seen Oct 4, 2026
- aws-solutions/konductortheir own version, first seen Sep 23, 2026
- robisson/build-like-amazon-agent-skillstheir own version, first seen Sep 23, 2026
- timwukp/agent-skills-best-practicetheir own version, first seen Sep 16, 2026
- millerlai/threat-modeling-mastertheir own version, first seen Sep 15, 2026
- awarexone/AXguardtheir own version, first seen Sep 15, 2026
Used with
Projects with it also use supply-chain-security, dependency-audit and 5 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
MicrosoftSkillsupply-chain-security
Activate when reviewing or modifying dependency resolution, lockfile schema, package downloaders, signature/integrity checks, file integration cleanup, or anything that could expose APM to dependency confusion, typosquatting, malicious packages, or token leakage.
Also in 3 projects that use this
fefogarciaSkilldependency-audit
Comprehensive dependency health auditing for JavaScript/TypeScript projects. Run npm audit, detect outdated packages, check for security advisories, and verify license compliance. Prioritises vulnerabilities by severity and provides actionable fix recommendations.
Also in 4 projects that use this
SentrySkillarchitecture-review
Staff-level codebase health review. Finds monolithic modules, silent failures, type safety gaps, test coverage holes, and LLM-friendliness issues.
Also in 4 projects that use this
Microsoft AzureSkillskill-authoring
Write Agent Skills that comply with the agentskills.io specification. WHEN: "create a skill", "new skill", "write a skill", "skill template", "skill structure", "review skill", "skill PR", "skill compliance", "SKILL.md format", "skill frontmatter", "skill best practices". DO NOT USE FOR: general documentation. INVOKES: vally CLI.
Also in 3 projects that use this
Microsoft AzureSkillgit-workflow
Squad branching model: dev-first workflow with insiders preview channel
Also in 3 projects that use this
OpenAISkilltest-driven-development
Use when implementing any feature or bugfix, before writing implementation code
Also in 3 projects that use this
Other versions29 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 29
- briiirussell/cybersecurity-skills★ 410same name
- proflead/codex-skills-library★ 153same name
- hardw00t/ai-security-arsenal★ 104same name
- UnitOneAI/SecuritySkills★ 78same name
- mn-youssef/security-skills★ 47same name
- kumaran-is/claude-code-onboarding★ 36same name
- nimadorostkar/Claude-Skills-collection★ 28same name
- ShieldNet-360/secure-vibe★ 22same name
- ShulkwiSEC/bb-huge★ 22same name
- awarexone/AXguard★ 18same name
19 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository79 other files it gives its agents.
- agent-dispatcherSkill
- agent-designSkill
- agent-evalsSkill
- context-engineeringSkill
- llm-observabilitySkill
- mcp-designSkill
- memory-designSkill
- model-routingSkill
- prompt-engineeringSkill
- prompt-injection-defenseSkill
- retrieval-ragSkill
- structured-outputSkill
- tool-designSkill
- api-contract-verificationSkill
- api-designSkill
- authenticationSkill
- authorizationSkill
- background-jobsSkill
- cachingSkill
- idempotency-and-retriesSkill
- webhooksSkill
- database-migration-verificationSkill
- data-integritySkill
- data-pipelinesSkill
- data-qualitySkill
- migrationsSkill
- postgresSkill
- query-optimizationSkill
- schema-designSkill
- accessibilitySkill
- accessibility-verificationSkill
- design-systemsSkill
- design-to-codeSkill
- frontend-designSkill
- motion-designSkill
- responsive-designSkill
- ui-auditSkill
- ux-writingSkill
- ci-cdSkill
- deploymentSkill
- dockerSkill
- github-actionsSkill
- incident-responseSkill
- observabilitySkill
- release-verificationSkill
- rollbackSkill
- component-architectureSkill
- frontend-performanceSkill
- shadcn-uiSkill
- stack-detectionSkill
- tailwindSkill
- visual-verificationSkill
- competitive-analysisSkill
- copywritingSkill
- data-analysisSkill
- deep-researchSkill
- documentation-verificationSkill
- positioningSkill
- seoSkill
- source-evaluationSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.
0
Common
Most of the 27 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 41
Delete it or find the missing half.
“Common” is measured: kept by at least 6 in 10 of the 27 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Threat modeling
Most threat models fail by being complete. A list of every conceivable attack tells nobody what to build. The output that is worth having is short: a handful of threats with a capability behind them, each attached to one control, plus the assumptions that would invalidate the whole thing.
When this fires
A system's shape is being decided or changed — a new service, a new integration, a new class of data, a new kind of user. Also when someone asks "is this secure?" about a design rather than about code. It does not fire for an internal refactor that moves no data across a boundary.
Procedure
- Draw what exists, from the repository. Routes, jobs, queues, stores, third-party calls, clients. Follow the data, not the org chart. If the architecture doc disagrees with the code, the code is the system. Anything you cannot find, ask about rather than assume.
- Mark the trust boundaries. A boundary is any place data moves between different levels of trust: browser to server, service to service, one tenant to another, user content to a renderer, your code to a vendor API, CI to production, admin tooling to live data. Boundaries are where controls have to live; a flow that crosses none needs no model.
- Name the assets concretely, most attractive first. Credentials and tokens, then personal data, then money and entitlements, then the integrity and availability of records. Write the actual table, bucket, queue or environment variable. "User data" names nothing and defends nothing.
- Name attacker capability, not attacker identity. What can this adversary already do: an unauthenticated internet caller, a signed-up customer, a neighbouring tenant, someone holding a stolen session, a compromised dependency in the build, an employee with read access to the database. A threat with no capability behind it is fiction and will crowd out real work.
- Walk each boundary once against the recurring failure classes — spoofing identity, tampering with data in transit or at rest, actions that cannot be attributed afterwards, disclosure to the wrong party, exhaustion of a shared resource, and gaining privilege you were not granted. One pass per boundary, not per box, or the list explodes.
- Write each threat as one sentence: this capability can do this to this asset because this control is missing or weak. If it will not fit that sentence, it is a worry, not a threat. Delete it or find the missing half.
- Rank by consequence and reachability, not by ingenuity. A dull unauthenticated read of the whole customer table outranks an elegant chain requiring three prior compromises.
- Cut hard, and write down what you are accepting. Most models should end with a few threats worth building against. An accepted risk recorded with its reason is a decision; an unlisted one is an oversight nobody can find later.
- Attach each surviving threat to exactly one control, at one place. Name the layer and, where it exists, the file or component. Two controls that can disagree are worse than one in an awkward spot. Say what the control does not cover.
- Record the assumptions holding the model up — that this queue is written only by us, that this bucket is private, that this network is not reachable, that this vendor validates its input. Each assumption is something to re-check, and the first thing to test when the model later turns out to have been wrong.
- Hand off residual work as findings, not as homework. Threats that need code-level confirmation go to a code review; threats that need a running system go to whoever is authorized to test it. Modeling does not prove anything about the running system.
- Re-run on boundary change, not on a calendar. A new public endpoint, a new tenancy model, a new integration or a new data class invalidates the map. A sprint boundary does not.
Proving a threat is a separate, authorized act. Scanning, probing or exploiting a live system — even to confirm something in this model — stops and asks first, names the target, and never runs against production on the strength of a model alone.
Checklist
- Diagram derived from the actual code, with gaps asked about rather than assumed
- Every trust boundary marked, including service-to-service and tenant-to-tenant
- Assets named as concrete stores, ordered by what an attacker wants
- Attacker capabilities listed; every threat traces to one of them
- Each boundary walked once against the recurring failure classes
- Each threat written in the one-sentence form
- Ranked by consequence and reachability
- Accepted risks written down with their reason
- Each surviving threat attached to one control at one place
- Assumptions listed as things that can go stale
- No claim made about the running system that only a test could support
Failure handling
- The list will not stop growing — the boundaries are drawn too finely, or threats are being written without capabilities. Go back to step 4 and drop everything with no attacker behind it.
- Nobody can say what the data is worth — that is a finding, not a blocker. Model on the strictest plausible reading, say which assumption you used, and name who can settle it.
- The design has no boundary to defend — say so and stop. A model produced to satisfy a process teaches nothing and costs the next reader real time.
- Code contradicts the intended design — report the gap as its own finding. Modeling the intended system while the deployed one differs is the most expensive way to be wrong.
- A threat needs live evidence you are not authorized to gather — record it as unconfirmed with what evidence would settle it. Never upgrade a hypothesis to a vulnerability by reasoning.
Evidence to report
The boundary diagram or its written equivalent, with the files and routes it was derived from; the asset list; the attacker capabilities considered; each threat in sentence form with its rank; what was explicitly accepted and why; each control with its single location; the assumptions; and what remains unconfirmed and what would confirm it. A model with no accepted risks and no unknowns has not been finished, it has been formatted.
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.

