From ecdf577cfcb1f3bb8a15af96fa1677d58e6eee38 Mon Sep 17 00:00:00 2001 From: maziggy Date: Tue, 9 Jun 2026 13:32:15 +0200 Subject: [PATCH] test(security-fixtures): nosec B104/B108 on new 0.2.4.6 test code Two adversarial-input fixtures added on the 0.2.4.6 branch were missing the # nosec annotation that 32b3a93e established for the same pattern. New TestNotArmedDiagnosticLogging test for the #1429 defensive diagnostic uses bind_address="0.0.0.0"; new test_queue_start_user_attribution.py (#1670 fix) uses a /tmp path in a PrintArchive fixture. Same annotation-only convention as the test_virtual_printer.py sites. --- backend/tests/integration/test_queue_start_user_attribution.py | 2 +- backend/tests/unit/test_vp_mqtt_bridge.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/tests/integration/test_queue_start_user_attribution.py b/backend/tests/integration/test_queue_start_user_attribution.py index 4d0204ac1..29e41254d 100644 --- a/backend/tests/integration/test_queue_start_user_attribution.py +++ b/backend/tests/integration/test_queue_start_user_attribution.py @@ -78,7 +78,7 @@ async def queue_item(db_session): archive = PrintArchive( filename="Plate_1.gcode.3mf", print_name="Plate 1", - file_path="/tmp/queue1670_plate.3mf", + file_path="/tmp/queue1670_plate.3mf", # nosec B108 file_size=1024, content_hash="queue1670hash", status="completed", diff --git a/backend/tests/unit/test_vp_mqtt_bridge.py b/backend/tests/unit/test_vp_mqtt_bridge.py index 370c607e4..4efd298bb 100644 --- a/backend/tests/unit/test_vp_mqtt_bridge.py +++ b/backend/tests/unit/test_vp_mqtt_bridge.py @@ -1277,7 +1277,7 @@ class TestNotArmedDiagnosticLogging: assert "no ip_address" in not_armed[0].getMessage() def test_no_matching_host_interface_logs_specific_reason(self, caplog): - server = _make_server(bind_address="0.0.0.0") + server = _make_server(bind_address="0.0.0.0") # nosec B104 bridge = _make_bridge(server) with ( patch(