Responsibility model
Security is not a final project layer. Authentication, authorization, data protection, and observability should evolve with the primary product flow.
Authentication and access control
The platform uses NextAuth with JWT-backed sessions and distinct roles. Admin and dashboard routes are protected by the proxy layer, while sensitive APIs must also authorize on the server.
- Apply least privilege to every role
- Re-check authorization inside route handlers
- Never trust a role or userId supplied by the client
Input and data
Validate all input with a schema before using or storing it. Uploaded files require controls for type, size, and safe naming.
- Validate with Zod at data boundaries
- Use parameterized queries through Prisma
- Do not expose internal error details to users
- Remove or mask sensitive data in logs
AI-specific threats
Retrieved content, model output, and instructions inside files are untrusted data. They must not grant tool authority or new access.
- Separate system instructions from user and document content
- Use allowlists for tools and network destinations
- Require human confirmation for high-impact actions
- Evaluate prompt injection and data exfiltration before release
Report a security issue
To report a vulnerability privately, send reproduction details and potential impact through the contact page. Avoid public disclosure before coordination.