Prechádzať zdrojové kódy

chore(support): silence bandit B104 on net.info ip redaction

  The "0.0.0.0" written into the support bundle is a JSON sentinel that
  scrubs the printer's local IP plus the gateway/peers it sees — not a
  socket bind address. Annotate inline so bandit stops flagging it.
maziggy 2 mesiacov pred
rodič
commit
68c06a76c4
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      backend/app/api/routes/support.py

+ 1 - 1
backend/app/api/routes/support.py

@@ -1190,7 +1190,7 @@ def _redact_raw_push_status(raw: dict) -> dict:
         info_list = net.get("info")
         if isinstance(info_list, list):
             net["info"] = [
-                ({**entry, "ip": "0.0.0.0"} if isinstance(entry, dict) and "ip" in entry else entry)
+                ({**entry, "ip": "0.0.0.0"} if isinstance(entry, dict) and "ip" in entry else entry)  # nosec B104 - redaction sentinel, not a bind address
                 for entry in info_list
             ]