-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathverify-setup.sh
More file actions
executable file
·30 lines (25 loc) · 831 Bytes
/
Copy pathverify-setup.sh
File metadata and controls
executable file
·30 lines (25 loc) · 831 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
echo "Checking if secret scanning is active..."
# Check if pre-commit hooks are installed
if [ ! -f .git/hooks/pre-commit ]; then
echo "ERROR: Pre-commit hooks NOT installed!"
echo " Run: ./setup.sh"
exit 1
fi
# Check if detect-secrets is available
if ! command -v detect-secrets &> /dev/null; then
echo "ERROR: detect-secrets NOT installed!"
echo " Run: ./setup.sh"
exit 1
fi
# Check if hook references our config
if ! grep -q "pre-commit-config.yaml" .git/hooks/pre-commit; then
echo "ERROR: Pre-commit hooks not properly configured!"
echo " Run: ./setup.sh"
exit 1
fi
echo "SUCCESS: Secret scanning is properly configured!"
echo "SUCCESS: Pre-commit hooks are active"
echo "SUCCESS: detect-secrets is installed"
echo ""
echo "You're protected from committing secrets!"