Works with the AI Agents you already use
Vibe-App Pre-Deploy Secrets & RLS Audit Gate
Pre-deploy audit gate for AI-built apps: catches client-exposed secrets, hardcoded keys, .gitignore gaps, and Supabase tables missing Row Level Security or policies. 100% static scan, offline, exit-1 gate.
$19
Vibe-App Pre-Deploy Secrets & RLS Audit Gate
Example session with this skill installed
Run a security audit on my current Next.js and Supabase project to check for leaked secrets and missing RLS policies before I deploy to Vercel.
- Read your context and instructions
- Compiled the vibe-app pre-deploy secrets
I have completed the static security audit of your project. The audit gate found 3 critical violations that are blocking deployment.
Security Audit Report: [BLOCKED]
| Rule ID | Severity | File | Line | Finding |
|---|---|---|---|---|
CLIENT_SECRET_EXPOSURE | CRITICAL | .env.local | 4 | NEXT_PUBLIC_STRIPE_SECRET contains a secret-shaped value (sk_live_...) |
RLS_MISSING | CRITICAL | supabase/migrations/01_init.sql | 12 | CREATE TABLE "profiles" lacks matching ENABLE ROW LEVEL SECURITY |
GITIGNORE_GAP | HIGH | .env.production | N/A | File exists but is not covered by patterns in .gitignore |
Audit Summary:
- Status: BLOCKED (Exit Code 1)
- Total Files Scanned: 24
- Critical Findings: 2
- High Findings: 1
The scan detected a production Stripe secret prefixed for client exposure, which would have bundled the key into your frontend JavaScript. Additionally, your profiles table is missing Row-Level Security, meaning it is currently open to public access if the Supabase API is exposed.
Next steps
- Move
NEXT_PUBLIC_STRIPE_SECRETto a server-only variable name and rotate the key immediately since it was detected in a client-exposed format. - Add
ALTER TABLE "profiles" ENABLE ROW LEVEL SECURITY;followed by explicitCREATE POLICYrules to your SQL migration. - Update your
.gitignoreto include.env.productionto prevent accidental commits of production credentials.
Connects securely to your tools. The creator never sees your data.
About this skill
Above-the-Fold Hook (3-Second Value)
Never push an AI-built ("vibe-coded") Next.js, Vite, or Supabase app to production with a secret bundled into NEXT_PUBLIC_, a hardcoded service-role key, an unignored .env, or a Postgres table missing Row-Level Security (RLS).
Vibe-App Pre-Deploy Secrets & RLS Audit Gate delivers a deterministic 3-layer pre-deploy security package (SKILL.md numbered audit SOP + JSON Schema Draft 2020-12 policy & report contracts + zero-dependency Python 3 stdlib static scanner) that inspects .env* files, .gitignore, application source/config files, and SQL migrations 100% offline without executing a single line of target code — catching CLIENT_SECRET_EXPOSURE, HARDCODED_SECRET, GITIGNORE_GAP, RLS_MISSING, POLICY_MISSING, and DESTRUCTIVE_MIGRATION (DROP TABLE / DROP COLUMN), redacting secret values in output, and exiting 1 ([BLOCKED]) on any blocking finding or 0 ([PASS]) only when clean.
What's Inside (3-Layer Architecture + 60-Second Test Pack)
- Layer 1 — Pre-Deploy Audit Gate SOP (
SKILL.md): Numbered 6-step pre-deploy security workflow, hard gate matrix, and non-negotiable security rules tailored for Claude Code, Cursor, and Codex CLI. - Layer 2 — JSON Schema Draft 2020-12 Contracts (
schemas/):schemas/audit_policy.schema.json: Strictly typed policy schema controllingfail_on_severities,destructive_migration_severity,client_prefixes,ignore_dirs,sql_migration_globs, optionalignored_rule_ids, andmax_file_size_bytes.schemas/audit_report.schema.json: Machine-readable report contract coveringstatus,exit_code,target,files_scanned,tables_audited,counts_by_rule,counts_by_severity, per-table RLS/policy summaries, and line-levelfindingswith remediation guidance.
- Layer 3 — Zero-Dependency Static Gate (
scripts/vibe_predeploy_gate.py): 100% pure Python 3 standard library (argparse,fnmatch,json,os,pathlib,re,sys,typing) with zero third-party packages and zero execution of target code:CLIENT_SECRET_EXPOSURE(CRITICAL): DetectsNEXT_PUBLIC_,VITE_, andPUBLIC_variables in.env*or source/config files assigned secret-shaped material (sk_live_,sk_test_,sk-,sb_secret_,eyJ...JWTs, or opaque tokens >= 20 chars), while excluding safe public URLs and placeholders.HARDCODED_SECRET(CRITICAL): Detects hardcodedsb_secret_...keys, 3-part base64url JWTs (eyJ...),sk_live_.../sk-.../ghp_.../AKIA...API keys, and PEM private keys in source files without double-countingCLIENT_SECRET_EXPOSURElines.GITIGNORE_GAP(HIGH): Flags live.env/.env.local/.env.productionfiles when.gitignoreis missing or fails to cover them (excluding safe templates like.env.example).RLS_MISSING(CRITICAL) &POLICY_MISSING(HIGH): Strips SQL comments (--,/* ... */) while preserving exact line numbers, tracks everyCREATE TABLEacross migrations in sorted order, and catches tables missingALTER TABLE ... ENABLE ROW LEVEL SECURITYor missingCREATE POLICY ... ON <table>.DESTRUCTIVE_MIGRATION(Policy-configured, defaultHIGH): FlagsDROP TABLEandDROP COLUMNstatements in SQL migrations with severity governed bydestructive_migration_severity.- Emits redacted evidence and pure-ASCII (
cp1252-safe) terminal reports, supports--jsonstdout and--out-report <path>, and exits0([PASS]) or1([BLOCKED]).
- 60-Second Test Pack (
examples/):examples/audit_policy.json: Strict default pre-deploy policy (fail_on_severities: ["CRITICAL", "HIGH"],destructive_migration_severity: "HIGH").examples/sample_app_fail/: Mini Next.js/Supabase-style fixture repo planting 5 synthetic violations (1CLIENT_SECRET_EXPOSURE,1HARDCODED_SECRET,1GITIGNORE_GAP,1RLS_MISSING,1POLICY_MISSING).examples/sample_app_pass/: Clean mini repo with.gitignorecovering.env, a safe publicNEXT_PUBLIC_APP_URL, server-sideprocess.envreads, and full RLS +CREATE POLICYcoverage across both SQL tables (0 findings, exit0).
Who This Is For & Prerequisites
Built for:
- Indie builders, founders, and developers shipping AI-assisted Next.js, Vite, React, and Supabase/Postgres apps who want an instant offline pre-deploy guardrail before
git push,vercel --prod, orsupabase db push. - Teams running Claude Code, Cursor, Codex CLI, or CI pre-deploy checks that need deterministic exit codes (
0/1) and JSON Schema Draft 2020-12 audit reports without SaaS lock-in orpip install.
Prerequisites:
- Python 3.9+ (uses Python 3 standard library only — zero external packages, zero network calls, 100% static file inspection).
- Cross-platform: pure-ASCII terminal output verified
cp1252-safe on Windows as well as macOS and Linux.
60-Second Quick-Start
Run directly from the skill folder:
# 1. Run FAIL fixture -> [BLOCKED] (exit code 1, catches all 5 planted violations)
python scripts/vibe_predeploy_gate.py \
--target examples/sample_app_fail \
--policy examples/audit_policy.json
# 2. Run PASS fixture -> [PASS] (exit code 0, 0 findings across 5 files and 2 tables)
python scripts/vibe_predeploy_gate.py \
--target examples/sample_app_pass \
--policy examples/audit_policy.json
# 3. Emit machine-readable JSON report (or save to disk with --out-report report.json)
python scripts/vibe_predeploy_gate.py \
--target examples/sample_app_pass \
--policy examples/audit_policy.json \
--json
Real Terminal Proof
1. BLOCKED Gate — Catching All 5 Planted Violations in examples/sample_app_fail (exit code 1)
$ python scripts/vibe_predeploy_gate.py --target examples/sample_app_fail --policy examples/audit_policy.json
==========================================================================
VIBE-APP PRE-DEPLOY SECRETS & RLS AUDIT GATE -- STATIC REPORT
==========================================================================
Target : examples/sample_app_fail
Policy : strict-predeploy-default (fail_on=CRITICAL,HIGH)
Mode : 100% Static Scan (zero code execution, offline)
Summary : Files=5 | Tables=2 | Findings=5 | Blocking=5
Severity Count : CRITICAL=3 | HIGH=2 | MEDIUM=0 | LOW=0
Rule Counts : CLIENT_SECRET=1 | HARDCODED=1 | GITIGNORE=1 | RLS=1 | POLICY=1 | DESTRUCTIVE=0
--------------------------------------------------------------------------
SQL TABLE RLS AUDIT:
- public.invoices [RLS=OFF | POLICIES=0] (supabase/migrations/001_init.sql:3)
- public.user_profiles [RLS=ON | POLICIES=0] (supabase/migrations/001_init.sql:11)
--------------------------------------------------------------------------
[BLOCKED] Pre-deploy gate REJECTED target: 5 blocking finding(s) detected. DO NOT DEPLOY.
FINDINGS:
1. [CRITICAL] CLIENT_SECRET_EXPOSURE (BLOCKING) at .env:2
Detail : Client-exposed env variable 'NEXT_PUBLIC_STRIPE_SECRET' contains secret/key material.
Evidence : NEXT_PUBLIC_STRIPE_SECRET=sk_live_TE***REDACTED***aabb
Fix : Remove the client prefix (NEXT_PUBLIC_/VITE_/PUBLIC_), move the secret to a server-only env var, and rotate the exposed key.
2. [CRITICAL] HARDCODED_SECRET (BLOCKING) at src/server_client.ts:3
Detail : Hardcoded credential detected in source: Supabase secret key (sb_secret_).
Evidence : const SUPABASE_SERVICE_KEY = "sb_secret_***REDACTED***9900";
Fix : Replace the hardcoded literal with a server-side environment variable lookup and rotate the exposed credential.
3. [CRITICAL] RLS_MISSING (BLOCKING) at supabase/migrations/001_init.sql:3
Detail : Table 'public.invoices' is created without ENABLE ROW LEVEL SECURITY.
Evidence : CREATE TABLE public.invoices (
Fix : Add 'ALTER TABLE public.invoices ENABLE ROW LEVEL SECURITY;' and explicit least-privilege CREATE POLICY rules in SQL migrations.
4. [HIGH] GITIGNORE_GAP (BLOCKING) at .env:1
Detail : Secret env file '.env' is not covered by .gitignore.
Evidence : .env (uncovered by .gitignore)
Fix : Add '.env' (or '.env' and '.env.*') to .gitignore and verify it is untracked in git.
5. [HIGH] POLICY_MISSING (BLOCKING) at supabase/migrations/001_init.sql:18
Detail : Table 'public.user_profiles' enables Row-Level Security but defines zero CREATE POLICY rules.
Evidence : ALTER TABLE public.user_profiles ENABLE ROW LEVEL SECURITY;
Fix : Add explicit least-privilege CREATE POLICY ... ON public.user_profiles statements (for example scoped to auth.uid()).
==========================================================================
# Exit code: 1
2. PASS Gate — Clean Fixture Approved (exit code 0)
$ python scripts/vibe_predeploy_gate.py --target examples/sample_app_pass --policy examples/audit_policy.json
==========================================================================
VIBE-APP PRE-DEPLOY SECRETS & RLS AUDIT GATE -- STATIC REPORT
==========================================================================
Target : examples/sample_app_pass
Policy : strict-predeploy-default (fail_on=CRITICAL,HIGH)
Mode : 100% Static Scan (zero code execution, offline)
Summary : Files=5 | Tables=2 | Findings=0 | Blocking=0
Severity Count : CRITICAL=0 | HIGH=0 | MEDIUM=0 | LOW=0
Rule Counts : CLIENT_SECRET=0 | HARDCODED=0 | GITIGNORE=0 | RLS=0 | POLICY=0 | DESTRUCTIVE=0
--------------------------------------------------------------------------
SQL TABLE RLS AUDIT:
- public.invoices [RLS=ON | POLICIES=1] (supabase/migrations/001_init.sql:3)
- public.user_profiles [RLS=ON | POLICIES=1] (supabase/migrations/001_init.sql:18)
--------------------------------------------------------------------------
[PASS] Pre-deploy gate APPROVED target: 0 blocking finding(s) across 5 file(s) and 2 table(s).
==========================================================================
# Exit code: 0
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.
Static analysis only. Does not execute code or SQL. Requires Python 3 standard library. Audit is limited to files matching configured globs.
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
- Software
Python
Git
Permissions
Allowed Hosts