Secrets, .env, and leaks in logs & commits
.env files and cloud credentials are the fastest way to turn a demo into an incident. Leaks rarely happen only in one place—they propagate through shell history, CI output, crash dumps, and forked repos. Design workflows so secrets live in managed stores and short-lived tokens, not in long-lived strings in your tree.
This lesson’s layout: nested rings show where secrets sit in depth; code-explorer dissects a risky file; timeline walks through a classic leak arc; the table compares storage options; grid cards list concrete mitigations.
Where the secret actually lives
Smell-test: a dangerous .env fragment
How a leak unfolds over time
Where should configuration live?
Hardening checklist