16 lines
286 B
Bash
Executable File
16 lines
286 B
Bash
Executable File
#!/bin/sh
|
|
# Pre-push hook to run security audit
|
|
|
|
echo "Running security audit before push..."
|
|
|
|
# Run npm audit
|
|
npm audit --audit-level=moderate
|
|
|
|
if [ $? -ne 0 ]; then
|
|
echo "Security audit failed. Please fix vulnerabilities before pushing."
|
|
exit 1
|
|
fi
|
|
|
|
echo "Security audit passed!"
|
|
|