chore: move keystore into ignored keys/ dir with pre-commit guard

This commit is contained in:
2026-10-25 01:01:45 +02:00
parent 8de8632f89
commit 0e4de29ff2
4 changed files with 74 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
#!/usr/bin/env bash
# Blocks accidental commits of signing secrets (defence in depth on top of .gitignore).
set -euo pipefail
blocked=$(git diff --cached --name-only --diff-filter=ACM \
| grep -Ei '(^|/)keys/|\.jks$|\.keystore$|\.p12$|(^|/)key\.properties$' || true)
if [ -n "$blocked" ]; then
echo 'REFUSED: signing secrets must never be committed:' >&2
echo "$blocked" >&2
exit 1
fi