-
Database
Make sure tenants can't see each other's data
Audits every query in a multi-tenant app to confirm it is scoped by tenant or organization ID, and adds the missing filters.
Free Prompt
What This Does / How This Helps
Checks every query in your app for tenant scoping and closes the ones that leak across organizations. The classic multi-tenant bug is a single missing WHERE clause. One endpoint forgets to filter by organization ID and suddenly any logged-in user can read another company's invoices, customers, or messages by guessing IDs. It is the worst kind of breach: quiet, undetectable from the outside, and usually found by a customer, not by you. AI-generated queries almost never scope by tenant because the model has no idea your app is multi-tenant unless you say so. This prompt audits the whole data layer, fixes the gaps, centralizes scoping so future queries inherit it, and gives you the cross-tenant test to prove isolation holds.
Want to skip doing this by hand?
Fortivibe audits your app for all of the areas these prompts cover (and more).