Share a productSign in
Newsletter

Vibe-coded app security: 10 checks before launch

trythevibe editorial team

2 views

Check keys, data access, payments and API costs before launch, with a real RLS case, ten practical checks and a small scanner you can run with fake keys.

1. A working screen still needs a data check

Sign-up works, a photo uploads, and the payment button appears. Before sharing the link, check a different set of behaviors: another user cannot read the photo, an unsigned payment event cannot grant access, and the browser never receives a server credential. A successful feature demo and a rejected unauthorized request provide different evidence. This issue helps you collect the second kind for your own app.

Checked as of November 11, 2026. Time allocations and test procedures below are editorial suggestions, not a security certification or legal advice. Work only on your own local project or an authorized test environment. Use synthetic records rather than downloading real customers' information. There is no need to examine anyone else's app.

CVE-2025-48757, disclosed in May 2025, illustrates the problem. NVD describes insufficient database row-level security in Lovable-generated sites through April 15, 2025, potentially allowing unauthenticated reading or writing. The record also says the supplier disputes the CVE because customers accept responsibility for protecting their application data. Matt Palmer's May 29 disclosure describes missing or insufficient RLS. This historical record is not evidence that every Lovable app is currently vulnerable.

https://nvd.nist.gov/vuln/detail/CVE-2025-48757 https://mattpalmer.io/posts/2025/05/CVE-2025-48757/

A visible public client key was not, by itself, the central mistake. The database still had to enforce which rows the caller could access. Supabase publishable keys and legacy anon keys can be used in clients; secret keys and legacy service_role keys have elevated privileges and bypass RLS, so they belong on controlled servers. Secret handling and access policies need separate checks.

https://supabase.com/docs/guides/getting-started/api-keys

Lovable's current documentation describes security scanning features. A cleared warning still needs to be followed by tests of your actual ownership rules. We leave out app counts and leaked-record totals that we could not sufficiently corroborate against the original evidence, and do not identify individual small makers.

https://docs.lovable.dev/features/security

2. Tell the AI what must fail

“Let users upload a photo and see a result” describes a happy path. “User B must never read user A's private photo” and “no paid request runs after the allowance is exhausted” describe boundaries. This is an explanation of an incomplete specification, not a claim that research proves all AI tools make the same mistakes.

A browser calling a paid API directly can expose a server credential. A permissive database rule can make a prototype work while removing user isolation. Hiding an admin menu does not secure the corresponding server operation. Next.js explicitly says to treat Server Actions as directly reachable entry points and verify authentication and authorization inside each one.

https://nextjs.org/docs/app/guides/data-security

Try allocating 10 minutes to prepare, 40 minutes for an initial pass, and 10 minutes to record results. Fixing findings takes additional time. In an isolated test project, create fictional users A and B and an admin, using invented records. Do not copy personal data when preparing a test environment.

For each check, record the file or setting, expected behavior, actual result and remaining fix. Ask the AI which request was rejected and why, rather than whether the app “looks secure.” Mark unrun checks as unverified. A missing payment or upload feature can be marked not applicable, with a reason, and reviewed when added.

Separate public browser keys, server secrets and database access policies

The copy-paste prompts below deliberately use identical English across all editions so their contracts stay consistent. Ask the agent to explain its results in your preferred language. Finish and inspect one check before moving to the next.

3. Checks 1–2: secrets and data access

1) Are secrets absent from source, public repositories and browser bundles?

Check paid API credentials, database passwords and signing secrets. An environment variable is not automatically private: client code can bundle its value. Distinguish browser-exported configuration from server-only variables. A Supabase publishable key is not automatically a leaked secret.

How to check: inspect your own deployed JavaScript in browser DevTools Sources. Run the scanner below against the folder actually shipped to browsers, such as dist or .next/static. In GitHub, inspect secret scanning alerts under Security or Security and quality. Deleting a value from the current file does not remove earlier commits. GitHub documents scanning Git history and promptly rotating exposed credentials.

If a credential may have leaked, do not paste it into chat or a report. Revoke or rotate it with its provider, update server configuration and rebuild. Check old deployments and cached artifacts too. Deleting text does not invalidate a copied key. Rewriting shared Git history can lose collaborators' work, so do not let an agent do that automatically.

https://docs.github.com/en/code-security/concepts/secret-security/secret-scanning https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/removing-sensitive-data-from-a-repository

Audit only my project for secrets in source, Git-tracked files and browser build output. Report file paths and line numbers without printing secret values. Keep server credentials in server-only environment variables. If a leak is suspected, list provider revocation/rotation steps and rebuild steps; do not rotate or rewrite Git history automatically. Add a local check that fails on candidate leaks.

2) Do RLS or Firebase rules match your ownership rules?

