Your app has a login. Customers see their own invoices. Supabase says RLS is enabled.
Another customer may still be able to open an invoice they should never see.
The question is what happens when they try.
You can start checking without reading database code. You need two test customers, some made-up data, and a clear idea of who should be allowed to do what.
What RLS actually does
Row Level Security, or RLS, lets you set rules for which records a person can read or change in your database, where the app stores its information.
For an app used by several companies, the rule might be: employees can access their own company’s invoices.
But a rule that allows anyone who has logged in to read invoices would give far too much access. RLS could be switched on while that rule is still wrong for your app. Supabase’s RLS documentation explains how these rules work.
There can also be a gap elsewhere. The invoice screen might check permissions correctly while the PDF export does not. Some background code uses powerful access that can bypass the usual database restrictions, so it must check which customer’s data it is allowed to return. Supabase documents this privileged access.
That is why the checks need to cover what customers can view, change and download.
For a technical example to share with your developer, see how a review checks whether one company can read another’s invoices.
Seven checks before you invite customers
Use a test version of your app with made-up information. Ask your developer or Lovable to help set one up if you do not have one. Use disposable records for editing and deletion tests.
1. Create two ordinary test customers
Create Customer A and Customer B. If your app has companies or workspaces, put them in separate ones with no shared access.
Give each customer a clearly labelled test invoice and a private test file.
Sign in as A in your normal browser window and as B in a private window. Check the account name in each window so you know which customer you are using.
First confirm that each customer can open their own invoice and file. If they are allowed to edit invoices, confirm that editing their own test invoice works too.
Expected result: both customers can do what they are supposed to do with their own information.
2. Try opening the other customer’s invoice
While signed in as A, open A’s test invoice and copy its page address from the browser.
Paste that address into the window where you are signed in as B.
Expected result: B cannot see A’s private invoice. The app might show an access message, a missing-page message, or redirect B.
A crash or a general error needs investigation. It does not establish that the permission check worked.
If your app has no separate page address for an invoice, ask your developer or coding agent to perform this check. A coding agent is an AI assistant that can inspect and change your app’s code and run checks.
Opening the link checks that particular page. Also ask them to test the request behind the screen: the message your browser sends to retrieve the invoice. Does the server, which stores and returns the data, refuse B too?
An app can hide information on screen while still sending it to someone who should not receive it. Lovable’s security guidance explains why permissions need to be enforced on the server.
3. Check changes as well as viewing
Ask your developer or coding agent to test whether B can change or delete A’s disposable invoice, or create a new invoice under A’s company.
They should first confirm that the equivalent permitted action works on B’s own test data. Then they should repeat it against A’s data using B’s ordinary customer account.
Afterward, open A’s account and check the actual records.
Expected result: A’s invoice is unchanged, it still exists, and no unauthorized invoice has been added.
Include account permissions in this check. Can an ordinary customer change their company or role in a way that gives them access they should not have? Have this tested even if those fields are hidden from the settings screen.
A missing edit button only answers what the screen allows someone to click. The underlying permission still needs checking.
4. Try downloads and exports
Repeat the wrong-customer check for private files, invoice PDFs and exports. Include reports or search features that display customer information.
Ask for a test where B requests A’s export or download. If an export takes time to generate, check the finished file too.
Expected result: B cannot obtain A’s private information through any of the features tested.
One detail can be confusing: a temporary download link may work without a login until it expires. Supabase calls this a signed URL.
Opening a valid link in a private window is not automatically a security failure. The important check is whether B can get the app to issue a link to A’s file. Supabase explains public and private file access here.
5. Check access after signing out or removing a member
In a fresh private browser session, try opening the protected invoice page without signing in.
If your app has team members, also remove a test member from a company and check whether they can still request its private information. Check the window where that member is already signed in, then repeat after signing in again.
Expected result: someone without the required access cannot obtain fresh private data. Decide how quickly removed members should lose access, then have that behavior tested.
A file already downloaded to someone’s computer will not disappear when they sign out. Check fresh requests for information, and ask how long existing temporary download links remain valid.
6. Run the built-in security checks
In your Supabase project dashboard, open Security Advisor and refresh the findings. It checks for known problems in the database’s security settings. Read about Supabase Advisors.
If you use Lovable, open the project’s Security view. Run the Quick security scan and Deep security scan when their results need updating.
Quick checks cover areas such as database settings and software packages. Deep scan also examines the application code and permissions. Read about Lovable security scans.
For each finding, ask:
- What could someone do because of this?
- Which customer information or feature is affected?
- What change is needed?
- What test will show that the change worked?
Some findings may have a valid explanation. Record that explanation. After a fix, rerun the relevant checks.
Expected result: you have an explanation and a next step for each finding. You also have the customer tests above to check your app’s specific access rules.
7. Keep the checks after the fix
Ask your developer or coding agent to save these scenarios as automatic tests. They should run again when the app changes.
Include both sides: customers can use their own data, and they are refused access to another customer’s private data. Supabase supports automated tests for these access rules.
Rerun them after changes to login, company membership, permissions, downloads or exports.
Expected result: a future change that breaks a tested permission causes a test to fail before release.
Other automatic checks worth asking for
These are useful checks to ask your developer or coding agent about. The right setup depends on how your app is built.
Ask which checks they ran, what they found, and what remains untested.
| Check | What it does in plain language |
|---|---|
| Supabase database lint | Checks for certain mistakes in the database’s internal code. The developer command is supabase db lint. It is separate from Security Advisor. |
| Automatic access tests | Repeat the two-customer checks against the database and the app’s features. |
| Secret scanning, such as Gitleaks | Looks for private credentials accidentally included in code or files sent to the browser. |
| Dependency scanning, such as npm audit | Checks the software packages your app uses for known security problems. |
| Code security scanning, such as Semgrep | Looks for risky patterns covered by the scanner’s rules. |
The tools have different jobs. A successful database lint check, for example, does not show whether Customer B can download Customer A’s invoice. That needs a test of the download behavior.
The official guides describe Supabase linting, Gitleaks, npm audit and Semgrep.
A request you can give Lovable or your developer
Copy this and adjust “invoices” to the private information your app handles:
Check whether one customer can access another customer’s private data in this app.
Use a test environment with two ordinary customer accounts in separate companies and made-up invoices and files. First confirm each customer can use their own data.
Then test whether either customer can view, create, change, delete, export or download the other company’s information. Test requests directly to the server as well as through the screens, using ordinary customer permissions.
Check whether customers can change their company membership or role to gain access. Include signed-out users and removed team members.
Run Supabase Security Advisor, Supabase database lint, and the available code, secret and dependency checks. If you cannot run a check, say so.
Explain each finding in plain language, show the test result, and propose the fix. Keep RLS enabled and preserve the intended separation between customers. After fixing an issue, rerun the permitted and forbidden actions and keep them as automatic tests.
Ask for the results of the checks. “I reviewed the code and it looks secure” leaves you without evidence of what the app actually allowed.
If you are still learning how to give an AI assistant a clear task, the beginner’s guide to AI coding skills and agent tools explains how to define the behavior and review the result.
Your final checklist
- Not checked: Both test customers can use their own information.
- Not checked: One customer cannot open the other’s private records.
- Not checked: Unauthorized changes and deletions have been tested, and the records checked afterward.
- Not checked: Downloads, exports and private files have been checked.
- Not checked: Company membership, roles, signed-out access and removed members have been checked.
- Not checked: Scanner findings have been fixed or have a documented explanation.
- Not checked: The access tests will run again when the app changes.
- Not checked: The checks cover the version of the app you intend to share.
Keep a short record of what was tested, the result, and anything still untested. Leave an item unchecked until the corresponding work has been done.
Before you invite real customers, you should be able to show how you checked that one customer’s private information stays out of another customer’s account.
Want an independent review?
I review the agreed parts of your Supabase setup and application code using read-only access or supplied material. You receive prioritized findings, practical recommendations and a walkthrough of what needs attention.