V.I.B.Eby TNAADO

Lovable app security check

See who can reach your records before you share the link.

Check my data
  • Member list is open
  • V.I.B.E reads your database rules
  • Each person sees their own

Query

Read-only. It lists table rules, file storage rules and permissions, and changes nothing.

View the query
-- V.I.B.E database check. Read-only: it lists table rules, file storage rules and
-- permissions from the system catalogs. It does not read, change or delete any rows.
with api(role) as (values ('anon'), ('authenticated')),
listed as (
  -- Schemas the web API is set to serve, where that setting is kept in the database.
  select pg_catalog.btrim(part.name, ' "') as name
  from pg_catalog.pg_db_role_setting s
  join pg_catalog.pg_roles r on r.oid = s.setrole
  cross join lateral pg_catalog.unnest(s.setconfig) as c(item)
  cross join lateral pg_catalog.unnest(pg_catalog.string_to_array(pg_catalog.split_part(c.item, '=', 2), ',')) as part(name)
  where r.rolname = 'authenticator' and pg_catalog.starts_with(c.item, 'pgrst.db_schemas=')
    and s.setdatabase in (0, (select d.oid from pg_catalog.pg_database d where d.datname = pg_catalog.current_database()))
),
spaces as (
  select n.oid, n.nspname from pg_catalog.pg_namespace n
  where n.nspname = 'public' or (
    n.nspname::text !~ '^(pg_|_)' and n.nspname not in ('information_schema', 'auth', 'storage', 'extensions',
      'graphql', 'graphql_public', 'realtime', 'vault', 'pgsodium', 'pgsodium_masks', 'supabase_functions',
      'supabase_migrations', 'supavisor', 'net', 'cron', 'pgbouncer', 'pgmq')
    and exists (select 1 from api a join pg_catalog.pg_roles r on r.rolname = a.role
      where pg_catalog.has_schema_privilege(r.oid, n.oid, 'usage')))
),
reach as (
  select s.oid as space, a.role from api a
  join pg_catalog.pg_roles r on r.rolname = a.role
  cross join (select oid from spaces union select n.oid from pg_catalog.pg_namespace n where n.nspname = 'storage') s
  where pg_catalog.has_schema_privilege(r.oid, s.oid, 'usage')
),
rel as (
  select c.oid, c.relnamespace as space, c.relkind, c.relrowsecurity, c.reloptions, s.nspname,
    case when s.nspname = 'public' then c.relname::text else s.nspname::text || '.' || c.relname::text end as label
  from pg_catalog.pg_class c join spaces s on s.oid = c.relnamespace
  where c.relkind in ('r', 'p', 'v', 'm', 'f')
    and not exists (select 1 from pg_catalog.pg_depend d
      where d.classid = 'pg_catalog.pg_class'::pg_catalog.regclass::pg_catalog.oid and d.objid = c.oid and d.deptype = 'e')
),
files as (
  select c.oid, c.relnamespace as space, c.relkind, c.relrowsecurity
  from pg_catalog.pg_class c join pg_catalog.pg_namespace n on n.oid = c.relnamespace
  where n.nspname = 'storage' and c.relname = 'objects' and c.relkind in ('r', 'p')
),
target as (
  select oid, space, relkind from rel union all select oid, space, relkind from files
),
grants as (
  select target.oid, reach.role, pg_catalog.array_remove(array[
    case when pg_catalog.has_any_column_privilege(reach.role, target.oid, 'select') then 'read' end,
    case when pg_catalog.has_any_column_privilege(reach.role, target.oid, 'insert') and target.relkind <> 'm'
      and (target.relkind <> 'v' or pg_catalog.pg_relation_is_updatable(target.oid, true) & 8 <> 0) then 'add' end,
    case when pg_catalog.has_any_column_privilege(reach.role, target.oid, 'update') and target.relkind <> 'm'
      and (target.relkind <> 'v' or pg_catalog.pg_relation_is_updatable(target.oid, true) & 4 <> 0) then 'change' end,
    case when pg_catalog.has_table_privilege(reach.role, target.oid, 'delete') and target.relkind <> 'm'
      and (target.relkind <> 'v' or pg_catalog.pg_relation_is_updatable(target.oid, true) & 16 <> 0) then 'delete' end
  ], null) as can,
  pg_catalog.array_remove(array[
    case when target.relkind in ('r', 'p', 'f') and pg_catalog.has_table_privilege(reach.role, target.oid, 'truncate') then 'truncate' end,
    case when target.relkind in ('r', 'p', 'f') and pg_catalog.has_table_privilege(reach.role, target.oid, 'trigger') then 'trigger' end
  ], null) as extra,
  not pg_catalog.has_table_privilege(reach.role, target.oid, 'select') as some_columns
  from target join reach on reach.space = target.space
),
definer as (
  select f.oid, f.proname, f.prokind, s.nspname,
    case when s.nspname = 'public' then f.proname::text else s.nspname::text || '.' || f.proname::text end as label,
    pg_catalog.pg_get_function_identity_arguments(f.oid) as args,
    f.prorettype in ('pg_catalog.trigger'::pg_catalog.regtype::pg_catalog.oid,
      'pg_catalog.event_trigger'::pg_catalog.regtype::pg_catalog.oid) as is_trigger,
    exists (select 1 from pg_catalog.unnest(f.proconfig) as setting(item)
      where pg_catalog.starts_with(setting.item, 'search_path=')) as fixed_path,
    exists (select 1 from reach where reach.space = s.oid and role = 'anon')
      and pg_catalog.has_function_privilege('anon', f.oid, 'execute') as anon,
    exists (select 1 from reach where reach.space = s.oid and role = 'authenticated')
      and pg_catalog.has_function_privilege('authenticated', f.oid, 'execute') as signed_in
  from pg_catalog.pg_proc f join spaces s on s.oid = f.pronamespace
  where f.prosecdef
    and not exists (select 1 from pg_catalog.pg_depend d
      where d.classid = 'pg_catalog.pg_proc'::pg_catalog.regclass::pg_catalog.oid and d.objid = f.oid and d.deptype = 'e')
)
select pg_catalog.json_build_object(
  'vibe', 1,
  'schemas', (select coalesce(pg_catalog.json_agg(pg_catalog.json_build_object(
      'name', s.nspname, 'exposed', exists (select 1 from listed where listed.name = s.nspname)
    ) order by s.nspname), '[]') from spaces s where s.nspname <> 'public'),
  'tables', (select coalesce(pg_catalog.json_agg(pg_catalog.json_build_object(
      'name', rel.label, 'schema', rel.nspname,
      'kind', case rel.relkind when 'v' then 'view' when 'm' then 'materialized' when 'f' then 'foreign' else 'table' end,
      'rls', rel.relrowsecurity,
      'invoker', coalesce(pg_catalog.array_to_string(rel.reloptions, ',') ~* 'security_invoker=(t|y|on|1)', false),
      'anon', coalesce(pg_catalog.to_json(a.can), '[]'),
      'signedIn', coalesce(pg_catalog.to_json(u.can), '[]'),
      'anonExtra', coalesce(pg_catalog.to_json(a.extra), '[]'),
      'signedInExtra', coalesce(pg_catalog.to_json(u.extra), '[]'),
      'someColumns', case when 'read' = any(a.can) or 'read' = any(u.can)
        then (a.some_columns or not coalesce('read' = any(a.can), false)) and (u.some_columns or not coalesce('read' = any(u.can), false))
        else false end
    ) order by rel.label), '[]') from rel
    left join grants a on a.oid = rel.oid and a.role = 'anon'
    left join grants u on u.oid = rel.oid and u.role = 'authenticated'),
  'policies', (select coalesce(pg_catalog.json_agg(pg_catalog.json_build_object(
      'table', rel.label, 'schema', rel.nspname, 'name', p.policyname, 'permissive', p.permissive = 'PERMISSIVE',
      'command', p.cmd, 'roles', p.roles, 'using', p.qual, 'check', p.with_check
    ) order by rel.label, p.policyname), '[]')
    from pg_catalog.pg_policies p join rel on rel.nspname = p.schemaname
      and rel.label = case when p.schemaname = 'public' then p.tablename::text else p.schemaname::text || '.' || p.tablename::text end),
  'functions', (select coalesce(pg_catalog.json_agg(pg_catalog.json_build_object(
      'name', d.label, 'schema', d.nspname, 'args', d.args,
      'kind', case d.prokind when 'p' then 'procedure' else 'function' end,
      'anon', d.anon, 'signedIn', d.signed_in
    ) order by d.label, d.args), '[]') from definer d where not d.is_trigger),
  'loosePaths', (select coalesce(pg_catalog.json_agg(pg_catalog.json_build_object(
      'name', d.label, 'schema', d.nspname, 'args', d.args,
      'kind', case d.prokind when 'p' then 'procedure' else 'function' end,
      'web', not d.is_trigger and (d.anon or d.signed_in)
    ) order by d.label, d.args), '[]') from definer d where not d.fixed_path),
  'storage', (select pg_catalog.json_build_object(
      'rls', files.relrowsecurity,
      'anon', coalesce((select pg_catalog.to_json(g.can) from grants g where g.oid = files.oid and g.role = 'anon'), '[]'),
      'signedIn', coalesce((select pg_catalog.to_json(g.can) from grants g where g.oid = files.oid and g.role = 'authenticated'), '[]'),
      'policies', (select coalesce(pg_catalog.json_agg(pg_catalog.json_build_object(
          'table', 'storage.objects', 'name', p.policyname, 'permissive', p.permissive = 'PERMISSIVE',
          'command', p.cmd, 'roles', p.roles, 'using', p.qual, 'check', p.with_check
        ) order by p.policyname), '[]')
        from pg_catalog.pg_policies p where p.schemaname = 'storage' and p.tablename = 'objects')
    ) from files)
) as vibe_report;

