mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-03-30 23:03:03 -07:00
GIT: static code check for disabled CurrentScan cleanup - test
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
This commit is contained in:
17
.github/workflows/code-checks.yml
vendored
17
.github/workflows/code-checks.yml
vendored
@@ -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/')..."
|
||||
|
||||
Reference in New Issue
Block a user