# SaaS Security Preflight: Supabase RLS, Keys, Stripe

> Read-only security scan for Supabase, Next.js/Vite, Express, Cloudflare and Stripe apps: severity-ranked findings with file:line evidence, the fix and how to verify it.

SaaS Security Preflight: Supabase RLS, Keys, Stripe is a paid AI agent skill on Agensi by Nate Freed, in Security. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $5 (one-time purchase)
- Creator: [Nate Freed](https://www.agensi.io/creators/nate-freed)
- Category: [Security](https://www.agensi.io/skills/security)
- Version: 1.0
- Last updated: 2026-11-28
- Security: scan passed (2026-11-28); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/saas-security-preflight-supabase-rls-keys-stripe
- Tags: security, code-quality-review, apis-backend

## About this skill

Run a security preflight on your SaaS repo before launch. Your agent runs a read-only scanner, reads the code behind every finding, and returns a ranked report. Each finding comes with file:line evidence, why it matters, the exact fix and how to verify that fix. It targets the holes indie stacks actually ship: Supabase tables without RLS, policies that let anon write or forge user_id, service-role keys in browser code or NEXT_PUBLIC_/VITE_ variables, clients that fall back to the service-role key, JWT secrets with a hardcoded fallback, login, signup and demo-login routes with no rate limit, Stripe webhooks without signature checks, de-duplication or proper error codes, admin-key checks that leak timing or pass when the env var is missing, debug routes in production, credentialed wildcard CORS, weak cookie flags, committed .env files (names only, never opened) and public storage buckets. It includes a local RLS test that switches between the anon and authenticated roles on a disposable database, plus an allowlist for accepted findings. It changes code only with your OK.

## Requires

- Python 3.8+
- The app's repo on disk
- Optional: Git (committed .env checks)
- Optional: psql + local Postgres or Supabase CLI

## Known limitations

Static analysis of source text: no type information, runtime or network, so it can miss issues hidden behind indirection and can flag safe code (your agent triages each one). Tuned for Supabase, Next.js, Vite/React, Express/Hono/Node, Cloudflare Pages/Workers and Stripe; other stacks get little coverage. It does not check dependency CVEs, dashboard-only settings or live deployments. IDOR and RPC review is a short manual pass, not exhaustive. The RLS behaviour test needs psql and a disposable local database.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the SaaS Security Preflight: Supabase RLS, Keys, Stripe skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### Does it change my code or read my .env files?

No. The scan is read-only and never opens .env, .dev.vars or key files; it lists their names only and masks any secret it quotes. Fixes happen one at a time, only after you approve each diff.

### My app has no Supabase. Is it still useful?

Yes for Express, Hono, Next.js API routes, Cloudflare Workers and Stripe: secret fallbacks, rate limits, webhooks, key comparisons, debug routes, CORS, cookies and committed .env files. The RLS checks switch off and the report says so.

### What about false positives?

Your agent opens the code behind each finding and labels it confirmed, by design or false positive. Accepted findings go into an allowlist file with a reason and optional expiry, so later runs stay quiet about them.

### Can it run in CI?

Yes. The scanner exits 1 when a finding is at or above --fail-on (default high), and it can print JSON or markdown.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
