Security Checklist

Validates authentication, API security, injection prevention, and GDPR compliance patterns in Next.js SaaS applications.

Updated Apr 2, 2026
One-click install
npx skills add https://github.com/khiwniti/carbonscope --skill security-checklist-khiwniti
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: Security Checklist
Source: https://github.com/khiwniti/carbonscope/tree/main/ai-agent-saas-expert/skills/security-checklist
Command: npx skills add https://github.com/khiwniti/carbonscope --skill security-checklist-khiwniti

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building an AI agent SaaS means handling authentication, rate limiting, injection attacks, secrets, and GDPR obligations, and missing any one of them creates real vulnerabilities. This Skill provides a structured security validation checklist with working TypeScript implementation patterns so nothing critical is overlooked before launch. ## Core Features & Use Cases - Authentication & Authorization Patterns: NextAuth/Clerk session management, route protection middleware, and API key rotation with Prisma transactions. - API Security & Injection Prevention: Upstash rate limiting, CORS configuration, Zod request validation, SQL/XSS/command injection defenses, and prompt injection sanitization for LLM inputs. - Compliance & Audit: GDPR data export and right-to-deletion endpoints, webhook signature verification (Stripe, Clerk/Svix), and security event audit logging. - Use Case: Before launching your AI chat SaaS, run through the tiered checklist (Critical / Important / Recommended) to confirm no hardcoded secrets exist, HTTPS is enforced, webhooks verify signatures, and per-user LLM token limits prevent cost abuse. ## Quick Start Ask the AI to audit your Next.js API routes against the security checklist and generate the missing rate limiting and webhook verification code.

Frequently Asked Questions about Security Checklist

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add rate limiting to a Next.js API route?▼

Use Upstash Ratelimit with a sliding window limiter backed by Redis. Call ratelimit.limit with a per-user key inside your route handler and return HTTP 429 when the limit is exceeded.

How do I verify Stripe webhook signatures in Next.js?▼

Read the raw request body and the stripe-signature header, then call stripe.webhooks.constructEvent with your webhook secret. Return 400 if verification throws, and only process the event after successful verification.

How do I prevent prompt injection in LLM API calls?▼

Isolate instructions in a system prompt, sanitize user input by stripping phrases like 'ignore previous instructions', and cap input length. Validate LLM output against a Zod schema so responses stay type-safe and bounded.

Does Prisma protect against SQL injection by default?▼

Yes, Prisma query methods use parameterized queries that sanitize user input automatically. Raw queries with $queryRaw require explicit Prisma.sql wrapping to remain safe.

What endpoints are needed for GDPR compliance in a SaaS app?▼

You need a data export endpoint returning all user records as a downloadable JSON file and a deletion endpoint that removes the user and related data in a transaction. Both must be authenticated and scoped to the requesting user.