Security · OWASP Top 10:2025 · Privacy law

The Vibe Coding Security and Compliance Checklist: 12 Checks Before You Launch

In privacy law, a security hole is not just a bug. GDPR, India's DPDP Act and California's CCPA all make reasonable security a legal duty, and a leak turns into a notification deadline. These are the 12 checks that catch what AI builders most often leave open.

SafeLaunch Research 5 min read

The short answer

Before launching a vibe-coded app, confirm every database table with user data has row-level access rules, no secret key reaches the browser or repository, HTTPS and security headers are set, auth tokens aren't exposed, dependencies are current, user input isn't rendered unsafely, file storage isn't public, and you have a breach plan that meets the 72-hour deadlines in GDPR and India's DPDP Rules.

Key takeaways

  • Security is a legal duty: GDPR Art. 32, DPDP Act §8(5), CCPA §1798.150 and most privacy laws require reasonable security for personal data.
  • The biggest risk in AI-built apps is broken access control: database tables any visitor can read through the public key in the browser.
  • Only publishable keys belong in front-end code. Service-role, secret and API keys stay on the server.
  • A breach starts legal clocks: 72 hours to the regulator under GDPR Art. 33, a detailed report within 72 hours under DPDP Rule 7, 6 hours to CERT-In in India.
  • SafeLaunch checks these in your code and live site and maps each finding to OWASP Top 10:2025 and the privacy law of every market you choose.
On this page
  1. 1. Why is app security a legal issue, not just a technical one?
  2. 2. The 12-point checklist
  3. 3. How do I check and fix Supabase row-level security?
  4. 4. Which laws does each security gap break?
  5. 5. How SafeLaunch checks security

01

Why is app security a legal issue, not just a technical one?

Because privacy laws require it. Article 32 of the GDPR requires security appropriate to the risk. India's DPDP Act §8(5) requires reasonable security safeguards, with penalties up to ₹250 crore. California's CCPA §1798.150 gives consumers a private right of action when their data is breached because a business failed to keep reasonable security. The OWASP Top 10 is the reference most regulators and courts look to for what 'reasonable' means on the web.

02

The 12-point checklist

  1. 01

    Row-level access rules on every table (OWASP A01)

    If your app reads the database from the browser (common with Supabase), every table with user data needs row-level security enabled and a policy limiting users to their own rows. Test as an anonymous visitor and as a second account.

  2. 02

    No secret keys in the browser or repository

    Search the built JavaScript and the repository for keys. Service-role keys, payment secret keys and AI provider keys belong in server functions and environment variables. Rotate any key that was ever exposed.

  3. 03

    HTTPS everywhere, no mixed content (OWASP A04)

    Every page and every request over HTTPS, with HTTP redirected. Mixed content leaks data and is blocked by browsers.

  4. 04

    Security headers set (OWASP A02)

    At minimum: Strict-Transport-Security, Content-Security-Policy, X-Content-Type-Options: nosniff, Referrer-Policy, and frame-ancestors (or X-Frame-Options) to stop clickjacking.

  5. 05

    Auth tokens not exposed (OWASP A07)

    Tokens in localStorage can be read by any script on the page, including a compromised third-party script. Prefer httpOnly cookies where your auth provider supports them, and keep third-party scripts to a minimum.

  6. 06

    No unsafe HTML rendering or eval (OWASP A05)

    Rendering user input as HTML (for example with dangerouslySetInnerHTML) or passing it to eval opens the door to cross-site scripting. Sanitise or render as text.

  7. 07

    Dependencies current (OWASP A03)

    Run your package manager's audit, update packages with known vulnerabilities, and remove ones you don't use. AI builders add packages generously.

  8. 08

    File storage isn't public by accident

    Uploaded avatars and documents often land in a public bucket. Make buckets private unless files are meant for everyone, and serve private files through signed URLs.

  9. 09

    Rate limits on sign-in, sign-up and AI endpoints

    Without limits, sign-in can be brute-forced and an AI endpoint can run up your bill or be abused. Most auth providers and hosts offer limits; switch them on.

  10. 10

    Collect only what you need

    Data protection by design (GDPR Art. 25) means less data, less risk. Remove form fields and stored columns no feature uses.

  11. 11

    A security contact and logging (OWASP A09)

    Publish a way to report vulnerabilities, keep logs that show who accessed what (DPDP Rule 6 expects logs kept for a year), and set alerts for failures.

  12. 12

    A breach plan with the deadlines written down

    Who decides, who notifies, which template. GDPR Art. 33: the regulator within 72 hours. DPDP Rule 7: the Board and affected people without delay, detailed report within 72 hours. CERT-In: 6 hours. US states each set their own notification rules.

