Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    STRIDE Threat Model and Data Flow Diagram Generator

    1

    Evidence-based STRIDE threat model from your repo: Mermaid data flow diagram with trust boundaries, threats traced to file:line, top 5 fixes. LOW RISK, ACTION NEEDED or HIGH RISK.

    $7

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    STRIDE Threat Model and Data Flow Diagram Generator

    STRIDE Threat Model and Data Flow Diagram Generator

    Example session with this skill installed

    Threat model our invoicely repo (Express API, Postgres, Stripe webhooks, an admin panel, Terraform under infra/). It's multi-tenant by org_id. We need something for our SOC 2 auditor and a list of what to fix first.

    • Read your context and instructions
    • Compiled the stride threat model

    Threat model - invoicely @ 4c19a2e

    Verdict: HIGH RISK Mode: NEW Method: STRIDE per element on a DFD
    Defaults used: no WAF assumed; tenancy detected (org_id on 7 tables)

    Data flow diagram (level 0)

    flowchart LR
      user((Customer browser))
      stripe((Stripe))
      subgraph TB1["TB1 Internet / edge"]
        lb[ALB 443]
      end
      subgraph TB2["TB2 App"]
        api[api - Express]
        admin[admin routes]
      end
      subgraph TB3["TB3 Data"]
        db[(postgres)]
      end
      user -- "F1 HTTPS /api/* [PII, session]" --> lb
      lb -- "F2 HTTP :8080 [PII]" --> api
      api -- "F3 SQL [PII, payment refs]" --> db
      stripe -- "F4 POST /hooks/stripe [payment]" --> api
      admin -- "F5 SQL export [PII, all orgs]" --> db
    

    Threats (top 4 of 11)

    IDElementSTRIDEThreatL x I = SevExisting mitigationGapFix
    T1F4 webhookS, TForged event marks invoice paid3x3 = CRITICALnone; searched constructEvent, Stripe-Signatureno signature check, src/routes/hooks.ts:12verify signature with the webhook secret before parsing
    T2adminEAny logged-in user can call /admin/export2x3 = HIGHrequireAuth src/routes/admin.ts:8no role checkadd role guard, test it
    T3F3E, IInvoice query not scoped by org_id2x3 = HIGHORM scope on 6 of 7 modelssrc/models/invoice.ts:41add org scope or Postgres RLS
    T4apiDNo rate limit on /api/login3x2 = HIGHnone foundbrute force, outageadd rate limiter on auth routes

    Assumptions (not verified in code)

    • TLS terminates at the ALB (listener 443, infra/lb.tf:22); F2 inside the VPC is plain HTTP

    Top 5 fixes

    1. Verify Stripe webhook signatures - closes T1 - S - src/routes/hooks.ts
    2. Role guard on admin routes - closes T2 - S - src/routes/admin.ts
    3. Tenant scope on invoices - closes T3 - M - src/models/invoice.ts
    4. Rate limit auth routes - closes T4 - S - src/app.ts
    5. Audit log on export and role changes - closes T7 - M

    Design-review aid, not a pen test or certification.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Threat models are often skipped, or written once from memory and never updated. An AI asked to threat model your app from scratch tends to list generic threats and assume controls you never built. This skill makes the agent read the code and IaC, and require a file and line for every element, every mitigation it credits and every gap it reports.

    What it does:

    • Finds processes, data stores, external entities and data flows from routes, schemas, API clients, queues and IaC
    • Draws a Mermaid data flow diagram with subgraphs as trust boundaries (internet to edge, app to database, service to third-party API, user to admin, tenant to tenant) and numbered, classified flows (PII, credentials, payment, health)
    • Applies STRIDE per element, prioritising flows that cross a boundary or carry sensitive data
    • Checks for existing mitigations in code (authn and authz middleware, input validation, webhook signatures, TLS, encryption at rest, rate limiting, audit logging, secrets management) and marks each PRESENT, PARTIAL, ABSENT or ASSUMED
    • Scores severity as likelihood x impact on a stated 3x3 rule, with the reasoning shown
    • Writes docs/security/threat-model.md with DFD, assets, assumptions, threat table and top 5 fixes
    • Includes a re-run routine that diffs the model when architecture changes
    • Ends with a verdict of LOW RISK, ACTION NEEDED or HIGH RISK

    Who it's for: developers, tech leads and security engineers preparing a security design review, scoping a pen test, or collecting threat modeling evidence for SOC 2 or ISO 27001 audits.

    Honesty note: this is a design-review aid, not a penetration test, a vulnerability scanner or a certification. It is defensive only and writes no exploit code. It sees what the repository declares at one commit, so controls outside the code (a WAF, network rules set in a console) are listed as assumptions, not counted as mitigations. Mapping the output to specific audit criteria is up to you and your auditor.

    The model reflects what the code and IaC declare at one commit. Controls outside the repository, runtime configuration and live drift are not visible and are recorded as assumptions. It is not a penetration test, vulnerability scan or certification, and severity scores follow a stated house rule rather than measured likelihood.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 29 days ago

    Requires

    Git

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Network Access
    Listed29 days ago

    What's inside

    Frequently Asked Questions

    SKILL.md (the workflow, DFD conventions, STRIDE checks, scoring rule, verdict rules, output template and re-run routine) and references/stride-dfd-reference.md (STRIDE definitions, STRIDE-per-element table, DFD element mapping to Mermaid, mitigation search patterns, the 3x3 scoring grid, compliance framing notes and sources). That is the whole package.

    Any agent that loads SKILL.md skills, such as Claude Code, Codex CLI, Cursor, VS Code Copilot and Gemini CLI. It needs read access to the repo. Shell access helps with searching, git diff in re-run mode and render-testing the Mermaid diagram.

    No. It is a design-level threat model built from code and IaC. It does not attack anything, scan running systems or certify compliance. It can serve as supporting evidence for a security review or a SOC 2 / ISO 27001 audit, but which criteria it supports is for you and your auditor to decide.

    It sees only what the repository declares at one commit. Controls configured outside the code, runtime settings and live drift are invisible, so they are listed as assumptions. Grep-based discovery can miss unusual frameworks; every credited mitigation is opened and checked, but a review by someone who knows the system is still needed.

    A plain prompt tends to produce a generic STRIDE list. This skill makes the agent prove each element and mitigation with a file and line, check five specific trust boundaries, classify data on every flow, separate assumed controls from proven ones, show likelihood and impact for every severity, and keep a re-run log as the architecture changes.

    New in Security