From 30c004eb77024f31873994f44ce73eb0f92cddbe Mon Sep 17 00:00:00 2001 From: jokob-sk Date: Fri, 6 Feb 2026 14:13:53 +1100 Subject: [PATCH] GIT: static code check for disabled CurrentScan cleanup - test Signed-off-by: jokob-sk --- .github/workflows/code-checks.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/code-checks.yml b/.github/workflows/code-checks.yml index 908ce89f..9087a570 100644 --- a/.github/workflows/code-checks.yml +++ b/.github/workflows/code-checks.yml @@ -17,6 +17,23 @@ jobs: - name: Checkout code uses: actions/checkout@v4 + - name: 🚨 Ensure DELETE FROM CurrentScan is not commented out + run: | + echo "🔍 Checking that DELETE FROM CurrentScan is not commented out..." + + MATCHES=$(grep -RInE '^[[:space:]]*#[[:space:]]*db\.sql\.execute\("DELETE FROM CurrentScan"\)' \ + --include="*.py" .) || true + + if [ -n "$MATCHES" ]; then + echo "❌ Found commented-out DELETE FROM CurrentScan call:" + echo "$MATCHES" + echo + echo "This line must NOT be commented out in committed code." + exit 1 + else + echo "✅ DELETE FROM CurrentScan is active." + fi + - name: Check for incorrect absolute '/php/' URLs in frontend code run: | echo "🔍 Checking for incorrect absolute '/php/' URLs (should be 'php/' or './php/')..."