troubadix 25.1.1__py3-none-any.whl → 25.1.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- troubadix/__version__.py +1 -1
- troubadix/plugins/valid_oid.py +49 -15
- {troubadix-25.1.1.dist-info → troubadix-25.1.2.dist-info}/METADATA +1 -1
- {troubadix-25.1.1.dist-info → troubadix-25.1.2.dist-info}/RECORD +7 -7
- {troubadix-25.1.1.dist-info → troubadix-25.1.2.dist-info}/LICENSE +0 -0
- {troubadix-25.1.1.dist-info → troubadix-25.1.2.dist-info}/WHEEL +0 -0
- {troubadix-25.1.1.dist-info → troubadix-25.1.2.dist-info}/entry_points.txt +0 -0
troubadix/__version__.py
CHANGED
troubadix/plugins/valid_oid.py
CHANGED
|
@@ -58,6 +58,7 @@ class CheckValidOID(FileContentPlugin):
|
|
|
58
58
|
|
|
59
59
|
security_template = "Security Advisory"
|
|
60
60
|
family_template = "Local Security Checks"
|
|
61
|
+
windows_family_template = "Windows : Microsoft Bulletins"
|
|
61
62
|
is_using_reserved = "is using an OID that is reserved for"
|
|
62
63
|
invalid_oid = "is using an invalid OID"
|
|
63
64
|
|
|
@@ -81,22 +82,20 @@ class CheckValidOID(FileContentPlugin):
|
|
|
81
82
|
)
|
|
82
83
|
return
|
|
83
84
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
85
|
+
family_pattern = get_special_script_tag_pattern(SpecialScriptTag.FAMILY)
|
|
86
|
+
family_match = family_pattern.search(file_content)
|
|
87
|
+
|
|
88
|
+
if family_match is None or family_match.group("value") is None:
|
|
89
|
+
yield LinterError(
|
|
90
|
+
"VT is missing a script family!",
|
|
91
|
+
file=nasl_file,
|
|
92
|
+
plugin=self.name,
|
|
88
93
|
)
|
|
89
|
-
|
|
90
|
-
if family_match is None or family_match.group("value") is None:
|
|
91
|
-
yield LinterError(
|
|
92
|
-
"VT is missing a script family!",
|
|
93
|
-
file=nasl_file,
|
|
94
|
-
plugin=self.name,
|
|
95
|
-
)
|
|
96
|
-
return
|
|
94
|
+
return
|
|
97
95
|
|
|
96
|
+
# Vendor-specific OIDs
|
|
97
|
+
if "1.3.6.1.4.1.25623.1.1." in oid:
|
|
98
98
|
family = family_match.group("value")
|
|
99
|
-
|
|
100
99
|
vendor_number_match = re.search(
|
|
101
100
|
r"^1\.3\.6\.1\.4\.1\.25623\.1\.1\.([0-9]+)\.", oid
|
|
102
101
|
)
|
|
@@ -324,6 +323,15 @@ class CheckValidOID(FileContentPlugin):
|
|
|
324
323
|
plugin=self.name,
|
|
325
324
|
)
|
|
326
325
|
return
|
|
326
|
+
elif vendor_number == "18":
|
|
327
|
+
if family != f"openSUSE {family_template}":
|
|
328
|
+
yield LinterError(
|
|
329
|
+
f"script_oid() {is_using_reserved} openSUSE "
|
|
330
|
+
f"'{str(oid)}'",
|
|
331
|
+
file=nasl_file,
|
|
332
|
+
plugin=self.name,
|
|
333
|
+
)
|
|
334
|
+
return
|
|
327
335
|
|
|
328
336
|
else:
|
|
329
337
|
yield LinterError(
|
|
@@ -338,8 +346,8 @@ class CheckValidOID(FileContentPlugin):
|
|
|
338
346
|
|
|
339
347
|
# product-specific OIDs
|
|
340
348
|
if "1.3.6.1.4.1.25623.1.2." in oid:
|
|
341
|
-
|
|
342
|
-
name_match =
|
|
349
|
+
name_pattern = get_special_script_tag_pattern(SpecialScriptTag.NAME)
|
|
350
|
+
name_match = name_pattern.search(file_content)
|
|
343
351
|
if not name_match or not name_match.group("value"):
|
|
344
352
|
yield LinterError(
|
|
345
353
|
"VT is missing a script name!",
|
|
@@ -378,6 +386,32 @@ class CheckValidOID(FileContentPlugin):
|
|
|
378
386
|
|
|
379
387
|
return
|
|
380
388
|
|
|
389
|
+
# Fixed OID-scheme for Windows OIDs
|
|
390
|
+
if "1.3.6.1.4.1.25623.1.3." in oid:
|
|
391
|
+
if family_match.group("value") != windows_family_template:
|
|
392
|
+
yield LinterError(
|
|
393
|
+
f"script_oid() {is_using_reserved} 'Windows' ("
|
|
394
|
+
f"{str(oid)})",
|
|
395
|
+
file=nasl_file,
|
|
396
|
+
plugin=self.name,
|
|
397
|
+
)
|
|
398
|
+
return
|
|
399
|
+
|
|
400
|
+
windows_oid_match = re.search(
|
|
401
|
+
r"^1\.3\.6\.1\.4\.1\.25623\.1\.3\.\d+\.\d+\.\d+\.\d+",
|
|
402
|
+
oid,
|
|
403
|
+
)
|
|
404
|
+
if not windows_oid_match:
|
|
405
|
+
yield LinterError(
|
|
406
|
+
f"script_oid() {invalid_oid} '{str(oid)}' "
|
|
407
|
+
"(Windows pattern: 1.3.6.1.4.1.25623.1.3."
|
|
408
|
+
"[product_id].[platform_id].[kb_article_id].[fixed_build_number])",
|
|
409
|
+
file=nasl_file,
|
|
410
|
+
plugin=self.name,
|
|
411
|
+
)
|
|
412
|
+
return
|
|
413
|
+
return
|
|
414
|
+
|
|
381
415
|
oid_digit_match = re.search(
|
|
382
416
|
r"^1\.3\.6\.1\.4\.1\.25623\.1\.0\.([0-9]+)", oid
|
|
383
417
|
)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
troubadix/__init__.py,sha256=K7sIXXDrC7YRb7BvIpdQ6ZfG_QkT0qUH_wAlHROVRfM,716
|
|
2
|
-
troubadix/__version__.py,sha256=
|
|
2
|
+
troubadix/__version__.py,sha256=b9icRZhD9n_klOTCA2Qs3aV1DBh96Z_ep6dI2tY8PBE,103
|
|
3
3
|
troubadix/argparser.py,sha256=YAo8cGJt0k2GMICXrDj3Z124GrM8oRwgNm2Bn3J_gYI,7001
|
|
4
4
|
troubadix/codespell/codespell.additions,sha256=NAYnQF79kdk4YhU_h8fpjAVVkqBm778aPHPPP7FEkZY,504
|
|
5
5
|
troubadix/codespell/codespell.exclude,sha256=W38XK8hoWWgLDCCJ7USj0YPhqzW68UN7va7bGA2n5eg,145449
|
|
@@ -64,7 +64,7 @@ troubadix/plugins/tabs.py,sha256=7zXaTZe4cZoZvrLyqntVfTeNN_W3D8dfQl67QevXxtc,131
|
|
|
64
64
|
troubadix/plugins/todo_tbd.py,sha256=MN5fFwBhPmt3JDQ2Hx20B8yUy1vz7LIZC3rDIOzfW9M,1758
|
|
65
65
|
troubadix/plugins/trailing_spaces_tabs.py,sha256=nMly8ZsmGprxHvwCDclKBDRB0eq6JEkjERYKvtStkY4,1873
|
|
66
66
|
troubadix/plugins/using_display.py,sha256=Hd-eysbXlkQb4M-ywzSd784k3aBSiG_sO6Ou0JdbyJA,4046
|
|
67
|
-
troubadix/plugins/valid_oid.py,sha256=
|
|
67
|
+
troubadix/plugins/valid_oid.py,sha256=uW7dmU2iEEh9_X_GzhalevrL1BK6bwZHn-MiiXLQWwA,17998
|
|
68
68
|
troubadix/plugins/valid_script_tag_names.py,sha256=6uMJsBdV-Zx-k1F2_MWmQPHXNo1u0ifuosbftbg-27E,3447
|
|
69
69
|
troubadix/plugins/variable_assigned_in_if.py,sha256=NNz8iuzyQ4rSM6My4WYC1s5TABQqgs7us15PkDA-VV0,3285
|
|
70
70
|
troubadix/plugins/variable_redefinition_in_foreach.py,sha256=SfaA70TkpD9dsvNbhwJEA3eLAHWvj4YwksN-qeBMowg,2470
|
|
@@ -93,8 +93,8 @@ troubadix/standalone_plugins/last_modification.py,sha256=oYzQq7xV3YzSvi6ZtuHuupX
|
|
|
93
93
|
troubadix/standalone_plugins/no_solution.py,sha256=81r20kP8otRob2NTaCea-sgVRIM6ARvhddFdibsG6Ao,8877
|
|
94
94
|
troubadix/standalone_plugins/version_updated.py,sha256=RlzVuXgFOvcjrRTOhiTYlmzV4vvcn7ntCz0lDTjePMU,4316
|
|
95
95
|
troubadix/troubadix.py,sha256=foA7Loi67cCKieN3ea4s3QOfOWOkgwQVR1H-pNXtXn0,6041
|
|
96
|
-
troubadix-25.1.
|
|
97
|
-
troubadix-25.1.
|
|
98
|
-
troubadix-25.1.
|
|
99
|
-
troubadix-25.1.
|
|
100
|
-
troubadix-25.1.
|
|
96
|
+
troubadix-25.1.2.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
97
|
+
troubadix-25.1.2.dist-info/METADATA,sha256=Erh1zWb-N3T_kyJyytFxjtWVL5HYcr-R6t7854XByJk,4428
|
|
98
|
+
troubadix-25.1.2.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
|
|
99
|
+
troubadix-25.1.2.dist-info/entry_points.txt,sha256=LplOk4nzKrS4B8Jz0SPkQLPlIDesdraCO8Vp_eoycpc,737
|
|
100
|
+
troubadix-25.1.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|