# Supabase & Firebase Security Check for AI-Built Apps

> Built your app with an AI builder? Your agent finds the leaked keys, open tables and fake-able webhooks, proves each one read-only and drafts the fix.

Supabase & Firebase Security Check for AI-Built Apps is a subscription AI agent skill on Agensi by ELVOR STUDIO, in Security. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $12/mo (subscription, cancel anytime)
- Creator: [ELVOR STUDIO](https://www.agensi.io/creators/elvor-studio)
- Category: [Security](https://www.agensi.io/skills/security)
- Version: 1.0
- Last updated: 2026-12-04
- Security: scan passed (2026-12-04); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/supabase-firebase-security-check-for-ai-built-apps
- Tags: security, supabase, firebase, rls, api-keys, vibe-coding, lovable

## What it does

- Finds Supabase service-role, Stripe, OpenAI and other keys shipped to the browser or committed to git
- Flags secret env vars with a VITE_ or NEXT_PUBLIC_ prefix, which get built into your frontend
- Reads Supabase migrations: tables without RLS, write-anyone policies, user_metadata role checks
- Optional read-only live check shows how many rows anyone can read with your public anon key
- Catches Firebase test-mode rules, fake-able Stripe payment events, and admin routes with no login check
- Drafts the RLS fix SQL, re-scans to prove what is closed, and can add a GitHub Actions gate

## Who it's for

- **Lovable, Bolt and Cursor builders:** A clear list of what is exposed, with the fixes, before strangers find it Try: "Check my Lovable app for security holes before I launch"
- **Indie SaaS founders on Supabase:** Proof that customer data and API keys are locked down, with a re-scan that shows it Try: "Is my Supabase RLS set up correctly? Scan the project and fix what's wrong"
- **Agencies shipping client MVPs:** A security report with evidence to hand over, and a CI gate that stops regressions Try: "Run a security gate on this repo and add it to GitHub Actions"

## About this skill

Apps built with AI tools ship fast and often ship open. Large audits of vibe-coded apps keep finding the same holes: Supabase tables with no row-level security, service-role keys in the frontend, and payment webhooks that accept fake events.

This skill finds those holes in your project, proves which ones are real, drafts the fix and re-scans to show each one is closed.

**How it works**

1. **Scan.** A zero-dependency scanner reads your project locally: code, env files, built bundles, Supabase migrations, Firebase rules and edge functions.
2. **Verify.** Your agent opens every finding and drops false alarms. Each finding comes with the file, the line and the evidence, with keys masked.
3. **Prove** (optional, with your permission). A read-only live check with your public anon key shows which tables anyone can read and how many rows they can see. It downloads no rows and never writes.
4. **Fix.** With your go-ahead, the agent moves secrets out of the frontend, adapts the drafted RLS migration to how your app really uses each table, and adds Stripe signature checks and auth checks. Rotating keys and applying migrations stay your call; the report tells you exactly where to rotate each key.
5. **Re-scan.** The report shows what is fixed, what is new and what is still open since the last scan.
6. **Gate.** Optionally, add a GitHub Actions check that fails any pull request that brings a high or critical issue back.

**Proof:** on a demo app built with the usual AI-builder mistakes, the scan failed the gate with 5 critical, 3 high and 6 medium findings, and all 14 were real when the agent opened them. After the first batch of fixes, the re-scan showed 5 fixed, 0 new and 9 still open.

**What you get**

- `report.md`: every finding with severity, location, evidence, why it matters and the exact fix, in plain words
- `fixes/vibegate_rls_fix.sql`: draft policies using `(select auth.uid())` on the owner column it detects
- `report.json` for tooling, a before/after comparison on every re-scan, and `.vibegate-ignore.json` for risks you accept on purpose

**Private by design.** Everything runs on your machine. No code leaves it, reports mask every key, and the report folder has its own `.gitignore` so it is never committed.

**Who it is for:** builders using Lovable, Bolt, Cursor, v0 or Replit, indie SaaS founders on Supabase, and agencies shipping client MVPs who need a report to hand over.

**How it is built:** a Node 18+ scanner with no dependencies and nothing to install. It sends no network requests unless you approve the live check, which uses only GET and HEAD. It detects 14 key types, public-prefix env vars, RLS state from migrations, Firebase rules, Stripe webhooks and service-role routes.

**Honest scope.** It closes the common holes. It does not certify an app as secure, test live writes, or audit dependencies (run `npm audit` for those).

## Requires

- Node.js 18+
- Optional: Supabase project (live check only)

## Known limitations

It closes the common holes but does not certify an app as secure, test live writes or audit dependencies. Rotating leaked keys stays your job; the report links where to do it. The live check only counts readable rows and never downloads your data.

## Technical details

Node 18+ scanner (scripts/vibegate.mjs) with no dependencies and nothing to install. It sends no network requests unless you approve --probe, which uses only GET and HEAD with Prefer: count=exact against your Supabase REST API.

Commands: `vibegate.mjs scan <project> [--probe] [--fail-on high] [--out dir]` and `vibegate.mjs install-ci <project>`. Exit codes: 0 gate passed, 1 gate failed, 2 usage error. Output goes to <project>/.vibegate/: report.md, report.json, report.prev.json, fixes/.

Detects 14 key types; public-prefix env vars (VITE_, NEXT_PUBLIC_, EXPO_PUBLIC_, REACT_APP_, PUBLIC_); committed .env files; RLS state from migrations (tables, policies, views, SECURITY DEFINER functions, storage buckets); Firestore, Storage and Realtime Database rules; Stripe webhooks; service-role routes; verify_jwt in supabase/config.toml.

## 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 Supabase & Firebase Security Check for AI-Built Apps skill from Agensi" and describe your task.
3. Subscribe 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

### How is this different from npm audit or a linter?

npm audit checks your dependencies, which this skill doesn't. This checks your own app: keys shipped to the browser, tables without row-level security, Firebase rules left in test mode, webhooks that accept fake events, and admin routes with no login check.

### Do I need any special software or accounts to run a scan?

You only need your project folder and a computer with Node 18 or later. If you want the skill to prove a vulnerability is real, you can optionally provide your Supabase URL and public key so it can try a safe, read-only test.

### What files or reports will I get after the scan finishes?

You receive a detailed report in a folder named .vibegate that lists every issue and how serious it is. If the skill finds database problems, it also creates the exact SQL code files you need to lock your tables and fix the holes.

### Can this skill automatically fix my leaked API keys?

It cannot cancel or replace stolen API keys for you. You must go to your service provider, like Stripe, to get a new key, though the skill will show you exactly which code needs to be updated.

### How do I tell my AI agent to start the security check?

You can ask your agent to scan for leaked keys, check your Supabase security rules, or perform a security check before you launch your app. Just make sure to tell the agent which folder your project is located in.

### Can I use this to keep my app safe as I continue to build it?

The skill can set up an automatic check for your project that runs every time you make an update. This ensures that new features do not accidentally introduce new security risks or leaked secrets.

---

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.
