Works with the AI Agents you already use
Next.js & Python Security Auditor
Security auditor for Next.js and FastAPI codebases that finds IDOR, race conditions, and injection vulnerabilities.
$29
Next.js & Python Security Auditor
Example session with this skill installed
Audit the /app/api/payments and /backend/routes/orders directories for IDOR and race conditions. Provide a report with remediation.
- Read your context and instructions
- Compiled the next js
I have completed the security audit of the requested payment and order routes. I identified one Critical race condition in the Python backend and one High-severity IDOR vulnerability in the Next.js API.
Security Audit Report
| Finding | Severity | Location | Exploit Path |
|---|---|---|---|
| Atomic Balance Bypass | Critical | backend/routes/orders.py:42 | A TOCTOU race condition allows a user to trigger multiple concurrent requests to spend the same credit balance before the database update completes. |
| Missing Ownership Check | High | app/api/payments/[id]/route.ts:15 | The handler verifies the user is logged in but fails to check if the paymentId belongs to the session.userId, allowing any user to view any payment. |
| Raw SQL Interpolation | Medium | backend/db/utils.py:89 | Use of f-strings in a cursor.execute call exposes the system to SQL injection if input is not sanitized. |
Remediation Code
Fix for TOCTOU Race Condition (backend/routes/orders.py):
# Change:
# current_balance = db.get_balance(user_id)
# if current_balance >= cost:
# db.update_balance(user_id, current_balance - cost)
# To:
db.execute(
"UPDATE users SET balance = balance - %s WHERE id = %s AND balance >= %s",
(cost, user_id, cost)
)
# Check rowcount to confirm success
Fix for IDOR (app/api/payments/[id]/route.ts):
// Add ownership verification to the query
const payment = await prisma.payment.findFirst({
where: {
id: params.id,
userId: session.user.id, // Mandatory check
},
});
Next steps
- Apply the atomic SQL update to the orders route to prevent credit double-spending.
- Update the Prisma query in the payments API to include the
userIdfilter. - Rerun the scan to verify no other routes share the
findUniquepattern without ownership checks.
Connects securely to your tools. The creator never sees your data.
About this skill
Codebases mixing Next.js and Python FastAPI often hide critical security flaws in the gaps between the frontend and the backend. This skill performs systematic, evidence-backed security audits to catch vulnerabilities before they reach production. It moves beyond generic linting to find deep logical flaws like IDOR, race conditions, and server-side request forgery.
What it does
- Static Analysis flags unsafe patterns like raw SQL interpolation, hardcoded secrets, and unpinned SSRF sinks.
- Auth & IDOR Verification checks API routes and Server Actions to ensure they verify both session identity and resource ownership.
- Injection & SSRF Protection detects unvalidated user input reaching database queries, shell commands, or outbound HTTP requests.
- Concurrency & Logic Audits identifies Time-of-Check to Time-of-Use (TOCTOU) race conditions in financial or quota-based operations.
- Remediation Patching provides specific file:line citations and drop-in code fixes for every identified vulnerability.
How it works
- Initial Scan: Run the automated triage to map high-signal patterns across TypeScript and Python files.
- Contextual Review: Manually verify flags to eliminate false positives from test code or comments.
- Deep Logic Check: Trace data flow through API routes and Server Actions to find authorization bypasses.
- Report Generation: Produce a prioritized audit report with severity rankings and a remediation checklist.
Frameworks & tools
Specifically designed for Next.js (App and Pages router), Node.js, TypeScript, and Python FastAPI. It understands Prisma, SQLAlchemy, and standard web security patterns like Zod/Pydantic validation.
Why this beats prompting it yourself
Generic prompts often hallucinate security risks or miss framework-specific traps like unauthenticated Server Actions. This skill follows a rigorous multi-step protocol and enforces evidence-backed reporting with actual file citations.
Use cases
- Pre-deployment Audit: Reviewing a feature branch for OWASP Top 10 vulnerabilities.
- Refactoring Legacy Code: Identifying raw SQL or unsafe shell executions in older Python services.
- Auth Hardening: Verifying that new Next.js Server Actions aren't leaking data via IDOR.
- Race Condition Detection: Checking balance-deduction logic in financial microservices.
Known limitations
Does not handle pure CSS styling or formatting tasks. Requires manual verification of triage flags to ensure accuracy in complex logic.
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.
Does not audit pure CSS or UI formatting. Requires manual verification of automated flags to prevent false positives in test fixtures.
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
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed today