TL;DR: AI-generated code can ship exposed applications when security controls such as row-level security, policy coverage, and authentication logic are not enforced in the generation workflow, according to Symbiotic Security. The Lovable case shows why security review after code generation is too late when insecure defaults reach production.
NHIMG editorial — based on content published by Symbiotic Security covering exposed Lovable apps and AI code security gaps: Introducing Symbiotic Code and Vibe-Scanner
By the numbers:
- The incident involved 16 vulnerabilities, including 6 critical issues that enabled data exposure and account abuse.
Questions worth separating out
Q: How should security teams govern AI-generated code in production environments?
A: Security teams should treat AI-generated code as normal production code with extra provenance risk.
Q: What breaks when row-level security is missing in an AI app?
A: Any mistake in the application layer can turn into a data exposure event, because the database has no built-in awareness of tenant, role, or purpose.
Q: How can organisations tell whether AI is creating access risk?
A: Organisations should look for AI systems that can reach production data, security tools, or administrative workflows through persistent credentials.
Practitioner guidance
- Enforce row-level security as a release blocker Require every production database to fail deployment if RLS is enabled without defined policies, if FORCE ROW LEVEL SECURITY is missing, or if access defaults to allow-all behavior.
- Scan live databases, not just source files Run read-only checks against deployed Lovable projects or equivalent AI-built apps to detect policy drift between migration files and the actual database state.
- Add secret detection to AI-assisted pipelines Flag hardcoded secrets in configs, migration scripts, and environment files before merge so generated code cannot move into production with embedded credentials.
What's in the full analysis
Symbiotic Security's full article covers the operational detail this post intentionally leaves for the source:
- The exact Vibe-Scanner rule categories used to detect insecure RLS and authentication patterns in Lovable projects.
- The read-only scanning workflow for comparing local SQL migrations with the deployed database state.
- The remediation path for teams that discover exposed tables, missing policies, or embedded secrets in generated code.
- The direct steps the vendor recommends for users of AI code platforms that need to harden access controls.
👉 Read Symbiotic Security's analysis of exposed Lovable apps and AI code security gaps →
AI code generation and RLS failures: what practitioners need to know?
Explore further
AI code generation has become an authorisation problem, not just a software quality problem. When generated code ships without enforced row-level security, the failure is not cosmetic. It is a governance failure over who can see and do what inside production systems. That shifts responsibility from developer intent to control enforcement, which is where application security and IAM must meet.
A question worth separating out:
Q: Who is accountable when an integration or AI workflow exposes customer data?
A: Accountability should sit with the system owner, the identity owner, and the control owner for the workflow that exposed access. In practice, that means the team responsible for granting and reviewing the credential path must answer for how the exposure happened and how quickly it was contained. Shared platforms do not remove accountability; they make it more explicit.
👉 Read our full editorial: AI code generation without security context exposes app data