The ignore file covers one old Gitea token in deleted .env.local, which was confirmed revoked (API returned 401).
12 lines
441 B
Bash
Executable File
12 lines
441 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Git pre-commit hook: blocks a commit if its staged changes contain a secret.
|
|
#
|
|
# Activate once per clone: git config core.hooksPath .githooks
|
|
# Skip in an emergency: git commit --no-verify
|
|
if ! command -v betterleaks >/dev/null 2>&1; then
|
|
echo "pre-commit: betterleaks is not installed, so staged changes can't be scanned" >&2
|
|
exit 1
|
|
fi
|
|
|
|
exec betterleaks git --pre-commit --staged --redact --no-banner --no-color .
|