diff --git a/tests/plugins/test_valid_oid.py b/tests/plugins/test_valid_oid.py index 966743e5..c654c344 100644 --- a/tests/plugins/test_valid_oid.py +++ b/tests/plugins/test_valid_oid.py @@ -807,7 +807,7 @@ def test_script_family__product_microsoft_ok(self): content = ( ' script_oid("1.3.6.1.4.1.25623.1.3.11571.0.5019966.494846484649555554514651545348");' "\n" - ' script_family("Windows : Microsoft Bulletins");\n' + ' script_family("Windows Local Security Checks");\n' ) fake_context = self.create_file_plugin_context( nasl_file=path, file_content=content @@ -823,7 +823,7 @@ def test_script_family__product_microsoft_not_ok(self): content = ( ' script_oid("1.3.6.1.4.1.25623.1.3.11571.0.5019966.494846484649555554514651545348");' "\n" - ' script_family("Windows : Microsoft");\n' + ' script_family("Windows : Microsoft Bulletin ");\n' ) fake_context = self.create_file_plugin_context( nasl_file=path, file_content=content @@ -845,7 +845,7 @@ def test_oid_microsoft_ok(self): content = ( ' script_oid("1.3.6.1.4.1.25623.1.3.11571.0.5019966.494846484649555554514651545348");' "\n" - ' script_family("Windows : Microsoft Bulletins");\n' + ' script_family("Windows Local Security Checks");\n' ) fake_context = self.create_file_plugin_context( nasl_file=path, file_content=content @@ -861,7 +861,7 @@ def test_oid_microsoft_not_ok(self): content = ( ' script_oid("1.3.6.1.4.1.25623.1.3.11571.0.494846484649555554514651545348");' "\n" - ' script_family("Windows : Microsoft Bulletins");\n' + ' script_family("Windows Local Security Checks");\n' ) fake_context = self.create_file_plugin_context( nasl_file=path, file_content=content diff --git a/troubadix/plugins/script_family.py b/troubadix/plugins/script_family.py index 70bce26a..b6f74e3d 100644 --- a/troubadix/plugins/script_family.py +++ b/troubadix/plugins/script_family.py @@ -88,6 +88,7 @@ "Web application abuses", "Windows", "Windows : Microsoft Bulletins", + "Windows Local Security Checks", ] diff --git a/troubadix/plugins/valid_oid.py b/troubadix/plugins/valid_oid.py index 6a9b36fb..fc313c23 100644 --- a/troubadix/plugins/valid_oid.py +++ b/troubadix/plugins/valid_oid.py @@ -58,7 +58,6 @@ def check_content( security_template = "Security Advisory" family_template = "Local Security Checks" - windows_family_template = "Windows : Microsoft Bulletins" is_using_reserved = "is using an OID that is reserved for" invalid_oid = "is using an invalid OID" @@ -388,7 +387,7 @@ def check_content( # Fixed OID-scheme for Windows OIDs if "1.3.6.1.4.1.25623.1.3." in oid: - if family_match.group("value") != windows_family_template: + if family_match.group("value") != f"Windows {family_template}": yield LinterError( f"script_oid() {is_using_reserved} 'Windows' (" f"{str(oid)})",