Brainbox
HomeWorkshopsCorporate · HRDC
BrainBotAbout
LoginFree Strategy Call→
/Vibe coding mistakes and security risks: what to check before you go live

Vibe coding mistakes and security risks: what to check before you go live

TL;DR

The biggest vibe coding mistakes are vague briefs, piling on changes, and accepting code that only looks right. The biggest security risks are missing database access rules, secret keys exposed in the page, and AI agents with access to live data. Before launch, test access as every role, move keys server-side, keep backups and separate test data.

Key facts

Last updated
22 November 2026
First published
30 October 2026
Written by
Available in
English中文Bahasa Malaysia
Sources cited
13

On this page

Free online preview · no obligation to enrol
Brainbox

为大马中小企业老板设计的 AI 变现实战体系。
Practical AI for business owners. No code. Just revenue.

THE BRAINBOX TECHNOLOGIES SDN. BHD. (1676601-V) HQ & TRAINING CENTRE: 16-3, JALAN PUTERI 2/4, BANDAR PUTERI, 47100 PUCHONG, SELANGOR REGISTERED ADDRESS (SSM): LOT 10, JALAN PJS 11/18, BANDAR SUNWAY, 46150 PETALING JAYA, SELANGOR
Courses
Company
Contact
  • hello@thebrainbox.ai
  • support@thebrainbox.ai
  • WhatsApp
  • LinkedIn
