Kenny ỌláwúwoLinks, prompts and checklist

Shipping secure
AI-generated code

For anyone shipping apps built with AI tools.

LovableBoltReplitCursorClaude CodeCodexChatGPT

How an app works

1

Front end

Website or phone app. Anyone can read it.

2

Back end

Your server. Decides who can do what.

3

Database

Every user's data, stored together.

4

Services

Payments, AI, email. Each needs a key.

You log in on your phone → the server checks you → reads the database → calls services with its keys.

"It works" is not "it's safe"

Sam builds an expense tracker with AI in an afternoon.

It works ✓

Alice signs up, adds a £42 lunch and sees her dashboard. Every button works.

It leaks ✗

Bob changes one word in the web address and sees Alice's spending.

Safe asks: who else can do this?

When AI-built apps leak

  • Mar 2025

    Lovable apps: 170 apps with no database rules. Strangers could read user data. CVE

  • Jul 2025

    Base44: anyone could join private company apps using the ID in the address bar. Wiz

  • Jul 2025

    Tea: open storage leaked 72,000 photos, including 13,000 IDs. The Record

  • Jan 2026

    Moltbook: key in the browser, no rules. 1.5M API tokens exposed. Wiz

  • Feb 2026

    Lovable: public projects' code and AI chats readable for 11 weeks. Lovable

When agents and platforms go wrong

  • Jul 2025

    Replit: an AI agent deleted a live company database during a code freeze. Fortune

  • Aug 2025

    Nx: a poisoned package made victims' own AI tools hunt for secrets. Wiz

  • Nov 2025

    Shai-Hulud: a worm spread through npm and leaked secrets to 25,000 repos. The Register

  • Dec 2025

    Antigravity: asked to clear a cache, an agent wiped a whole drive. The Register

  • Oct 2026

    Railway: attackers reached customers' secret keys. Everyone had to rotate. GitGuardian

How often it happens

28.6M

keys leaked on public GitHub in 2025

GitGuardian 2026
45%

of AI code samples had a known security flaw

Veracode 2025
2,000+

flaws found in 5,600 vibe-coded apps

Escape 2025
5,000

vibe-coded apps leaking private data

Axios 2026
6 → 35

AI-caused vulnerabilities a month, Jan to Mar 2026

Georgia Tech 2026
1 in 5

AI code samples used a package that doesn't exist

USENIX 2025

Four things to protect

1

People

Accounts and logins

2

Data

Anything users wouldn't post publicly

3

Keys

Passwords your app uses for other services

4

Money

AI, email and storage cost per use

For each: who can reach it, and what stops everyone else?

1Keys in the browser are public

What a visitor sees in the app's files

    

Keep keys on the server. Give each one limited access, a spend cap and an expiry date.

2Logged in is not allowed

Authentication: who you are. Authorisation: what you may see.

Bob is logged in

Pick a request.

Developers: take the user from the session, never from the request.

3Your database needs rules

With Supabase or Firebase, the browser talks to the database directly. Rules are the only lock.

-- Supabase Row Level Security
alter table expenses
  enable row level security;

create policy "own rows" on expenses
  for select to authenticated
  using (auth.uid() = user_id);
Bob loads expenses
owneritem£
aliceRent380
aliceLunch42
bobTrain96
bobFood84

Rules are off.

4Anything a user sends can be faked

Text

A name field holding commands for your database.

Files

"invoice.pdf" that is really a script, or 4 GB.

Prices and roles

"price: £0.01" or "role: admin" sent from the browser.

Check it on the server, every time.

5No limits, no ceiling on the bill

Without limits

A bot presses your "summarise with AI" button 50,000 times overnight. You find out from the invoice.

With limits

  • Spend caps on AI and email
  • Rate limits per person
  • Bot checks on sign-up
  • Alerts when usage jumps

Set an AI spend limit tonight. It takes two minutes.

6Give AI agents intern access

Test, not live

The agent builds on a copy. Live data stays out of reach.

Check installs

AI invents package names. Attackers register them.

Watch what it reads

Pages and docs can hide instructions for your agent.

Ask: what's the worst it could do with this access?

More to check before launch

  • Admin and staging pages behind a login
  • Payment webhooks verified
  • Debug mode off in production
  • File storage private by default
  • Reset links expire and work once
  • Logs never store keys or passwords
  • CORS only your own sites
  • Packages kept up to date

How to fix each one: see the links page.

Don't build it yourself. Rent it.

Secret keys

Vercel · Railway · Cloudflare · Doppler · Infisical

Bots and limits

Turnstile · hCaptcha · Upstash

Tip: name the service in your prompt. "Use Clerk for sign-in" beats "add login".

Cloudflare features to switch on

Access

Lock admin pages behind a login. Free for 50 users.

AI Gateway

Dollar spend limits and caching for AI calls.

Turnstile

Free bot check. No puzzles.

Rate limiting

Cap hits on login, sign-up and AI.

Bot Fight Mode

One switch for known bad bots.

WAF rules

Block common attacks automatically.

Keep your code safe

Free scanners

GitHub stars as of November 2026.

Use AI to review AI

Reviewers

Security skills

Check add-ons

26% of public skills had problems.

A finding is a lead, not proof.

Find it. Fix it. Prove it.


    

Three things to tell your AI

Before you build

"Keep every secret key on the server. Use managed sign-in and database rules."

Before you launch

"Attack this app. Can one user see another's data? Prove each fix with a test."

Before it runs

"Never touch the live database. Ask me before deleting or deploying."

Full copyable prompts are on the links page.

The five-minute check

0 of 12 checked

Before you go

Tonight

Turn on 2FA. Set spend limits. Try to see one account's data from another.

This week

Switch on database rules, push protection and Dependabot.

Every release

Run the five-minute check. Keep AI away from live data.

AI changes who can build software.
Not who is responsible for it.

Scan for every link and the checklist