#!/usr/bin/env sh

# Prevent pushing code with High/Critical vulnerabilities in production dependencies
echo "🛡️  Running Production Security Gate (npm audit)..."

npm audit --audit-level=high --omit=dev

if [ $? -ne 0 ]; then
    echo "❌ Security Check Failed! High vulnerabilities detected."
    echo "Run 'npm audit fix' or add overrides before pushing."
    exit 1
fi
