Report
Add Pro plan with Stripe checkout, Nov 24PushedNormal check1 s of 6 min
Fix before you push
3Anyone could send fake payment events to your app
Your app acts on messages that claim to come from a service like Stripe without checking they are real. Someone could send a fake 'payment succeeded' message and unlock paid features for free.
Webhook in route.ts trusts payloads without checking the signature
- Where
app/api/webhooks/stripe/route.ts:3- Found by
- IntentiAI check: Missing sign-in check. Confidence: medium.
Webhooks have to be public, so the only thing proving a request came from the provider is its signature. Without that check, anyone who finds the URL can post a fake event (a paid invoice, a completed checkout, a cancelled subscription) and this code will act on it.
How to fix it
In app/api/webhooks/stripe/route.ts, check that every incoming message really comes from the provider before acting on it.
Fix prompt
In app/api/webhooks/stripe/route.ts around line 3, the webhook handler trusts incoming messages without checking that they really come from the provider. Verify the provider's signature with its official library and the webhook signing secret from the environment settings, using the raw request body, and reject any message that fails before doing anything else. Valid messages should keep working as they do now.
A database change could freeze your app while it runs
This database change can lock a table or rewrite every row. While it runs, people using your app could get errors or pages that never load, and on a big table that can last minutes.
Column saves is dropped from recipes while the running app may still read it
- Where
supabase/migrations/003_plans.sql:1- Found by
- IntentiAI check: Unsafe database change. Confidence: high.
Removing saves is irreversible and takes an exclusive lock on recipes. Any code still reading saves (including the version of your app that is running right now, and anything outside this repo) starts erroring the moment the migration lands.
How to fix it
Split the database change in supabase/migrations/003_plans.sql into smaller steps that do not lock the table.
Fix prompt
The database migration in supabase/migrations/003_plans.sql around line 1 can lock or rewrite a whole table while it runs. Rewrite it using the safe pattern for this database (for example, building indexes without locking the table, adding constraints in two steps, and setting a lock timeout), so the app keeps working during the deploy. Explain each step you changed.
Anyone with your public key can read and change every row
This change creates a table without turning on row level security. Your public key ships in every page, so anyone who copies it can read, change or delete every row in that table.
Table subscriptions is created without row level security
- Where
supabase/migrations/003_plans.sql:2- Found by
- IntentiAI check: Other check. Confidence: high.
Supabase puts the public (anon) key in every page of the app. A table in the public schema without row level security can be read, changed and emptied by anyone who copies that key, signed in or not.
How to fix it
Turn on row level security for the new table in supabase/migrations/003_plans.sql and add rules for who may read and change its rows.
Fix prompt
In supabase/migrations/003_plans.sql around line 2, a new table is created without row level security. In the same database change, turn row level security on for that table and add policies so each signed-in user can only read and change their own rows (or nobody, if only the server should use it). Do not change other tables.
Not urgent
1Good to know
Good to know1
Your package list changed but the locked versions did not
The list of packages changed, but the file that pins their exact versions was not updated. Your deploy may install different versions than you tested, or fail.
Dependencies changed but the lockfile did not
- Where
package.json:1- Found by
- IntentiAI check: Package not installed. Confidence: high.
Your machine has whatever was already installed, so it works locally. CI and production install from the lockfile, so they get the old set. The build either fails or, worse, silently runs different versions than you tested.
How to fix it
Run your package manager's install command and include the updated version file it writes.
Fix prompt
The dependencies in package.json changed but the lockfile was not updated. Run the project's package manager install so the lockfile matches, and include it in this change.
Checked at commit 77ffa02.