Leaked secrets like API keys are a severe security risk especially when they enter into git repositories. The best place to detect secrets is BEFORE they enter into a git repository.
Using GG-Shield and the pre-commit framework you can quickly set up powerful secrets detection to block commits that may contain secrets before they enter your git repository.
This video also goes through how we can utilize some of the additional features to ignore false positives and specific file paths.
Intro: 0:00
Why setup a pre-commit hook: 0:16
Getting setup: 0:41
Installing the pre-commit framework git hook: 3:20
Running first git hook: 6:14
Ignoring secrets: 7:24
Irgnoring file paths: 9:30
Irgnoring select files: 11:14
Wrap-up: 12:37