News for hackers. Stuff that matters.
Re:Toyota Accidently Exposed a Secret Key Publicly on GitHub... by fiddlerwoaroof on Thursday October 13, 2022 @06:58PM (#33197569)
I wish I could set this up to block pushes proactively instead of reacting to pushed secrets.
Re:Toyota Accidently Exposed a Secret Key Publicly on GitHub... by kadoban on Thursday October 13, 2022 @07:30PM (#33197831)
You could set up something like https://github.com/godaddy/tartufo in a pre-commit hook. Not sure if github has a way to hook into the push hooks on server side, they might though.
Re:Toyota Accidently Exposed a Secret Key Publicly on GitHub... by fiddlerwoaroof on Thursday October 13, 2022 @08:24PM (#33198246)
Yeah, the issue with pre-commit hooks is you have to remember to set them up client-side. I tend to push to GitHub through a gitolite mirror, though, so I could probably put this in the hooks in my gitolite middlebox.
Re:Toyota Accidently Exposed a Secret Key Publicly on GitHub... by mypalmike on Friday October 14, 2022 @03:31AM (#33200610)
What do you have to set up client side? They can be committed with the project. Or do I misunderstand?
Re:Toyota Accidently Exposed a Secret Key Publicly on GitHub... by kadoban on Saturday October 15, 2022 @11:47AM (#33215807)
Pre-commit hooks can't be automatically set up on the client side. If they could, this would mean that any repo you clone could run arbitrary code on your machine.

It can be as simple as a script you have to run once, but it can't be automatic. Which also means you can't really trust contributors to do it, even if they're well-meaning some will forget.

Re:Toyota Accidently Exposed a Secret Key Publicly on GitHub... by iancarroll on Thursday October 13, 2022 @08:00PM (#33198066)
Re:Toyota Accidently Exposed a Secret Key Publicly on GitHub... by neuronexmachina on Thursday October 13, 2022 @08:10PM (#33198137)
Yelp has a "detect-secrets" project that can detect potential secrets and can be used as a pre-commit hook: https://github.com/Yelp/detect-secrets
Re:Toyota Accidently Exposed a Secret Key Publicly on GitHub... by JoeMattiello on Friday October 14, 2022 @03:09AM (#33200468)
Re:Toyota Accidently Exposed a Secret Key Publicly on GitHub... by cwinq on Friday October 14, 2022 @03:30AM (#33200608)