mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-10-28 12:01:13 -04:00
Address review: docstrings for execute_plugin and new WIFICANARY tests
execute_plugin's leading description comment becomes a docstring, as it was touched by this PR; the two new check_trusted_aps tests get docstrings instead of leading comments. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PzCQWQVz9b2UzqLiGp2mPM
This commit is contained in:
1 parent
ca4e92c32d
commit
c263e939fd
2 files changed
+8
-6
No files matched your search
+2
-1
@@ -386,8 +386,9 @@ def run_plugin(command, set_RUN_TIMEOUT, plugin):
|
||||
|
||||
|
||||
# -------------------------------------------------------------------------------
|
||||
# Executes the plugin command specified in the setting with the function specified as CMD
|
||||
def execute_plugin(db, all_plugins, plugin):
|
||||
"""Run the plugin's CMD setting (script or SQL), then load its result files -
|
||||
including ones received from sync nodes - into the plugin tables."""
|
||||
sql = db.sql
|
||||
|
||||
# ------- necessary settings check --------
|
||||
|
||||
@@ -408,9 +408,9 @@ def test_two_trusted_bssids_same_ssid_no_false_positive():
|
||||
|
||||
|
||||
def test_out_of_range_extender_does_not_make_clone_absent_baseline():
|
||||
# Main AP + extender, each its own entry; only the main AP is in range.
|
||||
# An open clone is a plain evil twin - the protected network is up, so
|
||||
# the out-of-range extender must not also raise absent_baseline_clone.
|
||||
"""With a main AP + extender trusted and only the main AP in range, an open
|
||||
clone is a plain evil_twin - the out-of-range extender must not also raise
|
||||
absent_baseline_clone, since the protected network is up."""
|
||||
trusted = [
|
||||
{'ssid': 'HomeWiFi', 'bssid': 'aa:bb:cc:11:22:33', 'security_set': {'wpa2', 'wpa3'}},
|
||||
{'ssid': 'HomeWiFi', 'bssid': '44:55:66:aa:bb:cc', 'security_set': {'wpa2', 'wpa3'}},
|
||||
@@ -424,8 +424,9 @@ def test_out_of_range_extender_does_not_make_clone_absent_baseline():
|
||||
|
||||
|
||||
def test_clone_with_every_trusted_radio_absent_is_absent_baseline():
|
||||
# Same pair, neither radio in range - now the clone really is standing
|
||||
# in for a missing baseline.
|
||||
"""With neither trusted radio of the pair in range, a weaker clone is
|
||||
flagged as absent_baseline_clone - it really is standing in for a missing
|
||||
baseline."""
|
||||
trusted = [
|
||||
{'ssid': 'HomeWiFi', 'bssid': 'aa:bb:cc:11:22:33', 'security_set': {'wpa2', 'wpa3'}},
|
||||
{'ssid': 'HomeWiFi', 'bssid': '44:55:66:aa:bb:cc', 'security_set': {'wpa2', 'wpa3'}},
|
||||
|
||||
Reference in new issue
Block a user