Your Lovable app works. You can sign up, add records and see everything on a tidy dashboard. But does that mean it is safe to put in front of customers?
Not yet. A working feature proves that the intended journey works. Security checks ask whether someone can step outside that journey, access another customer’s information or perform an action they should not control.
My starting point in our Pretoria workshop is simple: **test what the app refuses to do, not only what it allows.** The same approach applies to apps built with Bolt or Cursor.
You do not need to become a security specialist to make a useful first pass. You do need to know where a DIY check stops.
## Start with two accounts and dummy data
Test only an app you own or have explicit permission to assess. Use a separate test environment where possible, with made-up records rather than real customer information.
Create:
- **Account A:** an ordinary customer with a few records and an uploaded file.
- **Account B:** a different customer who should not see those records.
- **An administrator account:** only if your app has admin functions.
Use separate browser profiles to keep sessions apart. Write down what each account should be able to read, create, change and delete.
For a team-based app, include two separate organisations. Two users in the same organisation will not tell you whether the boundary between customers works.
## Check whether users can access each other’s records
Login answers “Who are you?” Authorisation answers “Are you allowed to do this?” Your app needs both.
Open one of Account A’s records and copy its address. Sign in as Account B and try opening that address. Repeat with an edit page and a file download.
The expected result is a refusal or a response that does not expose the protected information. Seeing a blank dashboard is not enough if a direct link still works.
For someone comfortable with browser developer tools, inspect the app’s network requests. On your own test records, check whether a request made as Account B can retrieve or modify Account A’s data by changing the record identifier. If that feels unfamiliar, ask a developer to run the check with you.
Also test while signed out. Protected data should not be returned simply because somebody knows its address.
**The server or database must enforce these permissions.** Hiding a button in the interface does not stop a request reaching the underlying service.
## Review database permissions, especially with Supabase
If your app uses Supabase, inspect the tables holding customer data and review their Row Level Security policies.
Enabling Row Level Security is only part of the job. Policies must match the actual ownership rules for your app. A policy that allows every signed-in user to read every row may still expose one customer’s records to another.
For each table, ask:
- Who may read its rows?
- Who may insert new rows, and how is ownership assigned?
- Who may update or delete existing rows?
- Can a user change the owner or organisation attached to a record?
Check server-side functions too. A privileged backend credential may bypass database policies, so the function must verify the caller and their permissions itself.
Do not blindly paste an AI-generated policy into production. Test that legitimate actions still work and forbidden actions fail.
## Find secrets that reached the browser
Anything delivered to a visitor’s browser should be treated as visible to that visitor. This includes JavaScript files, network responses and configuration embedded in the page.
Review your code and deployment settings for:
- Database passwords or connection strings.
- Privileged backend keys.
- Private API keys for email or AI services.
- Credentials committed to the repository or printed in logs.
Not every key is secret. For example, Supabase publishable keys, and legacy anon keys, are intended for client-side use with correctly configured permissions. Secret keys and service-role keys must stay on the backend.
A variable being called an “environment variable” does not automatically make it private. Some build settings deliberately include variables in browser code.
If a real secret has been exposed, remove it from the exposed location **and rotate or revoke it with the provider**. Deleting the visible line does not make the old credential safe again.
## Test uploads, admin actions and background work
Security gaps often sit beside the main feature rather than inside it.
### Uploaded files
Check whether documents are stored in a public or private location. A hard-to-guess filename is not an access policy.
Try accessing Account A’s private file as Account B and while signed out. If your app uses temporary signed links, remember that anyone holding a valid link may be able to use it until it expires. Make sure that behaviour fits the file’s sensitivity.
### Admin functions
An ordinary account should not be able to grant itself administrator privileges or call admin actions directly. Test the underlying action, not only whether the admin menu is hidden.
### Background tasks and integrations
Check functions that send emails, generate reports or call paid APIs. They should validate the caller where required and restrict what the request can trigger.
For incoming webhooks, verify the sender using the provider’s documented mechanism. Do not assume a request is genuine because it reached the right URL.
## Look for a chain, not just isolated warnings
Imagine a hypothetical customer portal with three weaknesses:
1. A customer-list endpoint returns records from every organisation.
2. Those records contain links to uploaded documents.
3. The documents sit in publicly readable storage.
Each finding matters, but together they create a clear route from an ordinary login to other customers’ files.
Fixing only the dashboard display would leave that route open. You need to restrict the records returned and protect the files themselves.
This is why I would prioritise a demonstrated path to private data over a long list of cosmetic warnings. For a broader review of AI-assisted development, see our [startup security guide](/ai-for-startups-security).
## Decide what needs fixing before launch
Pause a launch involving private customer data if testing shows cross-account access, exposed privileged credentials or unauthorised admin actions. Fix the cause, then repeat the failing test and a legitimate user journey.
Keep a small record of each finding: what happened, what should have happened, the fix and the retest result. For apps handling sensitive documents or complex permissions, bring in an experienced security reviewer rather than relying on a checklist alone.
[Patchly](/apps/patchly) offers a free self-serve scan for apps built with Lovable, Bolt and Cursor. It reviews code for weaknesses and how they could combine, then opens pull requests for fixes that the founder or development team reviews and merges.
That can support this process, but a code scan is not a guarantee. Live permissions, deployment settings and the behaviour of the running app still need checking.
## FAQ
### Does using Lovable make my app insecure?
No. Security depends on the resulting code, permissions, integrations and deployment settings, not simply the tool used to build it. AI-generated features still need review and testing.
### Is a working login enough to protect customer data?
No. Login establishes identity, but every protected action also needs a permission check. Test with separate customer accounts to confirm those boundaries hold.
### Can I ask AI to fix the security issues?
Yes, but treat its proposed changes as code that needs review. Retest both the forbidden action and the legitimate workflow before accepting the fix.
### When should I repeat these checks?
Repeat relevant checks when you change authentication, permissions, database structure, uploads or integrations. Keep the checks as repeatable tests where possible, so later changes do not quietly restore an old problem.
