DEV Community

Accidentally Pushed a `.env` Secret to a Public GitHub Repo? Here's What to Do (opens in new tab)

Discussed on DEV

Exposing secrets in a public GitHub repository is a real production emergency. Public repositories are continuously scanned by automated bots, and leaked credentials can be discovered within minutes. If this happens, act immediately. 1. Assess the Impact Immediately Start by identifying exactly what was exposed. Questions to ask: Were API keys leaked? Did database credentials appear in the repository? Were cloud credentials exposed (AWS, GCP, Azure)? Did payment gateway secrets become public?...

Read the original article
Sign in to keep reading the full article.

Keyboard Shortcuts

Navigation

Next / previous post
j/k
Open post
oorEnter
Preview post
v

Post Actions

Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Save / unsave
s

Recommendations

Add interest / feed
Enter
Not interested
x

Go to

Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Discover
gb
Search
/

General

Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help