From bc2a89eb11325b57b7dd675c75bc26e63c5dec52 Mon Sep 17 00:00:00 2001 From: dreizehnutters Date: Fri, 5 Jul 2024 16:49:16 +0200 Subject: [PATCH] fix for https://github.com/jtesta/ssh-audit/issues/280 (#281) * fix for https://github.com/jtesta/ssh-audit/issues/280 * changed json format to min. the damage for a change --- src/ssh_audit/ssh_audit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ssh_audit/ssh_audit.py b/src/ssh_audit/ssh_audit.py index 6299472..2c52576 100755 --- a/src/ssh_audit/ssh_audit.py +++ b/src/ssh_audit/ssh_audit.py @@ -735,7 +735,7 @@ def evaluate_policy(out: OutputBuffer, aconf: AuditConf, banner: Optional['Banne passed, error_struct, error_str = aconf.policy.evaluate(banner, kex) if aconf.json: - json_struct = {'host': aconf.host, 'policy': aconf.policy.get_name_and_version(), 'passed': passed, 'errors': error_struct} + json_struct = {'host': aconf.host, 'port': aconf.port, 'policy': aconf.policy.get_name_and_version(), 'passed': passed, 'errors': error_struct} out.info(json.dumps(json_struct, indent=4 if aconf.json_print_indent else None, sort_keys=True)) else: spacing = ''