chore: move keystore into ignored keys/ dir with pre-commit guard
This commit is contained in:
Executable
+10
@@ -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
|
||||
Reference in New Issue
Block a user