vibe-security-guard
Run a 16-rule pre-launch static security checklist for AI-generated Next.js, Supabase, Stripe, and Node/Python web apps before deployment.
Try your first task
A source-grounded starter task has not been verified for this skill yet.
SKILL.md
name: vibe-security-guarddescription: "Run a 16-rule pre-launch static security checklist for AI-generated Next.js, Supabase, Stripe, and Node/Python web apps before deployment."category: securityrisk: safesource: selfsource_type: selflicense: MITlicense_source: "https://github.com/Tomsabay/vibe-security-guard/blob/e34ffb1c6711b6ac3ae2eb891a8e8a87be5700c9/LICENSE"date_added: "2026-11-29"author: Tomsabaytags: [security, nextjs, supabase, static-analysis, pre-launch]Vibe Security Guard (16-Rule Pre-Launch Checklist)
Overview
AI-assisted web apps scaffolded with coding agents commonly ship with predictable high-severity misconfigurations: secrets exposed via NEXT_PUBLIC_*, unauthenticated Next.js Server Actions, disabled Supabase Row-Level Security (RLS), unverified payment webhooks, and permissive CORS wildcards. This skill guides a structured read-only static security audit before production launch.
When to Use
- Auditing an AI-generated or rapidly prototyped Next.js, React, Node.js, Supabase, or Python web app before public launch.
- Reviewing PRs that add payment webhooks, auth routes, Server Actions, or environment variables.
- Use this for defensive source review of repositories the user authorizes. Keep testing to static inspection.
Prerequisites
- Read access to the project repository (source files, SQL migrations,
.env.example, and route handlers). - No network access, credentials, or write permissions are required.
How It Works
1. Establish the inputs
Identify the repository root and stack (Next.js App Router, Express/FastAPI, Supabase SQL, Stripe/webhook handlers). Never print or log plaintext secret values found during inspection; report only file path, line number, and masked key names.
2. Audit across the 16 pre-launch rules
Check source files and migrations for:
- Hardcoded API keys, private keys, or database URLs in tracked files.
- Sensitive credentials prefixed with
NEXT_PUBLIC_orVITE_(leaked to browser bundles). - Next.js
"use server"actions mutating database/billing state without a session/auth check. - Supabase tables created without
ENABLE ROW LEVEL SECURITYor with overly broadUSING (true)policies. SUPABASE_SERVICE_ROLE_KEYimported inside client components.- Payment webhook handlers missing HMAC/signature verification (
stripe.webhooks.constructEventor equivalent). - Wildcard CORS (
Access-Control-Allow-Origin: *) paired with credentials. - Raw SQL string interpolation (
f"SELECT ... {user_input}"or template literals). - Dangerous execution sinks (
eval,new Function,subprocess(..., shell=True)with user input). - Missing rate limiting on auth, OTP, or AI completion endpoints.
- Unvalidated open redirects or SSRF fetch targets.
- Weak or hardcoded JWT keys, missing token verification, and unchecked issuer, audience or algorithm settings.
- Debug flags (
DEBUG = True) or stack traces exposed in production handlers. - Missing ownership checks (IDOR) when updating/deleting records by client-supplied
id. - Unbounded file upload sizes or path traversal in upload filenames.
- Tracked environment files containing secrets and missing ignore rules for local credential files.
3. Verify the result
Produce a severity-ranked table (BLOCK_LAUNCH vs. WARN) with exact file:line, rule ID, and concrete remediation patch. Never mark a project clear if any BLOCK_LAUNCH item remains unresolved.
Examples
User request: Run a pre-launch security check on our Next.js + Supabase checkout app.
Inputs: Repository files (`app/actions.ts`, `supabase/migrations/001.sql`, `.env.example`).
Expected result (illustrative): Flags `SEC_SERVER_ACTION_NO_AUTH` at `app/actions.ts:14` and `SEC_NEXT_PUBLIC_SECRET` at `lib/stripe.ts:3`, returns `BLOCK_LAUNCH`, and outputs minimal auth-guard and env-rename fixes without printing secret values.
Limitations
- Static pattern review cannot verify deployed cloud IAM policies, network firewalls, or third-party dashboard settings.
- Findings require developer confirmation to rule out intentional test fixtures.
Safety and side effects
Read-only static code inspection (risk: safe). Performs no edits, network calls, or exploit execution. Never copy or echo plaintext credentials into outputs or commits.
Sources and related skills
- MIT-licensed upstream reference. This checklist uses local source and synthetic examples.