chore: add GORM security scanner and pre-commit hook

- Introduced a new script `scan-gorm-security.sh` to detect GORM security issues and common mistakes.
- Added a pre-commit hook `gorm-security-check.sh` to run the security scanner before commits.
- Enhanced `go-test-coverage.sh` to capture and display test failure summaries.
This commit is contained in:
GitHub Actions
2026-01-28 10:26:27 +00:00
parent 5fe57e0d98
commit 611b34c87d
9 changed files with 3761 additions and 3 deletions

View File

@@ -0,0 +1,14 @@
#!/usr/bin/env bash
# Pre-commit hook for GORM security scanning
# Wrapper for scripts/scan-gorm-security.sh
set -euo pipefail
# Navigate to repository root
cd "$(git rev-parse --show-toplevel)"
echo "🔒 Running GORM Security Scanner..."
echo ""
# Run scanner in check mode (exits 1 if issues found)
./scripts/scan-gorm-security.sh --check