Examples

Where to run it in Lovable
  • Open More, then Database
  • Choose Manage, then SQL editor
  • Paste the query and press Run
  • Press Copy JSON and paste the result here
Checks
  • Tables with row security switched off
  • Rules open to anyone or to any account
  • Rules that trust details people can edit
  • Saved actions and views that skip rules
  • File storage rules

A member list every account can read

This made-up project keeps profiles and orders. One rule hands every profile to any signed-in person. Another lets someone change orders when their sign-in details say admin, although people can edit those details themselves. If strangers can register in your app, both doors are open to them. The repaired copy ties each row to its owner.

  • A rule on “orders” trusts details users can changePolicy "Admins can update orders" (UPDATE, authenticated): using (((auth.jwt() -> 'user_metadata'::text) ->> 'role'::text) = 'admin'::text), check none

    Keep roles in app_metadata, or a table only your server can change.

  • Any signed-in user can read every row in “profiles”Policy "Signed in users can view profiles" (SELECT, authenticated): using true, check none

    Replace it with a rule that checks who owns each row.

Checked again after the fix: none of these results come back.

Does Lovable check security for you?

Partly. Lovable says automatic checks of database access, tools reachable without sign-in and vulnerable packages run when you open the publish dialog. Its advanced checks generally wait until you start or schedule them. Lovable also says its checks cannot guarantee that an app is secure.

