Settings

Theme

Ask HN: Best practice to prevent credentials/secrets commit to Git repo

2 points by xinbenlv · 3 comments · 1 min read


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

1 thread
toomuchtodo

Push protection

https://docs.github.com/en/code-security/concepts/secret-sec...

https://github.blog/news-insights/product-news/push-protecti...

  • xinbenlvOP

    Thanks, that's helpful. Do you use gitleaks or other library to do pre-commit protection? @toomuchtodo

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection