Initial upload: Code Privacy Shield v0.1.0
Some checks failed
CI / test (push) Has been cancelled

This commit is contained in:
2026-02-02 20:50:55 +00:00
parent f1899144af
commit 2efeb1b82c

View File

@@ -0,0 +1,23 @@
#!/bin/bash
# Pre-commit hook for Code Privacy Shield
# Add this to .git/hooks/pre-commit
set -e
# Find the project root
ROOT_DIR="$(git rev-parse --show-toplevel)"
# Check if CPS is available
if command -v cps &> /dev/null; then
echo "Running Code Privacy Shield check..."
# Check staged Python files
FILES=$(git diff --cached --name-only -- '*.py' '*.js' '*.ts' '*.json' '*.yaml' '*.yml' 2>/dev/null || true)
if [ -n "$FILES" ]; then
# Preview what would be redacted
echo "$FILES" | xargs -I {} sh -c 'echo "Checking {}"; cps preview "{}" 2>/dev/null || true'
fi
fi
exit 0