diff --git a/.husky/pre-commit b/.husky/pre-commit index 7a891170..1ef10e0d 100644 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -8,5 +8,11 @@ git update-index --again # check for secrets if [ -z "$CI" ] && [ -z "$GITHUB_ACTIONS" ]; then + if ! command -v trufflehog >/dev/null 2>&1; then + echo "trufflehog' is not installed or not in your PATH." + echo "Download it from: https://github.com/trufflesecurity/trufflehog" + echo "Skipping secrets check due to missing trufflehog." + exit 1 + fi trufflehog git file://. --since-commit HEAD --fail fi