“Any signed-in user” and “the owner of this record” are different policies. Specify read, create, update and delete separately. Include Supabase views, RPCs and Storage buckets as well as tables. For Firebase, review database and file-storage rules separately.

How to check: open RLS status and Policies for your tables in your own Supabase dashboard. Use anonymous, user A and user B test contexts against synthetic records. An admin credential bypassing the rules cannot demonstrate user isolation. For Firebase, inspect Rules in the console and use the local Emulator Suite to test signed-out, owner and other-user access. Check that permissive test-mode rules have not survived into the launch configuration. Review changes in a test environment before applying them.

https://supabase.com/docs/guides/database/postgres/row-level-security https://firebase.google.com/docs/rules/basics https://firebase.google.com/docs/rules/unit-tests

Inventory my Supabase tables, views, RPCs and Storage buckets, or my Firebase database and Storage rules. For each operation, state who may read or write. Deny by default where data is private. Add local tests for anonymous, owner A, other user B and admin; test reads and writes. Never use an admin credential to prove user isolation. Show migrations or rules for review; do not apply them to production.

4. Checks 3–5: server entry points and input

3) Does every API and Server Action verify identity and permission?

Authentication identifies a caller. Authorization decides whether that caller may perform this operation on this record. Do not trust user_id or isAdmin supplied in a request. Derive identity from a verified server session and compare it with trusted ownership or role data. A page-level sign-in check does not automatically protect its actions.

How to check: ask the AI for every route and action, including file paths. Attach results for no session, owner A, other user B and admin. These must all be your own test identities. Review read endpoints too. In DevTools Network, check that synthetic responses do not include unnecessary email addresses, billing details or private fields. Record a rejected request, not just one successful request.

List every API route and Server Action in my app. Verify the session on the server, then authorize the caller for the specific record and operation before reading or mutating data. Derive user identity and roles from trusted server data, not request fields. Add tests for no session, a different owner and a normal user calling an admin action. Work locally only.

4) Is input validated on the server?

Define required fields, types, string lengths, numeric ranges and allowed properties. Prices, roles and ownership should come from trusted server data. A browser character limit is a usability feature; enforce the limit again at the server. Input validation does not replace parameterized database queries or output escaping.

How to check: use your local form and server tests with a missing value, wrong type and a string longer than your chosen limit. Include an unexpected field and confirm that it is not saved. Inspect query code for parameter binding instead of string concatenation. Return useful errors without echoing personal payloads, internal queries or stack traces.

https://cheatsheetseries.owasp.org/cheatsheets/Input_Validation_Cheat_Sheet.html

Validate all external input at the server boundary: types, lengths, ranges, allowed fields and allowed URL schemes where relevant. Derive prices, roles and owner IDs from trusted server data. Use parameterized queries. Add local cases for missing fields, wrong types, oversized input and unauthorized fields; reject them without echoing personal data.

5) Are uploads bounded and private where needed?

Set allowed formats, byte and image-dimension limits, and per-user storage allowances. A résumé PDF and an avatar need different policies; there is no universal size limit in this article. Do not trust a filename or Content-Type alone. Check content on the server, generate storage names, and keep private documents in private storage.

How to check: review the server upload handler and Storage rules together. Use self-made synthetic files: one allowed, one oversized and one disallowed format. Confirm rejection by the server or storage service, rather than only by the upload button. User B must not be able to open user A's private test file. Do not use customer documents for this exercise.

https://cheatsheetseries.owasp.org/cheatsheets/File_Upload_Cheat_Sheet.html

Audit my upload path on the server and in Storage rules. Define allowed formats, byte and dimension limits, per-user quotas and read permissions. Do not trust a filename or Content-Type alone. Generate storage names and keep private uploads private. Add local rejection tests with synthetic files; do not upload real personal files or change production buckets.

5. Checks 6–8: payments, cost and administration

6) Is the payment webhook signature checked first?

A success screen or a browser-supplied payment flag should not grant paid access. Let the server verify the provider's event. For Stripe, inspect verification using the unmodified raw request body, Stripe-Signature and the correct endpoint secret through its official SDK. Keep test and live secrets separate.

How to check: in local test mode, exercise a valid signature, an invalid signature and delivery of the same event twice. Invalid signatures must leave order state unchanged; duplicate events must not grant credits twice. Record event consumption and entitlement changes in a safe atomic operation. Verify order, amount, currency and payment state against trusted provider data. No real card charge is needed.

https://docs.stripe.com/events/manage-webhook-endpoints

Audit my payment webhook using the provider's official SDK. Verify the signature against the unmodified raw body before any state change. Use the correct endpoint secret for each environment. Deduplicate events transactionally and verify the order, amount, currency and payment state from trusted provider data. Test invalid signatures and duplicate events in local test mode only; do not charge a card.

