# S13 Bonus: The Security Risks of Vibe Coding with Richard Luna of Protected Harbor

Published: 2026-12-03
Duration: 1949s
Audio: https://pdst.fm/e/pscrb.fm/rss/p/audio4.redcircle.com/episodes/57b5a624-5ce2-4ecb-bd01-e4a9101d245b/stream.mp3

## Key Takeaways
- Treat AI like a smart junior developer: Richard compares vibe coding to a smart entry-level programmer that makes the same mistakes, so its code needs the same review: no passwords in the code, tokens and encryption in place.
- Secure is not the same as durable: AI code can look secure and still miss what the app needs, like high availability for a critical database or isolation. Protected Harbor scans vibe-coded code with Codex, Claude and Ollama, then checks its intent.
- Watch where the platform puts your data: vibe-coding platforms embed the database in their own infrastructure, so every login and query costs money. Moving data to a low-cost, isolated environment gives better protection and predictable bills.
- Vibe code module by module: wide prompts let the model take the easiest path, which causes drift. Break the app into small components, ask for zero trust, and check for clear text, SQL injection gaps and embedded passwords.
- Make infrastructure the guardrail: tie database, stack and firewall logs together and let AI trace a test user's journey. Segment systems into edges with monitoring so you can shut things down when AI-driven attacks start.

Today, we have an exciting follow up episode with our friends from Protected Harbor. As a reminder, Protected Harbor engineers and operates infrastructure specific to how your application actually behaves - ensuring your platform remains stable, scalable and predictable as it grows.

You may remember our conversation with Richard Luna of Protected Harbor, who came on the show in Season 12. He returns to the show today to dive into the fast-paced world of AI-assisted development and the hidden security risks that come with it.

As "vibe coding" gains massive popularity, development teams are shipping software faster than ever. However, beneath the surface lies a growing landscape of vulnerable code, exposed credentials, and unpredictable infrastructure costs.

Today, Richard and I examine the fine line between fast innovation and the dangerous reality of production disasters caused by AI agents, unpacking what every engineering leader needs to know before letting AI write their codebase.

Questions:

- Measuring Code Integrity: How do companies actually know whether their AI-generated code is robust and secure, or secretly sitting full of exposed vulnerabilities?
- The Vibe Coding Reality Check: Research shows thousands of vulnerabilities and hundreds of exposed credentials in deployed vibe-coded apps—why are credentials exposed through AI workflows so much less likely to be fixed compared to traditional ones?
- Agent Over-Permissioning: In early 2026, we saw a famous case where an AI agent deleted a company's entire production database. How do we solve the problem of giving AI agents too much access without completely stifling their usefulness?
- Production Disasters: A recent survey revealed that 16 out of 18 CTOs reported vibe coding disasters in production. What are the common threads connecting these incidents?
- The Hidden Cost Traps: AI code rarely accounts for infrastructure costs—leading to over-provisioning and bloated API calls. How can engineering teams prevent these financial "booby traps" before spiraling costs hit?
- Architectural Drift: How do you maintain a clean, consistent software architecture when successive AI prompts often cause code degradation and inconsistency over time?
- The Deceptive "95% Correct" Trap: Veracode’s recent testing found that nearly 45% of AI-generated code contains security flaws, even though 95% of it syntax-wise looks completely fine. How do teams combat this illusion of correctness?
- The 2:00 AM Debugging Problem: When a vibe-coded application breaks in the middle of the night and no human on call actually wrote or understands the code, how does a team handle incident response?
- Infrastructure as a Guardrail: Can modern infrastructure step in to catch, isolate, and diagnose application failures that human developers can no longer quickly trace?
- Designing for Long-Term Maintenance: Security requires deliberate design and deep understanding. Moving forward, what hybrid practices should teams adopt to get the speed of AI while retaining human-level security and maintainability?

  

Links

