From 05c7d899a848e0f5e49c8bfe2d4f3076c94b6fb4 Mon Sep 17 00:00:00 2001 From: Eric Brown Date: Fri, 4 Feb 2022 05:23:30 -0800 Subject: [PATCH] Add functional test of snmp_security_check (#791) This change adds a new functional test of the new snmp plugin snmp_security_check. Fixes: #790 Signed-off-by: Eric Brown --- tests/functional/test_functional.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/functional/test_functional.py b/tests/functional/test_functional.py index ab2ada95e..5fa51217f 100644 --- a/tests/functional/test_functional.py +++ b/tests/functional/test_functional.py @@ -824,3 +824,11 @@ def test_no_blacklist_pycryptodome(self): "CONFIDENCE": {"UNDEFINED": 0, "LOW": 0, "MEDIUM": 0, "HIGH": 0}, } self.check_example("pycryptodome.py", expect) + + def test_snmp_security_check(self): + """Test insecure and weak crypto usage of SNMP.""" + expect = { + "SEVERITY": {"UNDEFINED": 0, "LOW": 0, "MEDIUM": 3, "HIGH": 0}, + "CONFIDENCE": {"UNDEFINED": 0, "LOW": 0, "MEDIUM": 0, "HIGH": 3}, + } + self.check_example("snmp.py", expect)