# Is my vibe-coded app safe enough to take payments? A security checklist

> A vibe-coded app security checklist for payments: secret keys, database rules, server-side prices, and how a Cherry mini-app keeps keys out of your code.


Not by default. A vibe-coded app is ready to take payments once its secret keys sit on a server, every database table has access rules, the server decides the price and who has paid, and no private key or card number passes through your code. The checklist below takes them in the order they tend to break.

The riskiest rows on that list are the ones about other people's money, and you can hand them off. List your web app as a mini-app in [Cherry.fun](https://cherry.fun/learn/features/cherry-wallet/), a self-custody wallet, and your app never touches the user's keys: Cherry checks each transaction against your app's limits, and the user approves or declines it on their own screen. A small team can take payments without holding anyone's funds.

## Why do vibe-coded apps ship with security holes?

Because an AI agent aims for code that runs, and most security mistakes run fine. A table without access rules returns data, a secret key in a front-end file works, and a price sent from the browser checks out. No error ever appears to flag the problem.

The holes are old ones. Broken access control is A01, the top entry, in the [OWASP Top 10 for 2025](https://owasp.org/Top10/2025/), with security misconfiguration second. On Supabase, the [row-level security docs](https://supabase.com/docs/guides/database/postgres/row-level-security) warn that a table in an exposed schema without RLS is readable and writable by any role with a grant on it. Builders now scan for these holes. The scans have limits, and Lovable's [security overview](https://docs.lovable.dev/features/security) says its tools help find common issues and cannot ensure complete security.

## What belongs on a vibe-coded app security checklist?

Eight checks, and you can confirm each one in your own code before launch.

| Check | What goes wrong | What to do |
|---|---|---|
| Secrets out of the bundle | Vite [bundles every `VITE_` variable](https://vite.dev/guide/env-and-mode) into client code at build time | Keep payment, AI and database secret keys in server code or edge functions |
| Database keys | A Supabase [secret key](https://supabase.com/docs/guides/api/api-keys) bypasses every row-level security policy | Ship only the publishable key; the secret key stays on your server |
| Row-level security | A table without it is open to any role with a grant | Turn it on for every exposed table and write a policy per role |
| Endpoint auth | Routes anyone can call, upload to or send messages through | Check who the caller is on every route, on the server |
| Prices and delivery | A customer edits the price or reaches the paid feature without paying | Set prices on the server; deliver only after the server confirms payment |
| Payment signals | A forged "payment succeeded" request | Verify every webhook; for Stripe, check the [signature header against the raw body](https://docs.stripe.com/webhooks) |
| Dependencies | A package with a known vulnerability | Run your builder's dependency audit or [`npm audit`](https://docs.npmjs.com/cli/v10/commands/npm-audit) before each release |
| Your builder's scan | Findings that do not stop the publish | Read every critical finding and fix it before you share the link |

The last row matters on Lovable in particular. Its quick scan runs on every publish and covers database rules, dependencies and exposed MCP servers, and the [publish docs](https://docs.lovable.dev/features/deploy) say findings do not block publishing by default. The deep scan reads the whole codebase, including payment logic, so run it before the first paid feature goes live.

Two habits keep the list honest. Ask your agent to check its own diff against the table before each deploy, and read every line that moves money yourself.

## What changes once real money moves through the app?

The cost of a bug. A leak in a notes app exposes notes; a bug in payment code gives paid items away or sends money to the wrong place, and the refunds and disputes are yours to handle. Three rules follow:

- **Store as little as you can.** Every card number, private key or recovery phrase your server keeps is something a breach can leak. If your code never receives them, it cannot lose them.
- **Leave users' balances in their own wallets.** A server wallet holding everyone's funds is one target with everyone's money in it. Cherry's [Mini App Policy](https://portal.cherry.fun/docs/mini-apps/policy) lists custody of user funds among the regulated financial services that only licensed partners may offer.
- **Let the user approve each payment.** A payment the user signs, for an amount shown on their own screen, leaves no room for a silent charge.

If any of these terms are new, the [seed phrase explainer](https://cherry.fun/learn/glossary/what-is-a-seed-phrase/) covers what a recovery phrase is and why nobody should ask for one.

## Which checks does a Cherry mini-app hand to the wallet?

The wallet half of the list, meaning keys, signing, the connect screen and spending limits. Cherry's [wallet and limits docs](https://portal.cherry.fun/docs/mini-apps/wallet) describe each one.

- The user's keys stay on their device. Neither your app nor Cherry's servers receive them, and neither can sign for the user.
- Cherry checks each request against your app's trust tier before showing it, then the user approves or declines. A new listing is Unverified: $50 per transaction and $50 per wallet per day in your app.
- Token approvals and delegation, recurring subscriptions, authority changes and delayed (durable-nonce) transactions are refused for Unverified and Verified apps.
- When a transaction calls your own program, Cherry simulates it and shows the user what leaves their wallet and what arrives.
- Users arrive signed in with a launch token, so your app has no wallet-connect button to build and no login signature to ask for.

Your database rules, your server routes and the launch token stay with you. Verify the token on your backend, key users by the stable account ID in the token, and trust only what is inside the verified token. Query parameters and messages over the bridge are not signed, as the [authentication docs](https://portal.cherry.fun/docs/mini-apps/authentication) point out.

```ts
import { verifyLaunchToken } from '@cherrydotfun/miniapp-sdk';

const claims = await verifyLaunchToken(token, { appId: APP_ID });
const userId = claims.cherry_id ?? claims.sub; // key your users by this
```

Label every transaction in plain words so the user knows what they are paying for. Cherry's docs state that its limits and checks are its own tools and do not promise that a transaction is safe, so the checklist still covers everything outside the wallet.

## How Cherry does it

You list the app yourself at [portal.cherry.fun](https://portal.cherry.fun), free, with no review queue. It then opens inside Cherry on iPhone, Android, the Solana Seeker and the web, so it reaches App Store, Google Play and Solana dApp Store users through Cherry, which is on those stores, without a store listing or store review of your own.

The listing wizard writes an integration brief for Claude Code, Cursor or Codex that ends in a self-check list. Then the [automated test](https://portal.cherry.fun/docs/mini-apps/listing#automated-test) opens your app the way a user would. If your app sends the launch token to its own server, the test replays it with a token for another app and with an expired one, and your backend has to refuse both. It also fails an app that shows its own connect-wallet button. A broken token check gets caught before any user opens the app.

Your users fund their wallets inside Cherry with a card, Apple Pay, Google Pay or PayPal, so your app builds no on-ramp and no checkout. They hold wallets on Solana, BNB, Base and Robinhood Chain, and a mini-app asks them to sign Solana transactions. From day one you can sell items, charge for access or take a commission. For bigger payments, one identity check of the project owner makes every project [Verified](https://portal.cherry.fun/docs/mini-apps/verification), at $1,000 per transaction and $5,000 per wallet per day; Verified confirms who you are and is not a review of the app. Cherry asks no fee, and a voluntary tip is welcome.

With the wallet half handled, your checklist shrinks to your own server and database. Start with [listing a mini-app for free](https://cherry.fun/learn/features/list-a-mini-app-for-free/), follow [how to publish a vibe-coded app](https://cherry.fun/learn/guides/how-to-publish-a-vibe-coded-app/) step by step, and read [charging from day one](https://cherry.fun/learn/guides/how-to-monetize-a-vibe-coded-app/) for pricing. If the app is not finished yet, [I vibe-coded an app, now what?](https://cherry.fun/learn/guides/vibe-coded-an-app-now-what/) covers hosting first.

Get Cherry on [iPhone](https://apps.apple.com/app/cherry-fun-solana-messenger/id6749173799), [Android](https://play.google.com/store/apps/details?id=fun.cherry) or [the web](https://chat.cherry.fun) to see how a mini-app opens for your users.

## FAQ

### Are vibe-coded apps safe?

Not by default. AI builders write code that works, and working code can still expose secret keys, leave database tables open or trust a price sent from the browser. Run the checklist before the app handles real data or money.

### Can I put my Supabase key in the front end?

Only the publishable key. Supabase's docs say anyone can read it, so it reaches only what row-level security allows. The secret key bypasses every policy and must never leave your server.

### Does Lovable's security scan make my app secure?

It catches common mistakes, not all of them. Lovable runs a quick scan of database rules, dependencies and exposed MCP servers on every publish, findings do not block publishing by default, and Lovable's docs say its tools cannot ensure complete security. Run the deep scan too and fix critical findings first.

### Can a Cherry mini-app move a user's funds without asking?

No. Every signature request goes to the user, who approves or declines it in Cherry, and neither your app nor Cherry can sign for them. Token approvals and delegation are refused for Unverified and Verified apps, so an app cannot set itself up to spend later.

### Does a Verified badge mean Cherry audited my app?

No. Verified means the project owner passed an identity check. Cherry has not reviewed, tested or audited the app, and its docs tell developers never to present the badge as a safety mark.

## Sources

- [Cherry Portal for developers](https://portal.cherry.fun)
- [Cherry docs: Wallet and limits](https://portal.cherry.fun/docs/mini-apps/wallet)
- [Cherry docs: Authentication](https://portal.cherry.fun/docs/mini-apps/authentication)
- [Cherry docs: Listing and publishing](https://portal.cherry.fun/docs/mini-apps/listing)
- [Cherry docs: Verification](https://portal.cherry.fun/docs/mini-apps/verification)
- [Cherry docs: Mini App Policy](https://portal.cherry.fun/docs/mini-apps/policy)
- [OWASP Top 10:2025](https://owasp.org/Top10/2025/)
- [Supabase docs: Row Level Security](https://supabase.com/docs/guides/database/postgres/row-level-security)
- [Supabase docs: API keys](https://supabase.com/docs/guides/api/api-keys)
- [Vite docs: Env variables and modes](https://vite.dev/guide/env-and-mode)
- [Lovable docs: Security overview](https://docs.lovable.dev/features/security)
- [Lovable docs: Publish your app](https://docs.lovable.dev/features/deploy)
- [Stripe docs: Webhooks](https://docs.stripe.com/webhooks)
- [npm docs: npm audit](https://docs.npmjs.com/cli/v10/commands/npm-audit)

