From 88509ce8c2f8b3c057b0349bb3b24c71509e5f19 Mon Sep 17 00:00:00 2001 From: jokob-sk Date: Thu, 20 Nov 2025 17:47:00 +1100 Subject: [PATCH] PLG: NMAPDEV better FAKE_MAC description Signed-off-by: jokob-sk --- .github/workflows/code_checks.yml | 23 +++++++++++++++++------ front/plugins/nmap_dev_scan/config.json | 2 +- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/.github/workflows/code_checks.yml b/.github/workflows/code_checks.yml index e5c5dfa5..48db0534 100755 --- a/.github/workflows/code_checks.yml +++ b/.github/workflows/code_checks.yml @@ -21,7 +21,7 @@ jobs: run: | echo "๐Ÿ” Checking for incorrect absolute '/php/' URLs (should be 'php/' or './php/')..." - MATCHES=$(grep -rE "[\"']/\/php\/" --include=*.{js,php,html} ./front | grep -E "\.get|\.post|\.ajax|fetch|url\s*:") || true + MATCHES=$(grep -rE "['\"]\/php\/" --include=\*.{js,php,html} ./front | grep -E "\.get|\.post|\.ajax|fetch|url\s*:") || true if [ -n "$MATCHES" ]; then echo "$MATCHES" @@ -85,14 +85,25 @@ jobs: echo "๐Ÿ” Linting Dockerfiles..." /tmp/hadolint Dockerfile* || true - docker-tests: + test: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v4 - - name: Run Docker-based tests + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + + - name: Install dependencies run: | - echo "๐Ÿณ Running Docker-based tests..." - chmod +x ./run_docker_tests.sh - ./run_docker_tests.sh + pip install -r requirements.txt + pip install pytest pyyaml + + - name: Run unit tests + run: | + echo "๐Ÿงช Running unit tests..." + export PYTHONPATH=$PYTHONPATH:./server + pytest -m "not (docker or compose or feature_complete)" + diff --git a/front/plugins/nmap_dev_scan/config.json b/front/plugins/nmap_dev_scan/config.json index 92f8aecb..5f13e34f 100755 --- a/front/plugins/nmap_dev_scan/config.json +++ b/front/plugins/nmap_dev_scan/config.json @@ -448,7 +448,7 @@ "description": [ { "language_code": "en_us", - "string": "When scanning remote networks, NMAP can only retrieve the IP address, not the MAC address. Enabling this setting generates a fake MAC address from the IP address to track devices, but it may cause inconsistencies if IPs change or devices are rediscovered. Static IPs are recommended. Device type and icon will not be detected correctly. When unchecked, devices with empty MAC addresses are skipped." + "string": "When scanning remote networks, NMAP can only retrieve the IP address, not the MAC address. Enabling the FAKE_MAC setting generates a fake MAC address from the IP address to track devices, but it may cause inconsistencies if IPs change or devices are re-discovered with a different MAC. Static IPs are recommended. Device type and icon might not be detected correctly and some plugins might fail if they depend on a valid MAC address. When unchecked, devices with empty MAC addresses are skipped." } ] }