# 985: Stop putting secrets in .env Page: https://stenobird.com/podcast/syntax-tasty-web-development-treats/985-stop-putting-secrets-in-env Text version: https://stenobird.com/podcast/syntax-tasty-web-development-treats/985-stop-putting-secrets-in-env.md Podcast: [Syntax - Tasty Web Development Treats](https://stenobird.com/podcast/syntax-tasty-web-development-treats) Published: 2026-03-09T11:00:00+00:00 Episode link: https://syntax.fm/985 Audio file: https://traffic.megaphone.fm/FSI1226956606.mp3 Processing state: processed JSON: https://stenobird.com/v1/public/podcasts/syntax-tasty-web-development-treats/episodes/985-stop-putting-secrets-in-env Duration seconds: 2828 ## Resource Traditional .env files are a major security liability, especially with AI coding agents capable of leaking plain-text secrets. This episode introduces Varlock, a tool that replaces static files with schema-driven, validated, and redacted environment variables. ## Highlights - Main idea: Plain-text .env files are dangerous because AI agents and accidental commits can easily expose sensitive production credentials - Practical takeaway: Use schema-driven environment variables to catch configuration errors at build time rather than during runtime explosions - Failure mode: Relying on manual processes like copy-pasting secrets into files often leads to developers bypassing secure tools like 1Password for the path of least resistance - Security feature: Varlock can redact sensitive values from console logs and HTTP responses to prevent accidental leakage in server environments - Practical takeaway: Moving toward unified, typed configurations improves developer experience across different languages and frameworks ## Topics Environment Variables, Web Security, Software Development, DevOps, AI Coding Agents, Secret Management, JavaScript, Configuration Management ## Chapters - 1:05 — The Risks of .env Files: Discussing how forgotten production secrets in plain-text files pose a massive risk in the era of AI coding agents. - 4:50 — Introducing Varlock: A look at a unified solution that synchronizes environment variables with schemas to prevent configuration drift. - 8:45 — Schema-Driven Validation: How schema-driven variables catch errors during build or boot time instead of causing runtime crashes. - 12:30 — Framework Integration: The challenges of framework-specific environment implementations and the need for a standard approach. - 15:55 — Cross-Language Compatibility: Exploring how separating configuration from implementation allows for generating types in Go, Rust, or JavaScript. - 19:15 — Best Practices for Security: Discussing the importance of typing environment variables and preventing leaks in server-side rendering. - 26:00 — AI Integration and Redaction: How to use tools to ensure AI agents don't ingest secrets and how to redact sensitive data from logs. ## Actions - request_transcript: `POST https://stenobird.com/v1/public/podcasts/syntax-tasty-web-development-treats/episodes/985-stop-putting-secrets-in-env/transcription-requests` — Idempotently request low-priority transcript generation for this episode. - read_markdown: `GET https://stenobird.com/podcast/syntax-tasty-web-development-treats/985-stop-putting-secrets-in-env.md` — Read the agent-friendly Markdown representation of this episode resource. A page view does not enqueue transcription. Agents should invoke `request_transcript` explicitly when they need this episode processed. ## Transcript Full transcripts are not published on public pages unless there is a clear rights basis.