initial commit
This commit is contained in:
commit
7eae4ea9a1
7 changed files with 808 additions and 0 deletions
12
hooks/pre-commit
Executable file
12
hooks/pre-commit
Executable file
|
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/env bash
|
||||
# Pre-commit hook for the secrets repo.
|
||||
# Rejects staged files matching .env patterns without .age extension.
|
||||
# This is a safety net, not a security boundary (--no-verify bypasses it).
|
||||
|
||||
BLOCKED=$(git diff --cached --name-only | grep -E '\.env' | grep -v '\.age$' || true)
|
||||
if [ -n "$BLOCKED" ]; then
|
||||
echo "ERROR: Plaintext env files staged for commit:"
|
||||
echo "$BLOCKED"
|
||||
echo "Only .age (encrypted) files should be committed."
|
||||
exit 1
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue