This is why we choose to integrate on the pull-request level. It is not perfect, but at least your plain text secrets will not be merged into master and go in onto your developer's laptops and your servers(less). :)
We try to find a balance between perfect and achievable in an easy way for our customers
If creds leak, rotate those creds. Then, you check your logs to make sure there was no intrusion.
"Rotate the creds" gives the absolute best guarantee that they're useless. Three words I can explain to a nervous manager.
"What if someone got ahold of those creds?"
"Well, boss, here's the window in which it could have happened, and let's go over these logs together to see if it did."
Scrubbing the repo? I'm skeptical that you're getting rid of anything without push --force, and you sure as heck aren't running `git gc --prune` on the remote system, let alone `bfg`.
Isn't it too late once it is committed to github? It seems like this would be much more useful as a service running as a precommit hook on each workstation. Probably harder to ship/monetize that but as far as actually solving the problem wouldn't that be better?