7) Do paid AI calls stop at your allowance?

Keeping the API key server-side does not prevent an unrestricted generate endpoint from spending money. Define per-user and global allowances, concurrency, input/output bounds and retry limits. Counters held only in each server's memory do not establish a shared global allowance. Check and reserve persistent shared usage atomically before a call.

How to check: replace the paid provider with a local fake response. Exhaust a deliberately small test allowance and verify that rejected requests make no additional provider call. A failed limiter must not turn into unlimited access. Check billing alert recipients and request-stopping settings separately.

At the check date, OpenAI's project Limits documentation distinguishes Monthly spend limit, spend alerts and Enforce a hard limit. Alerts alone do not stop requests. Hard-limit enforcement can lag and allow a small overshoot, so keep application limits as well. For other providers, check their own enforcement scope and timing. These are configuration steps, not plan defaults or a price comparison.

https://help.openai.com/en/articles/9186755-managing-projects-in-the-api-platform

Keep paid AI API calls on the server. Add per-user and global rate limits, bounded concurrency, input/output limits, bounded retries and a persistent, atomic usage allowance checked before calls. Fail closed if the limiter is unavailable. Document billing alerts, provider hard-limit settings and their enforcement delays. Provide an offline fake-provider test that proves blocked requests make no paid call. Do not call a paid API.

8) Are CORS and admin authorization checked separately?

CORS controls when a browser can read a response across origins. It does not authorize callers. Allow required browser origins rather than reflecting any Origin with credentials. A hidden admin menu does not protect an admin API. Review CSRF defenses for cookie-authenticated state changes too.

How to check: compare CORS configuration with the actual development and production origins. Inventory admin read and write routes. Use signed-out and ordinary test users locally to confirm rejection. Removing a wildcard is not sufficient evidence: required browser flows must still work and unauthorized server requests must fail.

https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CORS

Audit CORS and admin routes in my app. Allow only required browser origins; never reflect an arbitrary Origin with credentials. Enforce server-side admin roles on every admin read and write. Review CSRF protection for cookie-authenticated state changes. Test anonymous and ordinary users locally. Do not treat CORS or a hidden menu as authorization.
Ten pre-launch checks grouped into secrets, permissions, input and operations

6. Checks 9–10: dependencies and operations

9) Have you checked installed packages?

Confirm that an AI-recommended dependency is the actual official package and review vulnerabilities in the version you use. Keep a lockfile for reproducible installs. A clean vulnerability report does not validate your application's access model. Similar-looking package names are not a reason to install them.

How to check: in an npm project, run the commands below from its folder. They send dependency information to the configured registry, so follow your organization's package policy. Review production exposure first and development dependencies separately. Read official release notes and choose the smallest compatible update. A forced automatic upgrade can break application APIs.

npm audit --omit=dev
npm audit

https://docs.npmjs.com/cli/v11/commands/npm-audit/

Review the lockfile and the package manager's vulnerability report. Identify affected production paths and official fixed versions. Propose the smallest compatible update and run the relevant local checks. Do not run a force upgrade or install a suggested package without checking its official identity. Report unresolved advisories and whether they affect deployed code.

10) Have you checked logs, privacy information and backups in practice?

Inventory data in server logs, error reporting and analytics. Keep tokens, cookies, passwords and personal request bodies out of logs. Prefer a request ID, error category and the minimum operational context. Define who can access logs and when they expire. Describe actual collection, purposes, processors, retention, deletion and contact options in your privacy information. Applicable legal requirements need review for your audience and data.

How to check: trigger an error with a fictional email and inspect each logging or analytics destination. If the notice says data is not stored but an error tool stores it, fix the behavior or notice. Check the last successful backup, its scope, location and permissions, then restore into an isolated test environment. Restoring over production can destroy current data.

Track database backups and uploaded-file backups separately. Supabase documents that database backups contain Storage object metadata, not the actual objects uploaded through the Storage API. A successful database restore does not prove that a photo or document can be recovered. Include backup expiry in your personal-data retention plan.

https://cheatsheetseries.owasp.org/cheatsheets/Logging_Cheat_Sheet.html https://supabase.com/docs/guides/platform/backups https://commission.europa.eu/law/law-topic/data-protection/information-business-and-organisations/obligations_en

Audit logs, error reporting, analytics, privacy text and backups together. Redact tokens, cookies and personal payloads before logging; define access and retention. Draft a plain-language data inventory, purposes, processors, retention and deletion/contact process without claiming legal compliance. Document database and uploaded-file backups separately and a restore drill in an isolated test environment. Do not delete data, export real user data or restore production.

7. Run a bundle check with fake keys

