← Branch HQ · Claims vs code

What Bookly told the reviewer, and what its code does.

Five questions from a customer's security review. For each one, Bookly's answer, what the code actually does, and the exact file and line that proves it.

5answers checked against the code
5contradicted by the code
10file:line proofs, keys masked

Q1Can a customer only see their own data?

Bookly said

"Yes. Access to customer records is restricted so each customer can only see their own bookings."

The code
Contradicts the answer

The bookings table has no row-level security, so anyone with the public key every visitor's browser holds can read every booking. A database function also runs any SQL it is given, and the website calls it.

supabase/migrations/20260101000000_init.sql:1create table public.bookings (
supabase/migrations/20260101000000_init.sql:15create or replace function public.exec_sql(sql text) returns void language plpgsql security definer as $$ begin execute sql; end $$;
src/components/Admin.tsx:10return supabase.rpc('exec_sql', { sql })

Q2Are passwords and keys kept out of the source code?

Bookly said

"Yes. All secrets are stored in environment variables, never in code."

The code
Contradicts the answer

An admin password and the Supabase admin key (which bypasses every database rule) are written into the code, and the file of secrets is committed to the repository.

src/components/Admin.tsx:3const ADMIN_PASSWORD = 'book…'
src/integrations/supabase/client.ts:5const SUPABASE_KEY = 'eyJ…'
.envcommitted to the repository

Q3Are third-party API keys kept on the server?

Bookly said

"Yes. Calls to outside services are made from our backend."

The code
Contradicts the answer

The OpenAI key is read from a VITE_ setting, which is copied into the website itself, so every visitor can read it and spend on it.

src/components/Assistant.tsx:3const openai = new OpenAI({ apiKey: import.meta.env.VITE_OPENAI_API_KEY, dangerouslyAllowBrowser: true })
.env:3VITE_OPENAI_API_KEY=sk-p…

Q4Are database queries protected against injection?

Bookly said

"Yes. All queries are parameterised."

The code
Contradicts the answer

A name a visitor types is pasted straight into the SQL text, so they can read or delete data they should not reach.

server/index.ts:9const rows = await db.query(`SELECT * FROM bookings WHERE customer_name = '${name}'`)

Q5Does the server only accept requests from your own website?

Bookly said

"Yes. Cross-origin requests are restricted to our domain."

The code
Contradicts the answer

The server accepts requests from any website together with the visitor's login cookies, so another site can act as a logged-in user.

server/index.ts:5app.use(cors({ origin: true, credentials: true }))

How this was produced

What this does not cover

Get your code reviewed

Bookly is a demo app we built with the mistakes AI app builders most often ship with. Its answers are examples of what companies typically write. Every key in it is fake.