fix: what bandit and the remaining lint rules found

- get_route_to: "0.0.0.0" and "::" are the unspecified next hop of an
  on-link route as the host reports it, not an address anything binds to
  (nosec B104).
This commit is contained in:
Christian Manivong committed 2026-10-23 08:47:56 +02:00
1 parent 3b87a9ad77
commit 989e826b34
1 file changed
+2 -1
+2 -1
View File
@@ -464,7 +464,8 @@ class WindowsDriver(OSDriver):
if protocol and proto != protocol.lower():
continue
next_hop = r.get("next_hop") or ""
if next_hop in ("0.0.0.0", "::"):
# The unspecified next hop of an on-link route, read from the host; nothing binds.
if next_hop in ("0.0.0.0", "::"): # nosec B104
next_hop = ""
routes.setdefault(network, []).append(
{