What to do

Read the security view before publishing and start the advanced checks yourself. Treat the query above as a second reading in plain words.

Do real projects leave records open?

Some do. A study published by Crissy Field searched a public web archive for Lovable projects seen between December 2025 and September 2026. It identified 159,041 projects, of which 34,545 used Supabase, and counted 24,664 pages that sent database records to a visitor who had not signed in. On 7,403 of those pages, about three in ten, a table held email addresses. A record sent this way may be meant for the public, so the figures are not a count of leaks and say nothing about your project. Lovable’s built-in database was not examined.

What to do

Run the query on your own project. Then open the published app in a private window and notice which records appear before you sign in.

What stops when credits run out?

Lovable says published pages keep serving while backend services, such as the database, file storage and sign-in, pause. AI features inside the app fail without showing a message once their allowance and your credits are used up. Your data is kept, but you cannot open or export it until services restart. To a visitor this can look like a normal page with a form that goes nowhere.

What to do

Watch the balance, or switch on automatic top-up on a paid plan. After adding credits, open More, then Database, and choose Wake up.

Will undoing a change bring records back?

No. Lovable says reverting to an earlier version restores code only. Records added or edited since then stay as they are, and so do structure changes made by an accepted draft. Separate daily backups reach back roughly 14 days, so a mistake noticed after three weeks can be older than every copy. Restoring one loses newer records, cannot be undone and leaves uploaded files out.

