Every tutorial tells you to add .env to .gitignore. That's not enough.
The article discusses the limitations of using .gitignore to protect sensitive information in development projects. It introduces dotlock, a tool designed to encrypt environment variables, ensuring they are not stored in plaintext. The author explains how dotlock works and its benefits for managing local secrets securely.
- ▪.gitignore only hides secrets from git but does not encrypt them.
- ▪Dotlock is an encrypted .env vault that uses advanced encryption methods.
- ▪The tool features a terminal UI that allows users to manage secrets securely and switch between different profiles.
Opening excerpt (first ~120 words) tap to expand
try { if(localStorage) { let currentUser = localStorage.getItem('current_user'); if (currentUser) { currentUser = JSON.parse(currentUser); if (currentUser.id === 1150506) { document.getElementById('article-show-container').classList.add('current-user-is-article-author'); } } } } catch (e) { console.error(e); } Muhammad Ahmad Posted on May 30 Every tutorial tells you to add .env to .gitignore. That's not enough. #go #security #opensource #devtools Here's something nobody talks about. .gitignore doesn't encrypt your secrets. It just hides them from git. They're still sitting on your laptop as plaintext. Every tool you install can read them. Every script that runs can read them. One accidental commit and your database password is public on GitHub forever.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at DEV.to (Top).