Commit Graph
369 Commits
Author SHA1 Message Date
jokob-sk ce6914beaf FE+TESTS: review fixes 2026-10-10 09:22:04 +11:00
jokob-sk c25fd5f6af DOS+BE: skill updates + multi ip handling #1831 2026-10-10 08:45:53 +11:00
jokob-sk 1a42bcf8a1 Merge branch 'next_release' of github.com:netalertx/NetAlertX into next_release 2026-10-10 07:54:44 +11:00
jokob-sk f5e66cc6a3 FE+TESTS: review fixes 2026-10-10 07:54:32 +11:00
Jokob @NetAlertX 77bce19345 Merge pull request #1838 from netalertx/main
sync
2026-10-09 09:59:36 +11:00
jokob-sk 1b106cbc32 Review fixes 2026-10-09 09:59:14 +11:00
jokob-sk f37f2c7df7 BE+FE: Plugins -> Sources DevDetails tab 2026-10-09 09:18:04 +11:00
Alexander Shevchenko 94164829ff docs(unifi): describe import and test helper functions 2026-10-06 11:38:38 +02:00
Alexander Shevchenko 75e427f805 test(unifi): cover SSID extraction and scan mapping
Cover wireless, wired, missing flags, missing SSIDs, and differing network names. Keep standalone imports valid when real pytz is installed.
2026-10-06 10:36:25 +02:00
Jokob @NetAlertX 735f51027c Merge pull request #1835 from netalertx/main
sync
2026-10-05 08:44:18 +11:00
Alexander Shevchenko 1aceeae218 test(frontend): cover network topology rendering and interactions
Add a standalone fixture using the real topology renderer and styles.
Check painted pixels in WebKit, Chromium and Firefox because DOM bounds
can remain correct when WebKit paints foreignObject content incorrectly.

Exercise node clicks, collapse/expand, wheel zoom and drag pan, including
assertions that pointer gestures change the SVG transform.

Document dependency installation and execution separately from pytest.
The regression fails with the original frontend and passes with the fix.
2026-10-04 16:45:29 +02:00
jokob-sk 145f3778d0 FE+BE: save icon + columns SOT refactor 2026-10-03 13:23:55 +10:00
Jokob @NetAlertX e663368698 Merge pull request #1820 from Svestis/fix/app-conf-string-escaping
Escape backslashes in string settings written to app.conf
2026-10-03 08:26:40 +10:00
jokob-sk 067a6a15ef FE+BE: review fixes #1828 #1826 2026-10-02 23:05:02 +10:00
jokob-sk af79016ac8 PLG: FREEBOX presence L3 fix #1828 2026-10-02 22:44:11 +10:00
jokob-sk 06d9ae9613 BE: Fix: NIC-Covered Parent Devices Miss Connected/Down Reconnected Events #1821 2026-10-01 07:41:17 +10:00
jokob-sk fbbdefb898 BE: Fix: NIC-Covered Parent Devices Miss Connected/Down Reconnected Events #1821 2026-09-30 22:01:04 +10:00
jokob-sk b18fc0688a BE: Fix: NIC-Covered Parent Devices Miss Connected/Down Reconnected Events #1821 2026-09-30 21:33:33 +10:00
jokob-sk 4f7448b3c9 BE: NICs presence fixes orphan disconnect events for parent #1821 2026-09-30 07:53:07 +10:00
Panagiotis Koilakos 1c3139bb7b BE: address app.conf escaping review feedback
Keep encode_python_string() in front/php/server/util.php, replacing
encode_single_quotes() in place, and remove the standalone
app_conf_encode.php helper file and its require.

Rework the regression test to dispatch the real util.php savesettings
path through the PHP CLI against temporary synthetic config, API and
session directories, covering both scalar string and array string
settings: the generated app.conf must compile with warnings as errors
and parse back to the typed values.

The existing {s-quote} lifecycle is preserved (single quotes are still
written as {s-quote} and converted back by the same consumers), and the
app.conf readers in initialise.py and plugin_helper.py are unchanged.
2026-09-29 23:11:07 +02:00
Panagiotis Koilakos 6dbd3f8f29 BE: escape backslashes when serializing string settings to app.conf
app.conf is written by util.php saveSettings() as Python source and later
compiled/exec'd by the backend. String settings were emitted into
single-quoted Python literals with only ' encoded (as {s-quote}), so
backslashes were written raw. A regex such as 192\.0\.2\..* then produced
"SyntaxWarning: invalid escape sequence '\.'", valid Python escapes such as
\n were silently reinterpreted, and a trailing backslash made the file fail
to compile.