03

How do I check and fix Supabase row-level security?

In the Supabase dashboard, open the table editor: tables without row-level security are flagged, and the Security Advisor lists them. To fix a table such as profiles where each row belongs to a user:

SQL: enable RLS and limit users to their own rows
alter table public.profiles enable row level security;

create policy "Users can read their own profile"
  on public.profiles for select
  using (auth.uid() = id);

create policy "Users can update their own profile"
  on public.profiles for update
  using (auth.uid() = id);

Then test: sign out and query the table with the public key, and query it signed in as a different user. Both should return no other user's rows. Adapt the column (for example user_id instead of id) to your schema.

04

Which laws does each security gap break?

Security findings and the provisions SafeLaunch cites
MarketProvision
European UnionGDPR Art. 32
United KingdomUK GDPR Art. 32
United StatesFTC Act §5 (data security)
CaliforniaCiv. Code §1798.81.5; CCPA §1798.150
New YorkSHIELD Act GBL §899-bb(2)
IndiaDPDP Act 2023 §8(5); DPDP Rules 2025 Rule 6
BrazilLGPD Art. 46
CanadaPIPEDA Principle 4.7
AustraliaAPP 11
SingaporePDPA §24
Security findings and the provisions SafeLaunch cites

One finding, cited per market. Read how a single finding becomes a fix prompt for your builder.

05

How SafeLaunch checks security

  • Code: exposed secrets (redacted before anything is stored), database access rules, unsafe rendering, token storage and dependencies, from a GitHub repository or uploaded .zip.
  • Live site: HTTPS, mixed content and security headers on the pages it visits.
  • Law: each security finding is mapped to the security provision of every market you choose, alongside privacy, cookie, AI and accessibility findings.
  • Every release: scan the new version through the GitHub App in one click, so a new open table is caught before it ships.

Start with a free scan, or read the builder guides for Lovable, Bolt and Cursor.

One free fix in your inbox each week

A new copy-paste prompt for Lovable, Cursor or Claude Code every week, with the rule behind it and how to check it worked. No spam, unsubscribe in one click.

By signing up you agree to get this weekly email. We send it with Kit, and you can unsubscribe at any time. What we share with Kit is in our privacy notice.

FAQ

Frequently asked questions.

The anon (publishable) key is designed to be public, but only when row-level security protects your tables. Without RLS, anyone with that key can read or change the data the key can reach. The service-role key must never be exposed.

Yes. Most privacy laws have no size threshold for security duties, and a breach of personal data can trigger notification deadlines to regulators and users, such as 72 hours under GDPR.

No. SafeLaunch finds common, high-impact gaps and maps them to the law. A penetration test by a security professional goes deeper into logic flaws and attack chains.

The 2025 edition of OWASP's list of the most critical web application security risks, led by broken access control. It is widely used as the reference for reasonable web security.

Sources and further reading

This article is general information, not legal advice. SafeLaunch is automated software, not a law firm; a report records what was checked on one version and is not a certificate of compliance. Read the disclaimer.

From the founder

SafeLaunch is built by Raghav R Handa, a lawyer-turned-builder in New Delhi. He writes about this topic in plain English:

Free scan · no card

See what SafeLaunch finds on your product.

Paste a link and get your score, the most serious problems and what already passes, in about a minute.

Keep reading