Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    threat model generator

    1

    Generate structured STRIDE threat models with ranked risks, mitigations, and testable security acceptance criteria.

    Free

    Security scanned
    threat model generator

    threat model generator

    Example session with this skill installed

    Generate a threat model for a new Node.js microservice that handles user profile updates, including PII like phone numbers and addresses, stored in a managed PostgreSQL instance.

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

    I have completed the STRIDE threat model for the User Profile microservice. This analysis assumes the service runs in a private VPC and that the PostgreSQL instance uses IAM-based authentication.

    User Profile Service Threat Model

    Assumptions

    • The service is not directly exposed to the internet; it sits behind an API Gateway.
    • PostgreSQL traffic is encrypted in transit (TLS 1.2+).
    • The "admin" role is managed via a centralized identity provider.

    Data Flow Summary

    • Trust Boundaries: User ↔ API Gateway, API Gateway ↔ Profile Service, Profile Service ↔ PostgreSQL.
    • Assets: User PII (Phone, Address), Database Credentials, Session JWTs.

    Threat Register

    idboundarycategoryscenarioimpact 1–5likelihood 1–5riskmitigationeffort
    T1User/APISpoofingAttacker uses a leaked JWT to update another user's PII.5315Implement strict ID check comparing JWT sub claim to the user_id in the request body.S
    T2Service/DBTamperingSQL injection via unvalidated address fields allows bulk data modification.5210Use parameterized queries/ORM exclusively; implement strict schema validation for address strings.S
    T3Service/DBInfo DisclosureLog files capture PII during update failures or debugging.4416Implement a logging interceptor to mask PII fields before writing to stdout/CloudWatch.M
    T4Admin/ServiceElevationRegular user hits the /admin/migrator endpoint due to missing role checks.428Enforce Role-Based Access Control (RBAC) middleware on all sensitive routes.S

    Top Mitigations

    PII Masking (High Risk/Med Effort): Prevent PII leakage in logs by using a library like pino-mask to sanitize the address and phone fields.
    2.

    Identity Correlation (High Risk/Low Effort): Ensure the authenticated user ID matches the target resource ID on every PATCH request.

    Security Acceptance Criteria

    Given a valid JWT for User A,

    when they attempt to update the profile of User B,

    then the service must return a 403 Forbidden.

    Given a profile update request containing a SQL injection string (e.g., '; DROP TABLE users;--),

    when processed,

    then the database must treat the input as a literal string and not execute it.

    Given a failed update request,

    when the error is logged,

    then the phone number and address must be replaced with [MASKED] in the log output.

    Residual Risk

    The primary residual risk is compromised developer credentials allowing direct database access bypassing the service.

    Monitoring: Alert on any non-service IAM roles querying the users table and monitor for unusual spikes in 403 Forbidden errors at the API Gateway.

    Next steps

    1. Review the masked logging implementation in the logging middleware.
    2. Add the identity correlation check to the updateProfile controller.
    3. Configure CloudWatch alerts for PII patterns in log streams.

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

    About this skill

    Security reviews often stall because engineers and security teams speak different languages. This skill bridges that gap by generating a structured STRIDE threat model for any feature, service, or architecture. It identifies trust boundaries, ranks risks by impact and likelihood, and delivers concrete, testable security acceptance criteria.

    What it does

    • Asset identification lists high-value targets like PII, session tokens, and config secrets.
    • Trust boundary mapping locates vulnerabilities where data moves between users, services, and databases.
    • STRIDE analysis categorizes threats into Spoofing, Tampering, Repudiation, Information Disclosure, Denial of Service, and Elevation of Privilege.
    • Risk prioritization calculates risk scores (Impact × Likelihood) to highlight critical vulnerabilities.
    • Mitigation planning provides specific controls mapped to effort levels and industry standards like OWASP.

    How it works

    1. Scope the model by providing a description, code snippet, or architecture diagram of the feature.
    2. Review the assumptions the agent makes about your environment or missing infrastructure details.
    3. Analyze the threat register to see prioritized risks and their corresponding mitigations.
    4. Implement acceptance criteria by converting mitigations into testable security user stories for your sprint.

    Frameworks & tools

    The skill follows the STRIDE methodology and maps controls to standards such as OWASP ASVS and NIST 800-63.

    Why this beats prompting it yourself

    Generic prompts often result in vague advice like "use encryption." This skill enforces a rigorous STRIDE framework, requiring concrete attack scenarios and testable mitigations that an engineer can actually implement.

    Use cases

    • Feature planning for new authentication flows or payment integrations.
    • Architectural reviews before deploying new microservices or external APIs.
    • Compliance preparation by documenting residual risks and monitoring signals.
    • Security debt triage to identify high-impact, low-effort "quick win" fixes.

    Known limitations

    This tool is for defensive security analysis only. It will not generate exploit payloads, bypass instructions, or attack playbooks.

    Defensive use only. Will not generate exploit code or attack playbooks. Requires clear architectural context or explicit assumptions to be accurate.

    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

    Free forever

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 23 days ago

    • Free with an Agensi account

    Permissions

    No special permissions declared or detected

    Listed23 days ago

    What's inside

    Frequently Asked Questions

    Simply provide a text description, a code snippet, or an architectural diagram of your feature to begin; the skill will then prompt you to clarify assumptions about your specific infrastructure.

    Unlike general AI prompts, this skill enforces the STRIDE framework to ensure you receive specific, ranked risk scores and testable security acceptance criteria rather than generic advice.

    The skill maps all recommended security controls to industry-recognized standards, including the OWASP Application Security Verification Standard (ASVS) and NIST 800-63 guidelines.

    The skill identifies assets and trust boundaries and categorizes threats into Spoofing, Tampering, Repudiation, Information Disclosure, Denial of Service, and Elevation of Privilege.

    Yes, once the threat register is generated, you can easily export the mitigations as structured security user stories to be added directly to your development sprint or backlog.

    In accordance with safety guidelines, this skill is strictly for defensive modeling and will not generate exploit payloads, attack code, or instructions on how to bypass security controls.

    New in Security