What to do

Before a database fix, open More, Database, Manage, then Settings, and export the data. Download uploaded files from Storage as well.

Can a stranger call your server functions?

They can send them a request. Lovable says anyone who knows the address of a server function or edge function can do that, so each one has to check who is asking. A function that sends email, changes an order or spends AI credits without such a check serves whoever finds it.

What to do

Paste one function at a time into the key and server code check linked below. Ask Lovable to add a caller check wherever one is missing.

Should .env stay in your repository?

In a Lovable project, yes. Lovable says it needs that file committed so previews and published builds can read values beginning VITE_. Those values are built into the code visitors download, so only public ones belong there. Payment keys and AI provider keys go in its Secrets manager.

What to do

If a private key ever sat in the file, replace it, save the new one in Secrets and keep the file itself.

Was your project public in spring 2026?

On 22 April 2026 Lovable reported that other users holding a link could view the chat history and source code of public projects between 3 February and 20 April. It says private projects and Lovable Cloud were not affected, and that this access has been closed.

What to do

If yours was public then, we suggest replacing every password or key that was typed into the chat or written in the code.

A shared link that still says Lovable App

This made-up page went live with its starter title. The free website check reports it, because a browser tab or shared link may show those words where your business name belongs. With a title of its own, the page passes.

  • Your page still shows Lovable’s starter detailsIn the page as sent

    In Lovable, ask in the project chat for your own page title, description and social sharing picture, or open the publish dialog and choose Social & search appearance in its ⋮ menu. Publish, because the live site changes only then. Run this check again.

Checked again after the fix: none of these results come back.

Why can’t search tools find your app?

Lovable says apps created from 13 May 2026, or 22 June on Enterprise plans, send finished pages from the server. Older ones are rendered for verified search and AI crawlers, so another tool may receive an almost empty page. Unpublished projects, restricted ones and branded workspace addresses never appear in search.

What to do

Use URL Inspection in Google Search Console to see what Google receives. On a workspace address, connect your own domain first.

Which address do customers end up on?

The lovable.app address cannot be removed. Once your own domain is marked primary, the other connected domains and the lovable.app address redirect to it. With no primary, nothing redirects and each connected domain serves the app equally.

What to do

Mark your domain primary in the project’s domain settings, then open the old address and watch it forward.

What does one query leave unread?

It reads table rules, file storage rules and permissions. It never reads your rows, tries the app from outside or looks at server functions, secrets or your credit balance. We have not yet run it inside a Lovable project of our own. The editor may ask you to confirm, because the query names permissions such as delete, although it only reads. A clean result means the listed checks found no match.

Fix one thing, publish and prove it

In Plan mode, ask for a single change, read the plan and approve it. Try it with two different accounts, publish the changes and run the query again. Then enter your published address in the free website check. Security results there appear once you prove the app is yours.

Sources, read 30 November 2026

V.I.B.E is made by TNAADO. It is not part of, or endorsed by, Lovable or Supabase.

Advanced app builds

TNAADO builds multiplatform products that take payments and protect sensitive data.

Start a project