Skip to content

Real-time network monitor + outbound firewall — see & block every connection. Privacy-first, local-first, Rust fleet agent, SIEM exports, 8 languages. / Moniteur réseau temps réel + pare-feu sortant, agent de flotte Rust, exports SIEM. 100 % local.

askmode: pass parser-normalized CIDR to iptables argv (CodeQL taint break)

MoneyLisaf660da1bd3aa
diff --git a/backend/detection/askmode.py b/backend/detection/askmode.py
index fd1c906..55374ef 100644
--- a/backend/detection/askmode.py
+++ b/backend/detection/askmode.py
@@ -137,10 +137,14 @@ class AskMode:
self._exempt = []
for ip in (exempt_ips or [])[:64]:
try:
- ipaddress.ip_network(str(ip), strict=False)
+ # EN: store the PARSER-PRODUCED form — the argv value is a
+ # normalized CIDR literal, not the raw input string.
+ # FR: on stocke la forme NORMALISÉE par le parseur — la
+ # valeur argv est un littéral CIDR, pas l'entrée brute.
+ self._exempt.append(
+ str(ipaddress.ip_network(str(ip), strict=False)))
except ValueError:
continue
- self._exempt.append(str(ip))
import subprocess
from .nfqueue import NfqSocket # noqa: PLC0415
try: