From ed260a5f398c543fd4d089552650f3540bcd3900 Mon Sep 17 00:00:00 2001 From: elhoim Date: Mon, 31 Aug 2026 00:08:24 +0000 Subject: [PATCH] Redact config field with placeholder instead of deleting it redact_config_keys() dropped any dict key named 'config' entirely. This is needed because some modules (e.g. passivetotal) echo API credentials back in a 'config' field, but it meant any module returning a legitimate result field named 'config' would have it silently vanish with no trace. Replace the value with the string '' instead of deleting the key, so the credential data is still hidden but the data loss is visible in the output. --- bin/cli.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bin/cli.py b/bin/cli.py index 92267b1..b64b728 100644 --- a/bin/cli.py +++ b/bin/cli.py @@ -65,9 +65,8 @@ def is_empty_module_response(response: Any) -> bool: def redact_config_keys(value: Any) -> Any: if isinstance(value, dict): return { - k: redact_config_keys(v) + k: ("" if k == "config" else redact_config_keys(v)) for k, v in value.items() - if k != "config" } if isinstance(value, list): return [redact_config_keys(item) for item in value]