Security & Best Practices

Leaking Secrets

What It Is

Accidentally exposing sensitive information, usually by committing to GitHub

Analogy

Leaving the safe combination on a sticky note in a public place

Try It Out

Common Ways Secrets Get Leaked

😱

Committing .env to GitHub

Bots scan for secrets in seconds

📋

Sharing in Slack/Email

Messages can be forwarded or archived

📸

Screenshots with secrets visible

Often shared accidentally

🔍

Logging sensitive data

Logs are often less protected

🌐

Exposing in frontend code

Anyone can view browser source

Prevention: Use .gitignore, environment variables, and secret managers