[https://protectedharbor.com/](https://protectedharbor.com/codestory)

[https://www.linkedin.com/in/richardluna/](https://www.linkedin.com/in/richardluna/)

  

Timestamps

00:00 – Intro

03:27 – Application-Aware Infrastructure

04:56 – Secure Code vs Durable Code

09:54 – Why Vibe Coding Vulnerabilities Go Unfixed

11:40 – Over-Permissioned AI Agents

13:44 – What Production Disasters Have in Common

15:42 – Avoiding Surprise Cloud Bills

18:27 – Preventing Architectural Drift

21:02 – The Illusion of Correctness

25:31 – The 2 AM Debugging Problem

27:22 – Logs, AI and Segmented Infrastructure

29:39 – Modular Vibe Coding for Teams

Times are from the episode recording; ad breaks in your player may shift them a bit later.

  

Read the key answers from this episode, with quotes and timestamps from Richard Luna from Protected Harbor: [https://www.codestory.co/episodes/s13-bonus-the-security-risks-of-vibe-coding-with-richard-luna-of-protected-harbor/](https://www.codestory.co/episodes/s13-bonus-the-security-risks-of-vibe-coding-with-richard-luna-of-protected-harbor/)

  
  

Current Sponsors:

- [Tiger Data](https://tigerdata.com/)

- [Protected Harbor](http://protectedharbor.com/codestory)

- [Render](https://render.com/)

- [Fitnexa](https://www.fitnexa.com/)

- [Perplexity](https://pplx.ai/codestory)

- [Entelligence](https://entelligence.ai/)

Checkout our Stacklist! [https://stacks.codestory.co/](https://stacks.codestory.co/)

Check out our [Patreon!](https://www.patreon.com/cw/codestory)

Hosted by  [Noah Labhart | Technical Founder & Startup Mentor.](https://noahlabhart.com/)

  
  
Our Sponsors:  
* Check out Granola and use my code granola.ai/CODESTORY for a great deal: https://granola.ai  
* Check out Perplexity: https://pplx.ai/codestory  
  
  
Advertising Inquiries: [https://redcircle.com/brands](https://redcircle.com/brands)  
  
Privacy & Opt-Out: [https://redcircle.com/privacy](https://redcircle.com/privacy)

## Chapters
- 0:00 — Intro
- 3:27 — Application-Aware Infrastructure
- 4:56 — Secure Code vs Durable Code
- 9:54 — Why Vibe Coding Vulnerabilities Go Unfixed
- 11:40 — Over-Permissioned AI Agents
- 13:44 — What Production Disasters Have in Common
- 15:42 — Avoiding Surprise Cloud Bills
- 18:27 — Preventing Architectural Drift
- 21:02 — The Illusion of Correctness
- 25:31 — The 2 AM Debugging Problem
- 27:22 — Logs, AI and Segmented Infrastructure
- 29:39 — Modular Vibe Coding for Teams

## Frequently Asked Questions
- **Q:** Is vibe-coded software safe to put in production? — **A:** Richard uses vibe coding for demos, proofs of concept and home automation drivers, but not for production code. "I wouldn't put vibe coding into production. I think that's suicide" [12:15]. He sees it as a tool that makes engineers faster, not a replacement for production engineering.
- **Q:** Why do vulnerabilities in vibe-coded apps so often go unfixed? — **A:** "Because nobody checks" [10:15], Richard says. Apps get tested once or twice and look fine until real users hit them, and the models learn from public sample code on sites like Reddit, which often includes the poster's own password.
- **Q:** How can teams avoid surprise infrastructure costs from vibe coding? — **A:** Vibe-coding platforms put the database where it's easiest for them, not where it's cheapest for you. "Every time you hit that data, every time a user logs in, you're going to get banged" [16:06]. Richard suggests moving data to a low-cost, isolated environment with a flat rate.
- **Q:** How do you keep a clean architecture when AI writes the code? — **A:** Keep prompts tight and the scope small. The most effective approach Richard has seen in production is to "do this on a modular by modular basis" [19:03], because vibe coding a whole app gives the model room to take the easiest path.
- **Q:** How do you debug a vibe-coded app that breaks at 2 AM? — **A:** Protected Harbor snaps the app back in time to see what changed in the operating environment, then improves testing so the failure is caught next time. Richard warns that "Memory leaks are like the hallmark of there's other problems deep down" [25:54], and a nightly reboot only hides them.