Move the encoder into a side-effect-free helper, app_conf_encode.php, as
encode_python_string(). It now doubles backslashes before the existing
{s-quote} replacement, so backslashes round-trip unchanged through app.conf
serialization and Python parsing, while single quotes keep using the legacy
{s-quote} placeholder. Both scalar string and array string serialization use
the helper.

Add regression tests that run the real PHP helper through the PHP CLI,
compile the generated source with warnings promoted to errors, and check
the scalar and array round trips.
2026-09-28 19:54:45 +02:00
jokob-sk 0d60071d49 BE+FE: System info -> Performance section 2026-09-28 21:32:16 +10:00
jokob-sk 4aa2a0dddb BE+FE: System info -> Performance section 2026-09-28 14:40:11 +10:00
jokob-sk f0a833ccc8 BE: docstrings 2026-09-28 07:44:29 +10:00
jokob-sk c5081ba4c1 PLG: MQTT sanitization of input #1816 2026-09-28 07:38:33 +10:00
jokob-sk fa5c62c9c3 BE: Stats Logging for Down Devices corrected #1818 2026-09-28 07:27:06 +10:00
jokob-sk 6d5760405b PLG: MQTT refactor 2026-09-28 07:03:55 +10:00
jokob-sk 81b28cb15e PLG: MQTT add devVLan devSSID #1816 2026-09-27 09:25:58 +10:00
jokob-sk 6d7517eb8a DOCS+PLG: skill updates, PIHOLEMON corrected source 2026-09-26 10:06:37 +10:00
jokob-sk 127e2c92ee DOCS+PLG: skill updates, ADGUARDIMP more accurate presence determination #1813 2026-09-26 09:41:20 +10:00
jokob-sk 591b1fadbe Merge branch 'next_release' of github.com:netalertx/NetAlertX into next_release 2026-09-26 07:49:26 +10:00
jokob-sk c04213eb23 PLG: FREEBOX and FRITZBOX didn't respect SET_ALWAYS due to non-matching plugin name in config #1812 2026-09-26 07:49:11 +10:00
Jokob @NetAlertX d838376e9e Merge pull request #1809 from mauricio-camayo/add-wificanary-plugin
Add WIFICANARY plugin - passive WiFi rogue-AP detection
2026-09-25 14:19:37 +10:00
Mauricio CamayoandClaude Sonnet 5 41efcbc971 Address jokob-sk review: dedupe rogue detections, add iw to remaining Dockerfiles
check_trusted_aps() evaluated a rogue AP once per trusted_aps entry sharing
its SSID, so the documented main-AP+extender pattern (same SSID, two
entries) produced duplicate (bssid, motor) rows for a real clone - a
problem once next_release's per-plugin identity-hash dedup guard lands in
main, since it drops a plugin's entire batch on any internal duplicate.
Fixed by deduping once in main() after collecting from all check_*
functions. Also added iw + its setcap to Dockerfile.debian and
.devcontainer/Dockerfile, which the original PR missed.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011meLPKCzVpdZyAUfv5U6mm
2026-09-24 20:10:12 -05:00
jokob-sk 087241274a Merge branch 'next_release' of github.com:netalertx/NetAlertX into next_release 2026-09-25 08:32:18 +10:00
jokob-sk f30d27db13 BE: plugin input improvements 2026-09-25 08:32:03 +10:00
Mauricio CamayoandClaude Sonnet 5 f7a0c5861e Address CodeRabbit review: extender false-positive + stale README section
- check_trusted_aps() was evaluating every AP sharing a protected SSID
  against every trusted entry for that SSID, not just its own. A main AP
  requiring a stricter accepted security set (e.g. wpa3-only) than a
  separately-trusted extender (e.g. wpa2) caused the extender to be
  flagged as evil_twin/absent_baseline_clone - it was being judged
  against the main AP's accepted set instead of its own. Fixed by
  excluding, from each trusted entry's evaluation, any BSSID that has its
  own separate trusted entry for the same SSID.
- README's "iw isn't in the published image yet" section was already
  stale within the same PR - this branch's own Dockerfile change adds
  iw + setcap, so the image ships it. Replaced with one sentence.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-24 15:01:16 -05:00
