Environment Variables & Secrets
- Set:
export API_URL=https://...(session only) - .env file:
KEY=valuelines; never commit, add to.gitignore - Perms:
chmod 600secret files - Load (shell):
set -a; . ./.env; set +a - Never: hardcode keys, log them, or put them in URL query strings
- Rotate: on suspected leak, revoke and regenerate immediately