Works with the AI Agents you already use
threat model generator
Generate structured STRIDE threat models with ranked risks, mitigations, and testable security acceptance criteria.
Free
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
| id | boundary | category | scenario | impact 1–5 | likelihood 1–5 | risk | mitigation | effort |
|---|---|---|---|---|---|---|---|---|
| T1 | User/API | Spoofing | Attacker uses a leaked JWT to update another user's PII. | 5 | 3 | 15 | Implement strict ID check comparing JWT sub claim to the user_id in the request body. | S |
| T2 | Service/DB | Tampering | SQL injection via unvalidated address fields allows bulk data modification. | 5 | 2 | 10 | Use parameterized queries/ORM exclusively; implement strict schema validation for address strings. | S |
| T3 | Service/DB | Info Disclosure | Log files capture PII during update failures or debugging. | 4 | 4 | 16 | Implement a logging interceptor to mask PII fields before writing to stdout/CloudWatch. | M |
| T4 | Admin/Service | Elevation | Regular user hits the /admin/migrator endpoint due to missing role checks. | 4 | 2 | 8 | Enforce 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
- Review the masked logging implementation in the logging middleware.
- Add the identity correlation check to the
updateProfilecontroller. - 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
- Scope the model by providing a description, code snippet, or architecture diagram of the feature.
- Review the assumptions the agent makes about your environment or missing infrastructure details.
- Analyze the threat register to see prioritized risks and their corresponding mitigations.
- 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.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Security.
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
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
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
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 to use
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