AI10 min read

From Vibe Coding to Production: Why AI-Built Software Starts with CI/CD and Infrastructure as Code

AI can now build a working app in an afternoon. Getting that app safely into production, compliant and ready to grow, is still the hard part, and that is where we start.

Sébastien Boeyen

Sébastien Boeyen

Co-founder

Over the past two years, "vibe coding" has gone from a joke to a business model. Describe what you want, let an AI assistant generate the code, click deploy. The demo works. Investors nod. Customers sign up.

Then reality arrives. A customer's security questionnaire asks where personal data is stored. An auditor asks who approved last Tuesday's database change. Traffic triples and the single database instance falls over. Someone discovers that the entire user table was readable by anyone with a browser.

At AVS IT, we use AI every day to write code faster. But we don't start with the code. We start with the pipeline and the infrastructure that the code will live in. This post explains why.

The vibe-coding trap: fast to build, fragile to run

AI writes code that works. It does not, by default, write code that is secure, auditable or built to scale. Those properties come from the system around the code, and a solo builder working prompt by prompt rarely builds that system.

The numbers back this up. In its 2025 GenAI Code Security Report, Veracode tested over 100 large language models on 80 coding tasks. The generated code contained an OWASP Top 10 vulnerability in 45% of cases, and security quality was not improving as models got better at syntax (Veracode).

The Supabase example

Supabase is an excellent product. It is also the backend that AI app builders such as Lovable and Bolt provision by default, and one that general-purpose AI coding assistants frequently suggest. That popularity makes it the clearest illustration of the problem.

In a typical AI-generated Supabase app, the browser talks directly to the Postgres database using a public "anon" key. There is no backend server checking permissions. Row Level Security (RLS) policies are the entire security model. If RLS is off, or the policies are wrong, the public key opens the whole table.

That is exactly what a 2025 investigation found. In March 2025, Matt Palmer and a colleague at Replit, a Lovable competitor, scanned 1,645 apps listed on Lovable's public showcase. They found 303 exposed endpoints across 170 projects, about 10% of the apps, leaking data such as emails, phone numbers, payment details and API keys (Palmer's statement). The issue was published on 29 May 2025 as CVE-2025-48757, with a CVSS 3.1 score of 9.3 (critical) in the CVE record (NVD).

Lovable disputes the CVE, arguing that each customer is responsible for protecting their own application's data. Palmer argues the platform's defaults produced the problem at scale. Either way, Supabase itself was not breached, and nobody needed a clever exploit. The generated apps simply shipped without access rules that anyone had checked.

What else typically gets skipped

Our approach: the pipeline comes before the first feature

On every AVS IT development project, the first deliverable is not a screen. It is a repository, a deployment pipeline and infrastructure described as code. Only then do we let AI generate features, and every line it writes flows through that system.

Infrastructure as code from day one

Every database, bucket, network rule, DNS record and access policy is declared in version-controlled files (mainly AWS CDK or Pulumi), never clicked together in a console. This gives our clients three things a vibe-coded app cannot:

It also changes how we use AI. CDK and Pulumi describe infrastructure in real programming languages such as TypeScript and Python, which AI assistants write well. When the infrastructure is code, AI can propose changes that we review as a diff, instead of a human or an AI quietly flipping switches in a dashboard.

A CI/CD pipeline as the only road to production

Nobody, human or AI, deploys from a laptop. Every change follows the same path:

  1. A developer (often working with an AI assistant) opens a pull request.
  2. Automated checks run: linting, unit and integration tests, type checks.
  3. Security scans run: static analysis, dependency and licence checks, secret detection, infrastructure policy checks.
  4. A human reviews the change and approves it.
  5. The pipeline deploys to staging and runs smoke tests.
  6. Promotion to production is explicit, logged and reversible.

The result is that AI speeds up step 1 without letting anyone skip steps 2 to 6.

Guardrails that make AI-generated code safe to ship

We treat AI output like code from a talented but brand-new team member: fast, often right, never trusted blindly. The guardrails are automated, so they apply to every change without slowing anyone down.

| Risk with AI-generated code | Guardrail in our pipeline | | :------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------- | | Database tables left publicly readable (the Supabase RLS case) | Schema checks that fail the build if any exposed table lacks RLS or a policy, plus automated tests that try to read data as an anonymous user | | Secrets committed or bundled into the front end | Secret scanning on every commit; secrets stored in a vault and injected at deploy time | | Vulnerable or hallucinated dependencies | Dependency and licence scanning; packages pinned and pulled only from trusted registries | | Insecure code patterns (injection, XSS, weak crypto) | Static analysis on every pull request, with blocking rules for critical findings | | Risky infrastructure changes | Policy-as-code checks on CDK and Pulumi changes before deployment (public buckets, open ports, missing encryption) | | Code nobody understands | Mandatory human review and tests written alongside the feature |

Take the Supabase example. In our setup, the database schema and its RLS policies live in migration files in the repository. A pipeline step checks that every table in an exposed schema has RLS enabled and at least one policy. A test suite then calls the API with the public key and asserts that private data is refused. If an AI assistant forgets RLS, the build goes red long before a customer, or an attacker, notices.

Compliance by design, not by panic

For European businesses, compliance is not optional, and it cannot be bolted on after launch. A pipeline-first approach turns compliance from a scramble before an audit into a by-product of everyday work.

This matters commercially as much as legally. Enterprise customers will ask for it during procurement, and "we built it quickly with AI" is not an answer that passes a vendor security review.

Built to grow, not just to demo

A prototype only has to work for one user on one afternoon. A product has to work for thousands of users, for years, while the team around it changes. We make a handful of decisions early that are cheap on day one and very expensive to retrofit later.

None of this slows AI-assisted development down. It is what lets us keep moving fast in month twelve, when a vibe-coded app is often being rewritten.

Speed and solidity are not a trade-off

AI has made writing code cheap. It has not made running software safely any cheaper, and it has made skipping the hard parts much easier. The real competitive advantage is no longer how fast you can generate an app, but how confidently you can put it in front of customers, auditors and investors.

At AVS IT, we combine both worlds. Our developers use AI assistants every day, and our background as a managed service provider means we think about security, operations and compliance before the first line of code. Every project starts with infrastructure as code and a CI/CD pipeline, so speed never comes at the cost of control.

Already have an AI-built prototype? We can audit it, harden it and move it onto a production-grade pipeline, without starting from zero. Starting something new? Let's design it properly from day one.

Contact our team to talk about your project.

Sources