chore: block secrets in commits with a Betterleaks hook

The ignore file covers one old Gitea token in deleted .env.local, which
was confirmed revoked (API returned 401).
This commit is contained in:
kasun committed 2026-11-23 00:12:55 +01:00
1 parent 12400b4c83
commit 0d5f49591a
3 files changed
+15

No files matched your search

+2
View File
@@ -0,0 +1,2 @@
# Old Gitea token in deleted .env.local. Confirmed revoked (API returned 401) on 2026-11-22.
8c69ec772ab5f0df73fa2614e5b8b22adb9bbd15:.env.local:gitea-access-token:2
+11
View File
@@ -0,0 +1,11 @@
#!/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 .
+2
View File
@@ -6,3 +6,5 @@ bin/
Pulumi.dev.yaml Pulumi.dev.yaml
sdks/ sdks/
.env .env
.env.*
!.env.example