From e318787a5c386b886bc76a95ea2146bf3fa06641 Mon Sep 17 00:00:00 2001
From: Joe Testa <jtesta@positronsecurity.com>
Date: Thu, 5 Dec 2024 10:06:58 -0500
Subject: [PATCH] Batch mode no longer automatically enables verbose mode.

---
 README.md                  | 1 +
 src/ssh_audit/ssh_audit.py | 1 -
 test/test_auditconf.py     | 2 +-
 3 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md
index 60e21aa..d4972ea 100644
--- a/README.md
+++ b/README.md
@@ -220,6 +220,7 @@ For convenience, a web front-end on top of the command-line tool is available at
  - Added warning to all key exchanges that do not include protections against quantum attacks due to the Harvest Now, Decrypt Later strategy (see https://en.wikipedia.org/wiki/Harvest_now,_decrypt_later).
  - Migrated from deprecated `getopt` module to `argparse`; partial credit [oam7575](https://github.com/oam7575).
  - When running against multiple hosts, now prints each target host regardless of output level.
+ - Batch mode (`-b`) no longer automatically enables verbose mode, due to sometimes confusing results; users can still explicitly enable verbose mode using the `-v` flag.
 
 ### v3.3.0 (2024-10-15)
  - Added Python 3.13 support.
diff --git a/src/ssh_audit/ssh_audit.py b/src/ssh_audit/ssh_audit.py
index 421cc6a..cf2d5aa 100755
--- a/src/ssh_audit/ssh_audit.py
+++ b/src/ssh_audit/ssh_audit.py
@@ -842,7 +842,6 @@ def process_commandline(out: OutputBuffer, args: List[str]) -> 'AuditConf':  # p
 
         if argument.batch is True:
             aconf.batch = True
-            aconf.verbose = True
 
         # If one -j was given, turn on JSON output.  If -jj was given, enable indentation.
         aconf.json = argument.json > 0
diff --git a/test/test_auditconf.py b/test/test_auditconf.py
index 5b6aeaa..1f389b9 100644
--- a/test/test_auditconf.py
+++ b/test/test_auditconf.py
@@ -162,7 +162,7 @@ class TestAuditConf:
         conf = c('-64 localhost')
         self._test_conf(conf, host='localhost', ipv4=True, ipv6=True, ipvo=(6, 4))
         conf = c('-b localhost')
-        self._test_conf(conf, host='localhost', batch=True, verbose=True)
+        self._test_conf(conf, host='localhost', batch=True)
         conf = c('-n localhost')
         self._test_conf(conf, host='localhost', colors=False)
         conf = c('-v localhost')