agentleFS
bakhod1rbakhod1r/awesome-agents/.claude/skills/threat-model/SKILL.md

threat-model

Skill0 starsChanged 3 months agoMITView on GitHub

Produce a STRIDE threat model for a system or feature. Use before building anything that handles authentication, money, personal data, file uploads, or third-party input.

61 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use vuln-scan, supply-chain-review and 8 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.
  • AnthropicSkill

    vuln-scan

    Static source-code vulnerability scan. Reads a target directory (and THREAT_MODEL.md if present), spawns parallel review subagents per focus area, and writes VULN-FINDINGS.json + .md for /triage to consume. Read-only — no building, running, or network. For execution-verified crashes, use vuln-pipeline instead. Use when asked to "scan for vulns", "review this code for security issues", "find bugs in <dir>", or as the step between /threat-model and /triage.

    Also in 5 projects that use this

  • MesteriisSkill

    supply-chain-review

    Reviews lockfiles, installers, provenance, CI permissions, dependency confusion, artifacts, registries, and publishing.

    Also in 3 projects that use this

  • AnthropicSkill

    patch

    Generate candidate fixes for verified security findings. Consumes

    Also in 4 projects that use this

  • mbwsimsSkill

    orbit

    Run for repo-wide or diff-wide readiness sweeps: "/orbit", "/orbit pr", "/orbit deep", "/orbit quick", "audit this project", "project-wide review", "is this PR ready overall", or "combined security, tests, codebase, evolution, and instruction review". Use this for broad multi-system assessment, not for a single-file review or a one-domain question.

    Also in 3 projects that use this

  • mbwsimsSkill

    test-plan

    This skill should be used when the user asks to "plan tests", "what should I test", "what tests do I need", "test plan for", "testing strategy for", "test matrix for", "what cases should I cover", "help me plan tests", mentions "/test-plan", or wants to understand what tests are needed before writing any test code.

    Also in 3 projects that use this

  • Sagargupta16Skill

    dependency-audit

    Audit project dependencies for security vulnerabilities, licensing issues, maintenance health, and optimization opportunities. Use it during regular security audits (monthly or quarterly); before a major release when you want to ensure the dependency tree is clean; when evaluating whether to adopt or replace a dependency; after a security advisory affects one of your dependencies; when your install times or bundle sizes have grown noticeably.

    Also in 4 projects that use this

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 55 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
  1. Distinctive:

    Mitigate or accept: Every threat gets a control, or a signed risk acceptance with a named owner and an expiry date.

    line 28

“Common” is measured: kept by at least 6 in 10 of the 55 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Threat Model

Threat modelling is cheap before the build and expensive after. Do it at design time.

Procedure

  1. Scope. Name the system, its trust boundaries, and what is explicitly out of scope. Out-of-scope items are written down — silence reads as coverage.
  2. Data flow. Diagram actors, processes, data stores, and every flow that crosses a trust boundary. Threats live at the crossings, not inside the boxes.
  3. Enumerate with STRIDE at each crossing:

    Question
    SpoofingCan an actor claim another identity?
    TamperingCan data be modified in transit or at rest?
    RepudiationCan an action be denied because nothing logged it?
    Information disclosureWhat leaks, to whom, through which channel?
    Denial of serviceWhat exhausts under load or deliberate abuse?
    Elevation of privilegeHow does a low-privilege actor gain more?
  4. Rate by exploitability and impact. Not by gut feel, not by scanner severity.
  5. Mitigate or accept. Every threat gets a control, or a signed risk acceptance with a named owner and an expiry date.
  6. Verify. Each mitigation names the specific test that proves it works.

Output

# Threat Model: <system>
## Scope and trust boundaries
## Out of scope
## Data flow
## Threats
| ID | Boundary | STRIDE | Threat | Exploitability | Impact | Mitigation | Verified by |
## Accepted risks
| ID | Risk | Owner | Expiry | Rationale |

Worked example

Feature: users upload a profile picture, served from a CDN.

IDBoundarySTRIDEThreatMitigationVerified by
T1Browser→APITContent-Type lied about; SVG uploaded as image/png, executes script on viewRe-encode server-side; never trust the declared type; serve from a separate origintest_upload_svg_polyglot_is_reencoded
T2Browser→APID10 GB upload or a decompression bomb exhausts diskSize cap before buffering; dimension cap after decode header, before full decodetest_upload_exceeds_cap_rejected_before_buffer
T3API→StorageEFilename ../../etc/passwd escapes the upload directoryDiscard the client filename entirely; store under a generated UUIDtest_path_traversal_filename_discarded
T4Storage→CDNIObject URL is guessable; private avatars enumerableRandom 128-bit object key; deny bucket listingtest_bucket_listing_denied
T5API→Image libEMalformed image triggers a native-code CVE in the decoderDecode in a sandboxed worker with no network and a memory cap; pin and scan the librarytest_decoder_runs_without_network
T6Browser→CDNSAttacker replaces another user's avatar via a predictable object keyOwnership check on write; key derived server-side onlytest_cannot_overwrite_other_user_avatar

Six threats on a "just an avatar upload" feature. T1 and T5 are the ones that get shipped without a threat model — and they are the ones that turn into an incident.

Anti-patterns

Anti-patternWhy it fails
"We validate input" as a mitigationWhich validator? Running where? Against which encoding?
Threats without a verifying testAn untested mitigation is an assumption wearing a control's uniform
Rating by scanner severityScanner severity ignores your architecture and your data
Modelling only the happy actorThe attacker does not use your UI
Model produced once at launchIt is living. New flow, new crossing, new threats.
No out-of-scope sectionReaders assume you covered what you silently skipped

Done when

  • Every trust boundary crossing has been walked through all six STRIDE categories.
  • Every threat ends in a mitigation or a dated, owned risk acceptance.
  • Every mitigation names a specific test, not a policy.
  • Out-of-scope is explicit.
  • The model is stored next to the design, not in a slide deck.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.