A set of pre-commit hook definitions for git-secrets.
git-secrets
prevents you from committing passwords and other sensitive information to a git repository.
These hooks use Docker to run pre-commit, so it's not necessary to install it manually in the host.
Add this to your .pre-commit-config.yaml
- repo: https://github.com/Masabi/git-secrets-pre-commit
rev: v0.1
hooks:
- id: git-secrets-scan
- id: git-secrets-commit-msg
- id: git-secrets-merge-check
and install:
pre-commit install -t pre-commit -t commit-msg -t prepare-commit-msg
Scans all files that are about to be committed.
Checks the commit message for secrets.
Determines if merging in a commit will introduce tainted history
These hooks do not scan the repository history. For that, refer to the git-secrets docs.