10 min read

Vibe Coding, AI Agents, and the .env Files Nobody Checks

By Sumit Khanna

Vibe Coding, AI Agents, and the .env Files Nobody Checks

TL;DR

  • Vibe coding lets anyone build apps by prompting AI — but nobody's checking the .env files these tools generate.
  • When non-engineers ship production code, secrets management becomes a massive blind spot.
  • Existing security tools don't address this gap. The tooling needs to catch up.

So back in February 2025, Andrej Karpathy dropped a post that basically rewired how a whole generation thinks about building software. He described this new approach where you just "fully give in to the vibes, embrace exponentials, and forget that the code even exists."

There's a new kind of coding I call "vibe coding," where you fully give in to the vibes, embrace exponentials, and forget that the code even exists. It's not really coding. I just see stuff, say stuff, run stuff, and copy paste stuff, and it mostly works.

Andrej Karpathy, co-founder of OpenAI

He called it "vibe coding." And honestly? The term spread like wildfire. Within weeks, everyone - developers, founders, PMs, designers - was building apps by just describing what they wanted to tools like Cursor, GitHub Copilot, Replit Agent, v0, and Bolt. The results were kind of mind-blowing. Full-stack apps with databases, auth flows, payment integrations - built in hours instead of weeks.

But here's the part nobody's talking about: every single one of those apps needs secrets. API keys, database URLs, OAuth tokens, payment credentials. And in the mad rush to ship, those secrets are being handled with less care than ever - often shared through insecure channels. That should scare you.

The democratization of building (and its blind spots)

Look, the promise of AI-assisted development is real. Nobody's denying that. Sahil Lavingia, the CEO of Gumroad, has been one of the loudest champions of this whole movement. He's talked openly about having non-engineers at Gumroad ship actual features using AI coding tools. The barrier to building software has literally never been lower.

I'm mass mass mass hiring. Non-engineers who are willing to mass vibe code.

Sahil Lavingia, CEO of Gumroad

Guillermo Rauch, CEO of Vercel, has been painting a similar picture. And it's genuinely exciting - a world where anyone with an idea can build a product. Where the bottleneck is imagination, not implementation. Who wouldn't want that?

But there's a dangerous assumption baked into this whole vision: that the people building these apps understand the security implications of what they're deploying. And that assumption? It's wrong way more often than anyone wants to admit.

What AI agents get wrong about .env files

When you ask an AI coding assistant to scaffold a new project, it does a shockingly good job. Directory structure? Done. Dependencies? Installed. API routes, database connection? All wired up. It even creates a .env file and fills it with placeholder values. Helpful, right?

Here's where things go sideways:

  • The AI creates the .env file but doesn't always create a .gitignore. Or it creates one that doesn't include .env. The user - who might not even know what a .gitignore is - commits everything and pushes to GitHub. Congrats, your production credentials are now public.
  • The AI uses placeholder values that look real. Strings like sk_test_abc123 or postgres://user:password@localhost:5432. The user swaps them for real credentials and completely forgets they're sitting in a file that should never be committed.
  • The AI doesn't explain what secrets actually are. It generates code that references process.env.OPENAI_API_KEY, but never mentions that this value is sensitive, shouldn't be shared, and needs to be rotated periodically. How would a new builder know?
  • The AI scaffolds deployment configs with secrets baked right in. Docker Compose files with hardcoded passwords. Terraform configs with API keys as string literals. Vercel config files with tokens in plaintext. It's wild.

And the thing is, the AI isn't being malicious. It's doing exactly what it was trained to do: generate code that works. But "working code" and "secure code" aren't the same thing. Not even close. That gap between them? That's where secrets leak.

The numbers are staggering

GitGuardian - the company that monitors public GitHub repos for leaked secrets - publishes an annual report on secrets sprawl. And honestly, the numbers are terrifying. This problem isn't getting better. It's accelerating.