Why this matters before you launch
  • Two real cases worth knowing
  • Process mistakes that waste your effort
  • Security mistakes and how to fix them
  • Pre-launch checklist
  • Do this with your team
  • Why this matters before you launch

    Vibe coding makes it easy to build something that works on screen and fails underneath. Veracode tested code from more than 100 large language models across Java, JavaScript, Python and C#, and found AI-generated code introduced risky security flaws in 45% of tests (Veracode, 2025 GenAI Code Security Report, Oct 2025 update).

    In Malaysia the cost of getting it wrong went up in 2025. Under the Personal Data Protection (Amendment) Act 2024, maximum fines for breaching the data protection principles rose from RM300,000 to RM1,000,000 from 1 April 2025, and data breach notification became mandatory from 1 June 2025 (DFDL, 9 Jan 2025).

    Two real cases worth knowing

    Missing access rules in AI-built apps

    In 2025 a vulnerability was published for apps generated on Lovable: "an insufficient database Row-Level Security policy in Lovable through 2025-04-15 allows remote unauthenticated attackers to read or write to arbitrary database tables of generated sites". The record notes that Lovable disputes it, on the basis that each customer is responsible for protecting their own application's data (NIST NVD, CVE-2025-48757). The researcher's write-up lists exposed data types including names and email addresses, third-party API keys, and transaction and subscription details (Matt Palmer, 2025).

    The lesson is not about one vendor. Whoever is at fault, the business that publishes the app owns the consequences. Whatever builder you use, check the access rules yourself.

    An AI agent with access to live data

    In July 2025 SaaStr founder Jason Lemkin ran a 12-day vibe coding experiment on Replit. On day nine, the AI agent deleted a live database holding records on 1,206 executives and more than 1,196 companies, despite instructions not to make changes without approval. Replit's CEO called it unacceptable, and the company added automatic separation of development and production databases, a planning-only mode and one-click restore from backups (eWeek, 22 Jul 2025).

    Process mistakes that waste your effort

    Most failed vibe coding projects do not get hacked. They just never work reliably. Four rules prevent most of it:

    MistakeWhat it looks likeThe rule
    Vague brief"Make me a booking system" with no rulesWrite who, inputs, outputs and what must never happen before you start
    Scope creepAdding payments, login and a dashboard before the first screen worksOne working screen first; add one feature at a time
    Blind acceptingThe AI says "fixed" and you move on without testingTest after every change, with real examples and wrong inputs
    No save pointsA change breaks everything and you cannot get backSave or version every working state; roll back instead of patching

    Security mistakes and how to fix them

    MistakeWhat can happenFix
    No row level security or access rules on the databaseAnyone can read or change all recordsTurn on RLS for every table and write rules per role (Supabase docs)
    Secret API keys inside the pageOthers copy your key and run up your billKeep keys server-side or in the builder's secrets store
    Sharing an app without checking what is sharedOthers see and copy the code; their AI usage counts against your limitsCheck sharing settings first (Google AI Studio docs)
    Testing with real customer dataPersonal data spread across chats, previews and test copiesUse fake data until access rules are verified
    AI agent can touch the live databaseData deleted or overwrittenSeparate development and live data; restrict the agent
    No tested backupsOne mistake is permanentSchedule backups and practise a restore
    Weak or no login

    These map onto the OWASP Top 10 for 2025: Broken Access Control is first, followed by Security Misconfiguration and Software Supply Chain Failures, with Authentication Failures seventh and Mishandling of Exceptional Conditions tenth (OWASP, 2025).

    Built-in scans help but are not a guarantee. Lovable's documentation states its tools "cannot guarantee complete security" and recommends a professional security review for apps handling sensitive data or critical functions (Lovable docs).

    Pre-launch checklist

    • Log in as each role and confirm each one sees only what it should.
    • Open the app in a private window without logging in. No data should load.
    • Search the page source for anything that looks like a key or password.
    • Confirm test data and real data are separate, and the AI agent cannot reach real data.
    • Restore from a backup once, so you know it works.
    • Run the builder's security scan and fix every high-severity finding.
    • List what personal data you store, why, and who can export it.
    • Decide who fixes the app when it breaks, and how users report problems.

    For the safe way to build a customer database, see . For when to hand a prototype to a developer, see . If your company plans to fund training through HRD Corp, our covers the process.

    Do this with your team

    Security habits stick when the team practises them on its own project, with a trainer checking the access rules. BrainBox teaches vibe coding in person in the . Over two days, participants build a business website, a simple customer CRM connected to it and three small warm-up apps. The fee is RM888 per participant self-funded or RM1,188 through HRD Corp, and no programming background is needed. See the full .

    • HRD Corp (HRDC, formerly HRDF): BrainBox is a registered HRD Corp training provider, so the course fee can come from your company's levy balance. See .
    • Apply early, so approval lands at least 14 days before training. From 15 June 2026, in-house training can run 14 days after grant approval and must start within 90 days after that (HRD Corp, accessed 30 Oct 2026; Circulars). HRD Corp has said retrospective approvals are a thing of the past (The Star, 25 Oct 2026).
    • For what else can be claimed (allowances, materials), check the official Allowable Cost Matrix rather than any figure on a vendor page.

    Why teams train with BrainBox

    • Small classes, usually around 15 people, so everyone gets to ask questions. Larger companies can arrange a bigger in-house cohort through HRD Corp.
    • Published fees per participant: RM199 for the 2-hour online class, and RM888 for the two-day Vibe Coding, AI Marketing A–Z and AI Agent courses (RM1,188 through HRD Corp). Every fee is on the .
    • HRD Corp registered training provider, with the registration certificate shown on our .
    • Your business is the exercise: staff work on your own tasks, documents and customers, not a made-up case study.
    • Every course includes a certificate of completion, 90 days of WhatsApp support, an RM299 refresher and a Results Report (one version each for the boss, HR and the participant).
    • Class language: Vibe Coding and AI Agent are taught in Mandarin. AI Marketing A–Z and the 3-hour classes have English and Mandarin sessions, so ask for the dates.
    Want to try before you book the team? Join the ; there is no obligation to sign up for anything. For a written quote for your team, WhatsApp us.

    New to the topic? Start with .

    Frequently asked questions

    Is AI-generated code secure?

    Not by default. Veracode's 2025 GenAI Code Security Report found that AI-generated code introduced risky security flaws in 45% of tests across more than 100 language models. Treat AI code as a first draft: test it, check access rules and keys, and get a review before it handles customer data or money.

    What is the most common security mistake in vibe-coded apps?

    Missing or loose database access rules. Many AI builders connect the page directly to a hosted database and rely on row level security to decide who sees what. If those rules are missing, anyone who finds the app can read or change the data. Broken access control is ranked first in the OWASP Top 10 for 2025.

    Why does my vibe coding project keep breaking?

    Usually because the brief was vague, too many changes went into one message, or there was no saved working version to return to. Write the rules down before you start, ask for one change at a time, test after each change, and roll back rather than piling fixes on a broken version.

    Can an AI coding agent delete my data?

    Yes, if it has access. In a widely reported 2025 test, Replit's agent deleted a live database during a code freeze. Replit then added automatic separation of development and production databases. Never give an agent access to real data while it builds, and keep backups you have tested.

    What does PDPA mean for a vibe-coded app?

    If the app stores personal data used in commercial transactions, the PDPA applies. Amendments in force since 2025 raised maximum fines for breaching the data protection principles to RM1,000,000 and added mandatory breach notification to the Commissioner. Collect only what you need and protect it properly.

    When should I get a professional security review?

    Before any app that stores personal data, has logins, takes payments or is used by many people goes live. Lovable's own documentation recommends a professional review for apps handling sensitive data or critical functions, and says its built-in scans cannot guarantee complete security.

    Sources

    1. Veracode, 2025 GenAI Code Security Report, Oct 2025 update (veracode.com)
    2. DFDL, 9 Jan 2025 (dfdl.com)
    3. NIST NVD, CVE-2025-48757 (nvd.nist.gov)
    4. Matt Palmer, 2025 (mattpalmer.io)
    5. eWeek, 22 Jul 2025 (eweek.com)
    6. Supabase docs (supabase.com)
    7. Google AI Studio docs (ai.google.dev)
    8. OWASP, 2025 (top10.owasp.org)
    9. Lovable docs (docs.lovable.dev)
    10. HRD Corp, accessed 30 Oct 2026 (hrdcorp.gov.my)
    11. Circulars (hrdcorp.gov.my)
    12. The Star, 25 Oct 2026 (thestar.com.my)
    13. Allowable Cost Matrix (hrdcorp.gov.my)

    Continue reading

    • What is vibe coding?→
    • Build a simple CRM with AI→
    • Vibe coding tools compared→
    • HRD Corp claimable AI training→

    About BrainBox

    BrainBox (The Brainbox Technologies Sdn. Bhd.) is a Malaysian AI training provider running public AI workshops and customised corporate AI courses for businesses.

    • HRD Corp (formerly HRDF) registered training provider, so employers can apply for HRD Corp funding for our corporate AI courses. Registration valid until 13 October 2027.
    • 500+ learners across BrainBox programs.
    • Classes taught in English and Mandarin (中文); guides published in English, Chinese and Bahasa Malaysia.
    • HQ and training centre: Bandar Puteri, Puchong, Selangor, Malaysia.
    • Client programme: Digital Penang (Penang, 2026), Vibe coding with AI.

    About usHRD Corp claimable AI courses

    Ready to wire this into your business?

    Start with the free two-hour online preview: a mentor walks through real business cases, then you decide on next steps.

    Pick a free preview date
    Follow BrainBox:LinkedInInstagramGoogle Business
    Instagram
  • Google Business
  • Login
  • © 2026 THE BRAINBOX TECHNOLOGIES SDN. BHD. (1676601-V) · MALAYSIA
    Privacy policyTerms of service
    HRD CORP REGISTERED TRAINING PROVIDER
    Guides
    BrainBox, HRD Corp registered AI training provider, Malaysia
    Pick a date
    AI Website Build Class
    AI Genesis (2-Day)
    AI Course Malaysia
    AI Course Puchong
    Course Menu & Fees
    HRD Corp Corporate Training
    About Us
    Team
    Event Schedule
    Articles
    Partner Trainers
    FAQ
    Anyone with the link gets in
    Require login; use the builder's standard authentication
    Old or unknown packagesKnown vulnerabilities in the software you depend onRun the builder's dependency scan and update regularly
    No error handlingCrashes reveal internal details or lose dataAsk the AI to handle failures and show friendly messages
    build a simple CRM with AI
    vibe coding tools compared
    HRD Corp claimable AI training guide
    Vibe Coding Course: Website & CRM
    course menu
    corporate AI training
    course menu
    corporate training page
    free preview class
    what is vibe coding