Why not have a pre-commit hook clientside that runs truffleHog AND if successful generates some form of file indicating it was run, then have a serverside hook checking for that file? This should be doable even with plain Github/etc, no?
Rephrasing:
What if you use a git server like GitHub that doesn't allow you to install server side hooks?