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).
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).
Most failed vibe coding projects do not get hacked. They just never work reliably. Four rules prevent most of it:
| Mistake | What it looks like | The rule |
|---|
| Vague brief | "Make me a booking system" with no rules | Write who, inputs, outputs and what must never happen before you start |
| Scope creep | Adding payments, login and a dashboard before the first screen works | One working screen first; add one feature at a time |
| Blind accepting | The AI says "fixed" and you move on without testing | Test after every change, with real examples and wrong inputs |
| No save points | A change breaks everything and you cannot get back | Save or version every working state; roll back instead of patching |
| Mistake | What can happen | Fix |
|---|
| No row level security or access rules on the database | Anyone can read or change all records | Turn on RLS for every table and write rules per role (Supabase docs) |
| Secret API keys inside the page | Others copy your key and run up your bill | Keep keys server-side or in the builder's secrets store |
| Sharing an app without checking what is shared | Others see and copy the code; their AI usage counts against your limits | Check sharing settings first (Google AI Studio docs) |
| Testing with real customer data | Personal data spread across chats, previews and test copies | Use fake data until access rules are verified |
| AI agent can touch the live database | Data deleted or overwritten | Separate development and live data; restrict the agent |
| No tested backups | One mistake is permanent | Schedule 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).
- 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.
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 .