Open source · Apache-2.0

The PatchLabs checks, on your own machine.

patchlabs is a free command-line scanner for apps built with Lovable, Supabase, Bolt, Replit or Cursor. It reads your Supabase SQL, your code and your dependency list, and can grade one live page. It never connects to a database and never runs your code.

Install and run

You need Python 3.9 or later and nothing else: the CLI has no dependencies.

terminal
pipx install git+https://github.com/manra399/patchlabs-cli
patchlabs scan .                         # your repo: Supabase SQL, code, dependencies
patchlabs headers https://your-app.com   # one page load, graded A to F

No install at all: uvx --from git+https://github.com/manra399/patchlabs-cli patchlabs scan .

What it checks

  • Supabase row level security (PL-001 to PL-008): tables without RLS, policies that let anyone or any signed-in user read every row, always-true conditions, UPDATE policies without WITH CHECK, exposed SECURITY DEFINER functions and public buckets.
  • Risky code (PL-010, PL-017 to PL-026): service role keys in browser code, open edge functions, unsigned payment webhooks, access decided by user_metadata, browser-only admin checks, raw HTML, Firebase rules and CORS.
  • Claude Code settings (PL-009): tokens and passwords saved in .claude/settings.local.json or .claude/settings.json by “don’t ask again” approvals, a committed local settings file, and packages whose npm publish would ship it. Why this file leaks.
  • Dependencies (PL-023): npm packages with a published advisory, from OSV. Only package names and versions are sent; --offline skips it.
  • Live headers (PL-027 to PL-036): HTTPS redirect, certificate, HSTS, CSP, framing, cookies, mixed content, version headers and referrer policy, from one ordinary page load.

In CI

Exit code 1 means a finding at or above --fail-on (default high). --sarif results.sarif writes SARIF 2.1.0, so GitHub code scanning shows each finding on the line it came from. The README has a ready-made GitHub Actions workflow.

What it doesn’t do

The CLI reads text, so it reports patterns, not proof. It can’t tell you who can actually read a table. The hosted Lab does that: it rebuilds your database in a throwaway copy and queries it as an anonymous visitor, a signed-in stranger and the owner. Then Fix writes the migration and re-tests it before your engineer approves. That part stays hosted, and it is free for your first app.