Home / Companies / Infisical / Blog / Post Details
Content Deep Dive

How environment variables work (and why to delete your .env)

Blog post from Infisical

Post Details
Company
Date Published
Author
Finn
Word Count
2,255
Company Posts That Month
8
Language
English
Hacker News Points
2
Post removed?
No
Summary

Environment files are widely used to provide applications with credentials such as database URLs, API keys, and tokens, but their persistent plaintext nature can cause secret sprawl across laptops, chat systems, CI settings, deployment manifests, and backups. Applications do not inherently read .env files; libraries such as dotenv parse those files and insert their values into the process environment, which applications access through mechanisms like Node.js’s process.env. Normally, operating systems pass environment variables from parent processes to child processes through process creation and execution, allowing a different approach called runtime injection. Under runtime injection, a secrets-management tool authenticates, retrieves encrypted secrets from a centralized store, adds them to an application’s environment when launching it, and avoids writing credentials to project files or disks. The approach can simplify onboarding, offboarding, credential rotation, auditing, and access control, although secrets remain visible in a running process’s memory to other appropriately privileged local processes. The discussion presents Infisical as one example of a secrets manager that can inject secrets at runtime while retaining application compatibility without code changes.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
Secrets Management 12 2,045 503 138 -11%
Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.