In their 2024 State of Secrets Sprawl report, GitGuardian found 12.8 million new secret occurrences in public GitHub commits. That's a 28% jump from the year before. Over 1 million of those were unique, valid secrets.

These aren't toy projects or throwaway experiments. We're talking real API keys for AWS, Stripe, Twilio, SendGrid, and dozens of other services. Every single leaked secret is a potential breach, a potential financial hit, a potential compliance nightmare.

And here's the kicker - this was measured before vibe coding went mainstream. As AI-assisted development brings more and more non-developer builders into the mix, the secrets sprawl problem is only going to get worse. More builders, more projects, more .env files, more chances for credentials to end up somewhere they absolutely shouldn't.

The "it works on my machine" trap

There's this pattern that plays out over and over with vibe coders who are new to deployment. You've probably seen it. It goes like this:

Phase 1: Build. They use an AI tool to build the app locally. Everything works beautifully. The .env file has all the right values. App runs perfectly on localhost. Life is good.

Phase 2: Deploy. They push to Vercel, Railway, Netlify, or Render. Deployment fails because the environment variables aren't set. They Google the error, find a guide that says "add your environment variables in the dashboard," and manually copy-paste each value into a web form. Problem solved, right?

Phase 3: Forget. The app works in production. They move on with their lives. Those environment variables in the deployment dashboard? Never rotated. Nobody tracks which values are set where. If the Stripe key needs rotating, good luck remembering it's also set in three different Vercel projects, a Railway service, and a local .env file on their laptop.

Phase 4: Drift. Months later, someone (or another AI agent) changes a value locally. Now local, staging, and production are all out of sync. Nobody knows which version is correct. Nobody even knows how many versions exist. This is the reality of config management for the vast majority of vibe-coded projects. It's a mess.

The security tooling gap

The developer experience for building software has taken a massive leap forward in the last two years. AI code generation, one-click deployment, instant preview environments. It's incredible. But the security tooling? It hasn't kept pace. Not even close.

Think about it. We've got AI that can write a complete auth system in minutes. Platforms that deploy to global edge networks in seconds. But how do we manage the secrets that power all of it? Copy-paste into a web form. Or worse, a Slack DM. In 2026. Seriously.

This gap isn't sustainable. As more people build production software, the number of poorly managed secrets grows right alongside it. And the old mindset of "well, experienced developers know better" just doesn't work in a world where experienced developers aren't the only ones shipping code.

What needs to change

The answer isn't to slow down AI-assisted development. That ship has sailed - and honestly, it's too useful and too transformative to fight. The answer is to make secure secret management the default, not some afterthought. The tools need to meet people where they are.

  • Secret management should be part of project setup. When you run slickenv init, you get a secure workflow from day one. Not after the breach. Not after the compliance audit. From the jump.
  • Sharing should be encrypted by default. When a teammate needs the env file, they pull it through an encrypted channel. No Slack. No email. No plaintext floating around anywhere except their own machine.
  • Version history should just happen automatically. Every change tracked. Every version recoverable. So when something breaks at 2am, you know exactly what changed and can roll it back immediately.
  • The secure way has to be easier than the insecure way. This is the big one. If doing the right thing is harder, people won't do it. That's just human nature. The tool has to be easier, not just safer.

Build with vibes. Ship with confidence.

The vibe coding era is genuinely exciting. The ability for anyone to turn an idea into a working product is one of the most democratizing things that's happened in tech. We're not here to gatekeep that. Not even a little.

But we are here to make sure the foundations are solid. Your app might've been built with vibes, but your secrets should be managed with rigor. SlickEnv is that rigor - packaged in a tool that's simple enough for anyone to use.

Because the best time to think about secret management is before the breach. Not after. Always before.

SK
Sumit Khanna

Founder

Founder and developer behind SlickEnv. Building CLI-first tools for developers who care about security, simplicity, and shipping fast.

Ready to manage your .env files properly?

SlickEnv gives your team encrypted sync, version history, and rollback for every environment variable. No more Slack DMs.