Safety checks and database changes

The automatic checks that protect your data and keys, and how database changes go live safely.

Two of the most common beginner mistakes are leaving data open to anyone and leaking a password or key. Bumper Lanes checks for both automatically, every time.

The safety checks

Every pull request runs four Checks — Does it build?, Do the tests pass?, Is your data protected? and Any secrets leaked?. If one fails, the pull request shows a red ✗ — ask your agent to fix it before you merge. Your agent also runs these checks itself (they're part of npm test), so most problems are caught before they ever reach GitHub. The two safety checks are explained below.

1. Row Level Security on every table

Your app talks to your database with a publishable key that anyone can see in the browser. What keeps your data safe is Row Level Security (RLS): rules on each table that say who may read or change which rows. A table without RLS can be read — and changed — by anyone.

The check reads your database changes (supabase/migrations/) and fails if any table your app can reach doesn't have RLS switched on. The add-data skill always adds RLS and the rules for you.

2. No secrets in your project

Passwords and keys (Supabase secret keys, database passwords, AI and email service keys, private keys) must never be in your project files. Anything pushed to GitHub should be treated as leaked, even in a private repository.

The check looks through every file that would be saved to GitHub and fails if it finds something that looks like a secret — telling you the file, the line, and where to get a replacement.

If a real key was pushed: removing it isn't enough, because it stays in your project history. Replace ("rotate") it where it came from (for example, Supabase → Project Settings → API Keys), then update the new value in Vercel or GitHub settings.

GitHub push protection: some GitHub plans can block a push that contains a key (Settings → Advanced Security → Push protection). If you see that option, turn it on. On GitHub's free plan it's usually only available for public repositories — which is why Bumper Lanes runs its own check.

How database changes go live

Your agent never touches your live database. Instead:

  1. Your agent writes the change as a file in supabase/migrations/ (one file per change) and opens a pull request. The safety checks run.
  2. You check the preview and merge.
  3. The Database changes workflow (GitHub → Actions) then:
    1. checks every table has Row Level Security (and stops if not),
    2. backs up your data,
    3. applies only the changes that haven't been applied yet.

If a change fails, it's rolled back — your database stays as it was — and no later changes run. The workflow's summary says what happened, and the backup from step 2 is there if you need to go further back (ask your agent to restore).

Changes are applied after merging, so your preview site may not show a new table until then. Ask your agent if you need to test a database change first.