Secrets (API keys, passwords, tokens, encryption keys) must be managed securely — never hardcoded in code or committed to version control, but stored and accessed safely. Poor secrets management is a common, serious source of breaches.
The cardinal rule: never hardcode or commit secrets
❌ NEVER hardcode secrets in source code or commit them to Git:
→ committed secrets are in the repo HISTORY (exposed even if "removed" later)
→ public repos / leaks expose them to attackers (bots scan GitHub for keys constantly)
→ a TOP cause of breaches (leaked AWS keys, database passwords, API tokens)
⚠️ If a secret IS committed/leaked → ROTATE it immediately (it's compromised)