Save this complete code as check_bundle.py. It uses Python 3.10+ and the standard library, only reads local files, and never checks whether a credential works. Output contains locations and pattern labels, not matched values. Before sharing output, check filenames for personal information too.

import re
import sys
from pathlib import Path

PATTERNS = {
    "secret-key-like": re.compile(r"sk-[A-Za-z0-9_-]{16,}"),
    "supabase-secret-like": re.compile(r"sb_secret_[A-Za-z0-9_-]{16,}"),
    "github-token-like": re.compile(r"ghp_[A-Za-z0-9]{20,}"),
    "webhook-secret-like": re.compile(r"whsec_[A-Za-z0-9_-]{16,}"),
    "aws-access-id-like": re.compile(r"AKIA[0-9A-Z]{16}"),
    "private-key-like": re.compile(r"-----BEGIN (?:RSA |EC |OPENSSH )?PRIVATE KEY-----"),
}


def main():
    if len(sys.argv) != 2:
        print("Usage: python3 check_bundle.py BUILD_FOLDER")
        return 2
    root = Path(sys.argv[1])
    if root.is_symlink() or not root.is_dir():
        print("ERROR: provide an existing, non-symlink folder")
        return 2
    scanned = findings = 0
    try:
        for path in sorted(root.rglob("*")):
            relative = path.relative_to(root)
            if any(part.is_symlink() for part in [path, *path.parents]):
                continue
            if not path.is_file():
                continue
            data = path.read_bytes()
            if b"\x00" in data:
                continue
            scanned += 1
            for number, line in enumerate(data.decode("utf-8", errors="replace").splitlines(), 1):
                for label, pattern in PATTERNS.items():
                    if pattern.search(line):
                        findings += 1
                        print(f"REVIEW {relative.as_posix()}:{number} {label}")
    except OSError:
        print("ERROR: could not read all files")
        return 2
    print(f"Scanned {scanned} text files; {findings} candidate lines.")
    return 1 if findings else 0


if __name__ == "__main__":
    sys.exit(main())

In a fresh practice folder, the following creates three never-issued fake secrets and one text file. It does not modify a real application bundle. Reserve sample for this exercise. Commands are identical in every edition.

mkdir sample
cat > sample/app.js <<'JS'
// Synthetic fixtures only. These strings were never issued by a provider.
const exampleOnly = "sk-FAKE_NOT_A_REAL_KEY_000000";
const exampleServerOnly = "sb_secret_FAKE_NOT_A_REAL_KEY_000000";
const exampleWebhook = "whsec_FAKE_NOT_A_REAL_KEY_000000";
const publicExample = "sb_publishable_FAKE_PUBLIC_EXAMPLE";
JS
cat > sample/info.txt <<'TXT'
Synthetic public bundle fixture. No user data.
TXT
python3 check_bundle.py sample
echo $?
REVIEW app.js:2 secret-key-like
REVIEW app.js:3 supabase-secret-like
REVIEW app.js:4 webhook-secret-like
Scanned 2 text files; 3 candidate lines.
1

Exit code 1 means candidate patterns were found. That is the intended demonstration result and a review signal for a real build. No candidates returns 0; an invalid folder or read error returns 2. For your app, rebuild and supply the folder actually shipped to browsers: for example dist for a static build or .next/static for Next.js browser assets. Server-only build files are a different scope.

This scanner recognizes only a handful of string patterns. The public-key fixture does not trigger it, but it is not a general key-classification tool. It can miss other key formats, split strings, compressed assets and Git history, and it cannot test RLS. Binary files and symbolic links are skipped. A zero result is not a security verdict. Combine it with repository secret scanning and the permission checks above, including public source maps and older deployed files in your scope.

8. Keep evidence for the next release

You do not need to automate all ten checks to start. First inspect secrets and user boundaries with fake data, then assign a reviewer and date to the rest. Save actual commands or setting locations. After a fix, rerun the same scenario; leave unrun checks marked unverified. Do not launch with known data exposure or unrestricted paid calls still open.

After the checklist, share your product at https://trythevibe.org/en/submit and get reviews from people who try it. Confusing flows and bug reports give you concrete next fixes. trythevibe asks makers to keep secrets out of key prompts and checks some API-key, email and phone patterns before saving them, as verified in its repository validation function and constraint. Pattern matching cannot catch every secret; remove sensitive values yourself before sharing. Product reviews also do not replace a security audit.

- Today: run the fake-key scanner example and check its output and exit code. - Before launch: record a result or a reason for not applicable for every check. - After fixes: repeat with the same fictional identities and inputs. - Next release: reopen checks affected by key, permission, billing or storage changes.

Explore trythevibe

About trythevibe

Share a link to your product. You don’t need to upload or publish your source code.

Share my product

More newsletters

Back to all newsletters