3 ms·
Ask HN: Best practice to prevent credentials/secrets commit to Git repo
Hi HN friends, it's july 2026 and I am assuming many of you use fully agentic building now. Securing secrets and credentials from being committed to GitHub repo has been even more critical. What's your best practice nowaday?
Thx
- toomuchtodo 3mo agoPush protection https://docs.github.com/en/code-security/concepts/secret-security/push-protection https://docs.github.com/en/code-security/concepts/secret-sec... https://github.blog/news-insights/product-news/push-protection-is-generally-available-and-free-for-all-public-repositories/ https://github.blog/news-insights/product-news/push-protecti...
- xinbenlv 3mo agoThanks, that's helpful. Do you use gitleaks or other library to do pre-commit protection? @toomuchtodo
- toomuchtodo 2mo agoGitleaks is a fine tool to use, I would recommend its use.