Sfoglia il codice sorgente

chore(tests): silence bandit B104 on redaction-sentinel asserts

  The two "0.0.0.0" comparisons in test_support_helpers verify the
  support-bundle net.info[*].ip redaction sentinel (mirrors the
  support.py:1193 annotation), not a socket bind. Annotate inline.
maziggy 2 mesi fa
parent
commit
ec9e5eff61
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      backend/tests/unit/test_support_helpers.py

+ 2 - 2
backend/tests/unit/test_support_helpers.py

@@ -1166,8 +1166,8 @@ class TestRedactRawPushStatus:
         out = _redact_raw_push_status(raw)
         out = _redact_raw_push_status(raw)
 
 
         # LAN topology must be scrubbed (mirrors the #1429 VP fix).
         # LAN topology must be scrubbed (mirrors the #1429 VP fix).
-        assert out["net"]["info"][0]["ip"] == "0.0.0.0"
-        assert out["net"]["info"][1]["ip"] == "0.0.0.0"
+        assert out["net"]["info"][0]["ip"] == "0.0.0.0"  # nosec B104 - redaction sentinel, not a bind address
+        assert out["net"]["info"][1]["ip"] == "0.0.0.0"  # nosec B104 - redaction sentinel, not a bind address
         # Non-IP siblings inside the entry survive so the shape stays
         # Non-IP siblings inside the entry survive so the shape stays
         # diagnosable (interface count, mask presence, etc.).
         # diagnosable (interface count, mask presence, etc.).
         assert out["net"]["info"][0]["mask"] == "255.255.255.0"
         assert out["net"]["info"][0]["mask"] == "255.255.255.0"