From de4b9f1fcbc403d08c7738da7882afaeb4eace05 Mon Sep 17 00:00:00 2001 From: Ryan Jarvis Date: Thu, 21 Nov 2024 13:35:31 -0800 Subject: [PATCH] Add missing metric to Screen formatted report --- bandit/formatters/screen.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bandit/formatters/screen.py b/bandit/formatters/screen.py index 906e86b73..1b090148f 100644 --- a/bandit/formatters/screen.py +++ b/bandit/formatters/screen.py @@ -222,7 +222,11 @@ def report(manager, fileobj, sev_level, conf_level, lines=-1): "\tTotal lines skipped (#nosec): %i" % (manager.metrics.data["_totals"]["nosec"]) ) - + bits.append( + "\tTotal potential issues skipped due to specifically being " + "disabled (e.g., #nosec BXXX): %i" + % (manager.metrics.data["_totals"]["skipped_tests"]) + ) bits.append(get_metrics(manager)) skipped = manager.get_skipped() bits.append(header("Files skipped (%i):", len(skipped)))