From 8d6747c5be80de786c89e8608cca27654daddc85 Mon Sep 17 00:00:00 2001 From: Hitoshi Irino Date: Tue, 10 Nov 2026 06:29:32 +0900 Subject: [PATCH] Potential fix for code scanning alert no. 13: Binding a socket to all network interfaces Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- tools/softflowd_test_collector.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/softflowd_test_collector.py b/tools/softflowd_test_collector.py index 9e05597..419369c 100755 --- a/tools/softflowd_test_collector.py +++ b/tools/softflowd_test_collector.py @@ -1255,7 +1255,7 @@ def run_nfdump_capture(pcap_path: str, daemon_bin: str, version: int) -> str: # A free port, not the default 2055: some distributions (Debian, Ubuntu) # start their own nfcapd on 2055 when the nfdump package is installed. with socket.socket(socket.AF_INET, socket.SOCK_DGRAM) as probe: - probe.bind(("0.0.0.0", 0)) + probe.bind(("127.0.0.1", 0)) port = probe.getsockname()[1] # Outside out_dir, which nfdump -R scans for capture files. nfcapd_log = os.path.join(SUITE_TMP_DIR, f"nfcapd-{port}.log")