- Backend: FastAPI app with all models, services, schemas, routes - Admin Panel: Next.js dashboard with all modules (CRM, POS, repairs, warranties, billing, notifications, etc.) - Ecommerce: storefront (submodule) + product catalog - AI Agents: .agents/ skill library for Antigravity IDE - Docs: architecture, billing, notification gateway markdown - Submodules: Backend/OpenWA, Ecommerce/File 2/storefront
1.4 KiB
1.4 KiB
| name | description |
|---|---|
| Security Review | Review a Node.js TypeScript change or module for security and privacy risks |
Skill: Security Review
1. Purpose
Audit the implementation for typical vulnerabilities: injection flaws, unauthenticated endpoints, XSS, and data privacy leaks.
2. When to Use
When writing code that handles user input, writes to databases, processes payments, or accesses files.
3. Preconditions
- Source code logic is complete and compiles successfully.
- Zod/Pydantic validation schemas are declared.
4. Step-by-Step Checklist
- Scan endpoints to verify they require valid authentication headers (JWT verification).
- Audit raw database statements to prevent SQL injections.
- Check inputs for HTML sanitization to block Cross-Site Scripting (XSS).
- Ensure compliance with DPDP act requirements (consent parameters, database encryption).
- Review file uploads for path traversal controls.
5. Validation Checklist
- No dynamic input is passed directly to database executors without escaping.
- Endpoints require correct authorization clearances.
6. Examples
# Vulnerable: db.execute(f"SELECT * FROM users WHERE id = '{user_input}'")
# Secure: db.execute("SELECT * FROM users WHERE id = :id", {"id": user_input})
7. Failure Cases
- Blindly trust inputs received from third-party webhooks without verifying token signatures.