Jokob @NetAlertX 11e1227d7d Merge pull request #1808 from netalertx/main
sync
2026-09-24 10:43:22 +10:00
jokob-sk 33003a4c4d BE: plugin input improvements 2026-09-24 10:42:06 +10:00
jokob-sk d9ef76d942 BE: plugin input improvements 2026-09-24 10:26:24 +10:00
jokob-sk 6cc092f2ad BE: plugin input improvements 2026-09-24 10:01:52 +10:00
Jokob @NetAlertX 88cf790263 Merge pull request #1805 from netalertx/next_release
Next release
2026-09-24 07:50:23 +10:00
Mauricio CamayoandClaude Sonnet 5 d0a3a5416b Add WIFICANARY plugin - passive WiFi rogue-AP detection
Periodic iw-scan-based detection of the 6 heuristics that don't need
monitor-mode hardware (see issue #1789): pwnagotchi/Pineapple signatures,
evil-twin/open clones, baseline-AP-absent-with-clone, security downgrades,
and duplicate-SSID/different-vendor - all evaluated against a user-curated
trusted-AP baseline (WIFICANARY_trusted_aps). A detection creates a
flagged Devices entry even for BSSIDs that never associate, per the
addendum on the same issue.

- WIFICANARY_TRUSTED_SECURITY is multi-select: an observed encryption
  exactly matching any selected value is accepted; otherwise it's flagged
  if weaker than the strongest selected value (deliberate - comparing
  against the weakest would make multi-select pointless, since anything
  at/above the weakest would silently pass regardless of the rest of the
  selection).
- Added a "known device turned rogue" motor: escalate_known_devices()
  cross-references each detection's BSSID against the Devices table via
  the new DeviceInstance.getAllByMacs(). This covers the BSSID-identity
  half of the issue #1789 addendum's motor 10; the deauth/probe-source-MAC
  half still needs monitor-mode data this plugin doesn't have.
- Vendor is deliberately not looked up by this plugin - any device it
  creates gets devVendor filled in for free by core's own vendor_update
  plugin on its next pass.

43 wificanary unit tests + 10 DeviceInstance.getAllByMacs() tests, all
test_plugin_conventions.py checks pass.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011meLPKCzVpdZyAUfv5U6mm
2026-09-23 15:56:47 -05:00
jokob-sk 7aca7c17f3 BE: FREEBOX dual stack IP fix #1804 2026-09-23 08:17:23 +10:00
jokob-sk 24301cbdbc BE: FREEBOX dual stack IP fix #1804 2026-09-23 07:52:30 +10:00
jokob-sk a573eeb0e7 BE: FREEBOX dual stack IP fix #1804 2026-09-22 08:43:41 +10:00
jokob-sk d72aea21f5 BE: re-enable GRAPHQL_PORT #1803 2026-09-21 17:30:25 +10:00
jokob-sk 0fc6082c73 BE: IP ordering fixes #1797 2026-09-19 09:48:33 +10:00
Mauricio CamayoandClaude Sonnet 5 cfde00048a DOCKERDISC v2: optional device creation for LAN-visible containers
Maps DOCKERDISC to CurrentScan (scanMac/scanCreatesDevice/scanParentMAC/
scanLastIP) so a container on a macvlan/ipvlan network can opt into
creating or confirming its own device, parented to its Docker host.
Gated by a new DOCKERDISC_CREATE_DEV setting (default off). A container
without its own MAC (bridge/overlay/etc.) never creates a device either
way - the framework's blank-scanMac guard blocks the whole group
regardless of the setting.

Reuses the existing objectPrimaryId/extra column definitions (already
host MAC / container IP) to also feed scanParentMAC/scanLastIP, so every
promoted container is auto-parented to its host with no extra plugin
logic. Two new hidden columns (helpVal1/helpVal2) carry the per-container
scanMac/scanCreatesDevice values.

Tests: 33 -> 35, both DOCKERDISC_CREATE_DEV on/off paths asserted.
Live-verified end to end against a real built image (docker-socket-proxy
+ isolated macvlan/bridge test containers), since IMPORT_ON isn't in any
released NetAlertX image yet.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011meLPKCzVpdZyAUfv5U6mm
2026-09-18 17:14:10 -05:00
jokob-sk 52d1698221 DOCS+BE: skill updates, write_notifications fix #1793 2026-09-18 08:09:22 +10:00