You committed a .env to GitHub — fix it in this order
Pushing .env is the classic solo-builder footgun. GitGuardian’s public reporting has repeatedly found a large share of leaked secrets in environment-variable style files — and GitHub’s own 2024 figure was more than 39 million leaked secrets platform-wide (GitHub Blog, Apr 2025).
Safe and Secure is for people who keep their own keys tidy: API keys, DB URLs, OAuth and JWT tokens, AWS access keys, passwords, .env slips, and private key files. Soft helpers — not a security suite.
Fix order
- Inventory every secret that was in the committed file (not just the OpenAI key).
- Revoke/rotate each one at its provider. Do not skip “low risk” tokens.
- Stop tracking:
git rm --cached .env(and variants), add them to.gitignore, commit the removal. - Replace values in hosting, CI, and local shells with new secrets.
- Optional: rewrite history with
git filter-repo/ BFG after revoke. Force-push carefully; assume forks still have the old blob. - Prevent:
.env.exampleonly, pre-commit scanner, GitHub push protection.
What “tidy” looks like for a solo builder
- One inventory of what you actually hold
- Clear owners (usually: you)
- A path from detect → alert → rotate when something shows up in public places
That is the Safe and Secure positioning. Planned watch surfaces include paste sites, GitHub, package registries, and public logs — beyond a single pre-commit hook.
Next: rotate OpenAI key · API key leak monitoring · detect → alert → rotate
FAQ
Is gitignore enough after the push?
No. .gitignore only stops future adds. Secrets already in history stay until you revoke them (required) and optionally rewrite history (optional).
Which secrets inside .env matter most?
Anything that grants spend or data access: cloud keys, DB URLs with passwords, OAuth client secrets, JWT signing keys, private key paths.
Can Safe and Secure scrub my git history?
No. History rewrite stays a git operation you run (filter-repo / BFG). Safe and Secure focuses on inventory, planned public-surface monitoring, alert, and rotate-where-APIs-allow.
CTA
Safe and Secure — soft helpers for your stack, not a security suite. Your secrets. Your stack. See the product page or email hello@myviewspend.com. No invented pricing on this page.