We’ve all been there – that heart-stopping moment when you realize you’ve accidentally exposed sensitive information. Today, I’m sharing a personal story and introducing a tool that could save you from a similar nightmare. The Nightmare ScenarioLondon, February 2019, I was about to release an infrastructure project I’ve been working on for two weeks. I used the client’s AWS master key for testing. Yes, I know – I’m cringing too 😬. I pushed the container to a public repo for “easier access.” 🤡 Within seconds, an email arrived, cc’ing the entire company leadership about a critical security breach in production. Cold sweat. Near-firing experience. Lessons learned the hard way. The Common PitfallMany developers, especially those working on side projects or open-source repos, face a common dilemma: How do you store secrets locally in a way that’s both secure and convenient? Is it enough to put them in clear text and add them to . The answer is a resounding no. But the solution isn’t always clear. Enter: dotenvxHere’s where dotenvx comes in – a tool that could have saved me a world of pain. dotenvx is a “better .env” with three key features:
Getting Started with dotenvxInstallation is simple: `curl -sfS https://dotenvx.sh | sh # or brew install dotenvx` (I used Nix) Key Features:
Enhancing SecurityWhile dotenvx is a great start, it’s not a silver bullet. I recommend coupling it with security scanning tools like Snyk. These tools can help identify exposed secrets and other vulnerabilities in your project. Multi-Environment Supportdotenvx supports multiple environments (staging, production, etc.) through separate .env files. You can use the Docker IntegrationWhen using dotenvx with Docker, remember to:
The Balanced ApproachWhile .env files remain controversial in professional settings, tools like dotenvx offer a middle ground between security and practicality for side projects and open-source work. Remember, no solution is perfect. Always stay vigilant and use supporting systems to minimize risks. As always, feel free to reply directly with thoughts and comments. |
Every once in a while I send hand picked things I've learned. Kind of like your filter to the tech internet. No spam, I promise!
The UNDERRATED Open Source Powering My HomeLab This issue is brought to you by: Secure Your AI Future at Snyk Launch 2025 Join Snyk Launch to discover how to establish a foundation to build securely and confidently in the age of AI. Register for Snyk Launch 2025 (It’s Free!) Kestra, an open-source automation platform that's been a game-changer for my homelab and, frankly, could be for a lot more. It's one of those tools that flies under the radar for too many people, but packs so much...
He Made $64K Searching GitHub With A GENIUS Trick (using open source only) This issue is brought to you by: TestSprite is the Easiest AI Agent for Software Testing Ensure End-to-End Confidence in Your Software Quality. LEARN MORE This, is the story of how one individual, "Mr. B," leveraged a deep understanding of Git's less-explored features to uncover secrets in public repositories, earning over $64,000 💰. His "genius trick" wasn't about finding new tools, but about using existing Git...
Google's Git Killer Is INSANELY Better (and it's open source) You saw the title. Bold claim, right? "Insanely better"? Than Git? Git is the foundation of modern software development. It started back around 20 years ago, when Linus tried to build his first Linux kernel, and had enough of SVN. So Linus being Linus, he just went ahead and built his own. But what if the way we've always done version control isn't the only way, or even the best way anymore? That's the core idea behind Jujutsu (jj)...