fix: Remove car_id property from adminAddVehicle call to fix TypeScript error
This commit is contained in:
24
scripts/git-hooks/pre-push
Normal file
24
scripts/git-hooks/pre-push
Normal file
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
# Git Pre-Push Hook - Security Audit
|
||||
# Install: cp scripts/git-hooks/pre-push .git/hooks/ && chmod +x .git/hooks/pre-push
|
||||
|
||||
echo "Running security audit before push..."
|
||||
|
||||
cd frontend
|
||||
AUDIT=$(npm audit --json 2>/dev/null || true)
|
||||
CRITICAL=$(echo "$AUDIT" | grep -o '"critical":[0-9]*' | head -1 | cut -d: -f2)
|
||||
|
||||
if [ "${CRITICAL:-0}" -gt 0 ]; then
|
||||
echo ""
|
||||
echo "========================================"
|
||||
echo " PUSH BLOCKED: Critical vulnerabilities found!"
|
||||
echo "========================================"
|
||||
npm audit 2>/dev/null | grep -A 3 "critical"
|
||||
echo ""
|
||||
echo "Run 'npm audit fix' or update packages manually."
|
||||
echo "To bypass: git push --no-verify"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Security check passed."
|
||||
exit 0
|
||||
Reference in New Issue
Block a user