From db5104ecb87909afec849258c68e1d637abdb934 Mon Sep 17 00:00:00 2001 From: Joe Testa Date: Thu, 14 Mar 2024 18:13:53 -0400 Subject: [PATCH] Built-in policy change logs no longer printed within quotes. --- src/ssh_audit/policy.py | 6 ++++-- src/ssh_audit/ssh_audit.py | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/ssh_audit/policy.py b/src/ssh_audit/policy.py index 1aec08d..8e73360 100644 --- a/src/ssh_audit/policy.py +++ b/src/ssh_audit/policy.py @@ -444,9 +444,11 @@ macs = %s client_policy_descriptions = [] for policy_name, policy in BUILTIN_POLICIES.items(): - policy_description = policy_name + policy_description = "" if verbose: - policy_description = "{:s}: {:s}".format(policy_name, policy['changelog']) + policy_description = "\"{:s}\": {:s}".format(policy_name, policy['changelog']) + else: + policy_description = "\"{:s}\"".format(policy_name) if policy['server_policy']: server_policy_descriptions.append(policy_description) diff --git a/src/ssh_audit/ssh_audit.py b/src/ssh_audit/ssh_audit.py index fbaea0c..ac50287 100755 --- a/src/ssh_audit/ssh_audit.py +++ b/src/ssh_audit/ssh_audit.py @@ -802,11 +802,11 @@ def list_policies(out: OutputBuffer, verbose: bool) -> None: if len(server_policy_names) > 0: out.head('\nServer policies:\n') - out.info(" * \"%s\"" % "\"\n * \"".join(server_policy_names)) + out.info(" * %s" % "\n * ".join(server_policy_names)) if len(client_policy_names) > 0: out.head('\nClient policies:\n') - out.info(" * \"%s\"" % "\"\n * \"".join(client_policy_names)) + out.info(" * %s" % "\n * ".join(client_policy_names)) out.sep() if len(server_policy_names) == 0 and len(client_policy_names) == 0: