
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
⚠️ IMPORTANT NOTE: EnvCloak is NOT Limited to .env Files!⚠️
EnvCloak was originally built to secure .env files, but it can encrypt and decrypt any file type.
Use it for .json, .yaml, .txt, binary files, or any sensitive data.
The name may be misleading, but the tool is far more versatile than it suggests!
"Because Your Secrets Deserve Better Than Plaintext!"
Welcome to EnvCloak, the ultimate sidekick for developers, ops folks, and anyone who’s ever accidentally committed an API key to version control. (Yes, I know… it happens to the best of us. 😅) EnvCloak takes the stress out of managing environment variables by wrapping them in the cozy blanket of encryption, so you can focus on building awesome things—without the lingering fear of a security breach.
If you find EnvCloak useful, please ⭐ the repository. It helps others discover this project! - thank you!
In order to install envcloak
simply run:
pip install envcloak
or if you want dev
tools too 😎:
pip install envcloak[dev]
👋 There are also self-contained binaries for
Windows
,Linux
andMacOS
, don't have to use python at all! 🥳
ℹ️ More examples are present in examples section.
# With password and salt
envcloak generate-key-from-password --password "YourTopSecretPassword" \
--salt "e3a1c8b0d4f6e2c7a5b9d6f0cr2ad1a2" --output secretkey.key
# With password without salt (we will add random salt then)
envcloak generate-key-from-password --password "YourTopSecretPassword" --output secretkey.key
# From random password and salt
envcloak generate-key --output secretkey.key
What it does: generates your private key used to encrypt and decrypt files. Appends (or creates if needed) .gitignore as well as super-hero should! 🎉
⚠ If someone knows your password and salt (option 1) can recreate same
key
- keep those variables safe askey
itself ⚠
envcloak encrypt --input .env --output .env.enc --key-file mykey.key
What it does: Encrypts your
.env
file with a specified key, outputting a sparkling.env.enc
file.
envcloak decrypt --input .env.enc --output .env --key-file mykey.key
What it does: Decrypts the
.env.enc
file back to.env
using the same key. Voilà!
or you may want to use it ...
from envcloak import load_encrypted_env
load_encrypted_env('.env.enc', key_file='mykey.key').to_os_env()
# Now os.environ contains the decrypted variables
What it does: Loads decrypted variables directly into
os.environ
. Secrets delivered, stress-free.
🔑 Encryption Algorithm
sha3
validation of files and content.🗝️ Key Storage
🗂️ File Handling
--directory
instead of --input
on encrypt
and decrypt
.ℹ️ EnvCloak process files in batch one-by-one.
--preview
flag (ℹ️ only for directories and it does not commit the operation!).🚦 Error Handling
✅ Compatibility of pipelines and systems
Because you deserve peace of mind. EnvCloak wraps your environment variables in layers of encryption goodness, protecting them from prying eyes and accidental slips. Whether you’re a solo dev or part of a big team, this tool is here to make managing secrets simple, secure, and downright pleasant.
So go ahead—secure your .env
like a boss. And remember, EnvCloak isn’t just a tool; it’s your secret-keeping partner in crime. (But the good kind of crime. 😎)
Tool | Strengths | Weaknesses |
---|---|---|
EnvCloak | Lightweight, Python-native, simple to integrate with CI/CD workflows. | Limited ecosystem compared to established tools. |
Sops | Integrates with cloud providers, supports partial file encryption. | More complex to configure for beginners. |
BlackBox | Simple file-based encryption for Git repos. | Limited to GPG, lacks flexibility. |
Vault | Robust, enterprise-grade with dynamic secrets. | High complexity, overkill for small projects. |
Confidant | AWS IAM integration, designed for secure CI/CD workflows. | Requires AWS, limited to its ecosystem. |
Doppler | Centralized secret management with CI/CD integration. | Paid plans for advanced features, cloud-reliant. |
Key Differentiator for EnvCloak: Focused specifically on Python developers and lightweight CI/CD needs, making it ideal for small to medium projects.
A huge thanks to all our amazing contributors! 🎉
Don’t let your API keys end up in the wrong hands (or on Twitter). Grab EnvCloak now and start encrypting like a pro.
Happy env
Cloaking! 🕵️♂️
FAQs
Securely manage encrypted environment variables with ease.
We found that envcloak demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.