troubadix 25.12.4__tar.gz → 26.2.0__tar.gz

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.
Files changed (243) hide show
  1. {troubadix-25.12.4 → troubadix-26.2.0}/PKG-INFO +1 -1
  2. {troubadix-25.12.4 → troubadix-26.2.0}/pyproject.toml +2 -2
  3. {troubadix-25.12.4 → troubadix-26.2.0}/tests/helper/test_date_format.py +0 -1
  4. {troubadix-25.12.4 → troubadix-26.2.0}/tests/helper/test_if_block_parser.py +5 -15
  5. {troubadix-25.12.4 → troubadix-26.2.0}/tests/helper/test_linguistic_exception_handler.py +6 -18
  6. {troubadix-25.12.4 → troubadix-26.2.0}/tests/helper/test_patterns.py +2 -6
  7. {troubadix-25.12.4 → troubadix-26.2.0}/tests/helper/test_remove_comments.py +7 -13
  8. {troubadix-25.12.4 → troubadix-26.2.0}/tests/helper/test_text_utils.py +1 -3
  9. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_badwords.py +2 -6
  10. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_copyright_text.py +5 -14
  11. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_copyright_year.py +12 -35
  12. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_creation_date.py +5 -16
  13. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_cve_format.py +12 -32
  14. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_cvss_format.py +7 -22
  15. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_dependencies.py +2 -4
  16. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_dependency_category_order.py +4 -11
  17. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_deprecated_dependency.py +5 -14
  18. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_deprecated_functions.py +6 -16
  19. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_double_end_points.py +3 -9
  20. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_duplicate_oid.py +4 -15
  21. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_duplicated_script_tags.py +8 -22
  22. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_encoding.py +1 -3
  23. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_forking_nasl_functions.py +3 -9
  24. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_get_kb_on_services.py +2 -6
  25. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_grammar.py +18 -54
  26. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_http_links_in_tags.py +3 -9
  27. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_if_statement_syntax.py +8 -24
  28. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_illegal_characters.py +3 -9
  29. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_log_messages.py +5 -15
  30. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_misplaced_compare_in_if.py +25 -75
  31. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_missing_desc_exit.py +3 -9
  32. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_missing_tag_solution.py +3 -9
  33. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_newlines.py +9 -31
  34. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_overlong_description_lines.py +5 -15
  35. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_overlong_script_tags.py +6 -18
  36. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_prod_svc_detect_in_vulnvt.py +3 -9
  37. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_reporting_consistency.py +5 -15
  38. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_script_add_preference_id.py +3 -9
  39. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_script_add_preference_type.py +7 -21
  40. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_script_calls_empty_values.py +2 -6
  41. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_script_calls_recommended.py +3 -9
  42. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_script_category.py +3 -9
  43. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_script_copyright.py +8 -21
  44. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_script_family.py +6 -18
  45. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_script_tag_form.py +4 -12
  46. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_script_tag_whitespaces.py +15 -45
  47. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_script_tags_mandatory.py +4 -12
  48. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_script_version_and_last_modification_tags.py +14 -40
  49. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_script_xref_form.py +6 -18
  50. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_script_xref_url.py +11 -32
  51. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_security_messages.py +9 -24
  52. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_set_get_kb_calls.py +2 -6
  53. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_severity_date.py +4 -13
  54. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_severity_format.py +8 -25
  55. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_severity_origin.py +6 -19
  56. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_solution_text.py +7 -21
  57. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_solution_type.py +4 -12
  58. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_spaces_before_dots.py +3 -10
  59. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_tabs.py +2 -6
  60. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_todo_tbd.py +6 -18
  61. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_trailing_spaces_tabs.py +2 -6
  62. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_using_display.py +7 -22
  63. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_valid_oid.py +137 -136
  64. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_valid_script_tag_names.py +4 -12
  65. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_variable_redefinition_in_foreach.py +2 -6
  66. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_vt_file_permissions.py +2 -6
  67. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_vt_placement.py +1 -2
  68. {troubadix-25.12.4 → troubadix-26.2.0}/tests/standalone_plugins/changed_packages/markers/test_added_udeb.py +1 -3
  69. {troubadix-25.12.4 → troubadix-26.2.0}/tests/standalone_plugins/changed_packages/test_changed_packages.py +3 -9
  70. {troubadix-25.12.4 → troubadix-26.2.0}/tests/standalone_plugins/changed_packages/test_package.py +41 -0
  71. {troubadix-25.12.4 → troubadix-26.2.0}/tests/standalone_plugins/test_changed_creation_date.py +15 -54
  72. {troubadix-25.12.4 → troubadix-26.2.0}/tests/standalone_plugins/test_changed_oid.py +2 -6
  73. {troubadix-25.12.4 → troubadix-26.2.0}/tests/standalone_plugins/test_dependency_graph.py +0 -1
  74. {troubadix-25.12.4 → troubadix-26.2.0}/tests/standalone_plugins/test_deprecate_vts.py +2 -5
  75. {troubadix-25.12.4 → troubadix-26.2.0}/tests/standalone_plugins/test_file_extensions.py +1 -3
  76. {troubadix-25.12.4 → troubadix-26.2.0}/tests/standalone_plugins/test_last_modification.py +1 -2
  77. {troubadix-25.12.4 → troubadix-26.2.0}/tests/standalone_plugins/test_version_updated.py +4 -20
  78. {troubadix-25.12.4 → troubadix-26.2.0}/tests/test_argparser.py +2 -6
  79. {troubadix-25.12.4 → troubadix-26.2.0}/tests/test_helper.py +6 -14
  80. {troubadix-25.12.4 → troubadix-26.2.0}/tests/test_reporter.py +2 -6
  81. {troubadix-25.12.4 → troubadix-26.2.0}/tests/test_results.py +6 -22
  82. {troubadix-25.12.4 → troubadix-26.2.0}/tests/test_runner.py +23 -124
  83. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/__version__.py +1 -1
  84. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/argparser.py +4 -14
  85. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/helper/date_format.py +3 -8
  86. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/helper/helper.py +1 -3
  87. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/helper/if_block_parser.py +14 -37
  88. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/helper/linguistic_exception_handler.py +6 -18
  89. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/helper/patterns.py +7 -19
  90. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/helper/remove_comments.py +1 -4
  91. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/helper/text_utils.py +1 -3
  92. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugin.py +3 -9
  93. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/__init__.py +6 -20
  94. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/badwords.py +3 -9
  95. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/copyright_text.py +2 -5
  96. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/copyright_year.py +4 -12
  97. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/creation_date.py +3 -9
  98. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/cvss_format.py +1 -3
  99. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/dependencies.py +2 -5
  100. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/dependency_category_order.py +7 -20
  101. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/deprecated_dependency.py +6 -16
  102. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/deprecated_functions.py +2 -4
  103. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/double_end_points.py +2 -7
  104. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/duplicate_oid.py +1 -3
  105. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/duplicated_script_tags.py +1 -2
  106. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/forking_nasl_functions.py +1 -4
  107. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/get_kb_on_services.py +2 -4
  108. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/grammar.py +8 -20
  109. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/http_links_in_tags.py +3 -6
  110. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/illegal_characters.py +6 -15
  111. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/log_messages.py +1 -2
  112. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/malformed_dependencies.py +2 -6
  113. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/missing_desc_exit.py +1 -3
  114. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/multiple_re_parameters.py +2 -7
  115. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/newlines.py +1 -2
  116. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/overlong_description_lines.py +2 -6
  117. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/overlong_script_tags.py +9 -14
  118. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/prod_svc_detect_in_vulnvt.py +1 -4
  119. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/qod.py +0 -1
  120. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/script_add_preference_id.py +3 -10
  121. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/script_add_preference_type.py +2 -7
  122. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/script_calls_empty_values.py +3 -3
  123. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/script_calls_recommended.py +5 -8
  124. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/script_copyright.py +1 -3
  125. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/script_family.py +1 -2
  126. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/script_tag_form.py +1 -3
  127. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/script_tag_whitespaces.py +5 -10
  128. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/script_tags_mandatory.py +2 -5
  129. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/script_version_and_last_modification_tags.py +6 -17
  130. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/script_xref_form.py +1 -3
  131. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/script_xref_url.py +3 -7
  132. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/security_messages.py +8 -21
  133. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/severity_date.py +3 -10
  134. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/severity_format.py +1 -4
  135. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/severity_origin.py +1 -4
  136. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/solution_text.py +6 -10
  137. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/solution_type.py +1 -2
  138. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/spaces_before_dots.py +2 -9
  139. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/spaces_in_filename.py +1 -2
  140. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/spelling.py +5 -14
  141. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/trailing_spaces_tabs.py +2 -5
  142. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/using_display.py +2 -6
  143. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/valid_oid.py +51 -60
  144. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/valid_script_tag_names.py +2 -5
  145. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/variable_assigned_in_if.py +2 -7
  146. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/variable_redefinition_in_foreach.py +2 -6
  147. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/vt_placement.py +2 -8
  148. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/reporter.py +7 -21
  149. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/results.py +2 -8
  150. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/runner.py +5 -14
  151. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/standalone_plugins/allowed_rev_diff.py +8 -25
  152. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/standalone_plugins/changed_creation_date.py +4 -14
  153. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/standalone_plugins/changed_cves.py +4 -12
  154. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/standalone_plugins/changed_oid.py +3 -8
  155. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/standalone_plugins/changed_packages/changed_packages.py +3 -8
  156. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/standalone_plugins/changed_packages/marker/changed_update.py +1 -3
  157. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/standalone_plugins/changed_packages/marker/dropped_architecture.py +1 -3
  158. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/standalone_plugins/changed_packages/package.py +13 -7
  159. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/standalone_plugins/dependency_graph/checks.py +5 -15
  160. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/standalone_plugins/dependency_graph/dependency_graph.py +5 -13
  161. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/standalone_plugins/deprecate_vts.py +3 -9
  162. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/standalone_plugins/file_extensions.py +3 -10
  163. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/standalone_plugins/last_modification.py +3 -9
  164. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/standalone_plugins/no_solution.py +12 -34
  165. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/standalone_plugins/util.py +0 -2
  166. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/standalone_plugins/version_updated.py +5 -14
  167. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/troubadix.py +1 -4
  168. {troubadix-25.12.4 → troubadix-26.2.0}/LICENSE +0 -0
  169. {troubadix-25.12.4 → troubadix-26.2.0}/README.md +0 -0
  170. {troubadix-25.12.4 → troubadix-26.2.0}/tests/__init__.py +0 -0
  171. {troubadix-25.12.4 → troubadix-26.2.0}/tests/helper/__init__.py +0 -0
  172. {troubadix-25.12.4 → troubadix-26.2.0}/tests/manual_tests/comment_removal_diff.py +0 -0
  173. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/__init__.py +0 -0
  174. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/fail.nasl +0 -0
  175. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/fail2.nasl +0 -0
  176. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test.nasl +0 -0
  177. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_files/fail_bad_new_line.nasl +0 -0
  178. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_files/fail_badwords.nasl +0 -0
  179. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_files/fail_name_and_copyright_newline.nasl +0 -0
  180. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_files/fail_name_newline.nasl +0 -0
  181. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_files/fail_permissions.nasl +0 -0
  182. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_files/fail_spelling.nasl +0 -0
  183. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_files/nasl/21.04/fail.nasl +0 -0
  184. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_files/nasl/21.04/fail_badwords.nasl +0 -0
  185. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_files/nasl/21.04/fail_name_and_copyright_newline.nasl +0 -0
  186. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_files/nasl/21.04/fail_name_newline.nasl +0 -0
  187. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_files/nasl/21.04/fail_solution_template.nasl +0 -0
  188. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_files/nasl/21.04/runner/fail.nasl +0 -0
  189. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_files/nasl/21.04/runner/fail2.nasl +0 -0
  190. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_files/nasl/21.04/runner/test.nasl +0 -0
  191. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_files/nasl/21.04/runner/test_valid_oid.nasl +0 -0
  192. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_files/nasl/21.04/test.inc +0 -0
  193. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_files/nasl/21.04/test.nasl +0 -0
  194. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_files/nasl/warning.nasl +0 -0
  195. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_files/ok_permissions.nasl +0 -0
  196. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_files/test_oid.nasl +0 -0
  197. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_malformed_dependencies.py +0 -0
  198. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_multiple_re_parameters.py +0 -0
  199. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_qod.py +0 -0
  200. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_spaces_in_filename.py +0 -0
  201. {troubadix-25.12.4 → troubadix-26.2.0}/tests/plugins/test_spelling.py +0 -0
  202. {troubadix-25.12.4 → troubadix-26.2.0}/tests/standalone_plugins/__init__.py +0 -0
  203. {troubadix-25.12.4 → troubadix-26.2.0}/tests/standalone_plugins/changed_packages/__init__.py +0 -0
  204. {troubadix-25.12.4 → troubadix-26.2.0}/tests/standalone_plugins/changed_packages/markers/__init__.py +0 -0
  205. {troubadix-25.12.4 → troubadix-26.2.0}/tests/standalone_plugins/changed_packages/markers/test_added_epoch.py +0 -0
  206. {troubadix-25.12.4 → troubadix-26.2.0}/tests/standalone_plugins/changed_packages/markers/test_added_release.py +0 -0
  207. {troubadix-25.12.4 → troubadix-26.2.0}/tests/standalone_plugins/changed_packages/markers/test_changed_update.py +0 -0
  208. {troubadix-25.12.4 → troubadix-26.2.0}/tests/standalone_plugins/changed_packages/markers/test_dropped_architecture.py +0 -0
  209. {troubadix-25.12.4 → troubadix-26.2.0}/tests/standalone_plugins/nasl/21.04/21_script.nasl +0 -0
  210. {troubadix-25.12.4 → troubadix-26.2.0}/tests/standalone_plugins/nasl/22.04/22_script.nasl +0 -0
  211. {troubadix-25.12.4 → troubadix-26.2.0}/tests/standalone_plugins/nasl/common/bar.nasl +0 -0
  212. {troubadix-25.12.4 → troubadix-26.2.0}/tests/standalone_plugins/nasl/common/foo.nasl +0 -0
  213. {troubadix-25.12.4 → troubadix-26.2.0}/tests/standalone_plugins/nasl/common/foobar.nasl +0 -0
  214. {troubadix-25.12.4 → troubadix-26.2.0}/tests/standalone_plugins/nasl/common/gsf/enterprise_script.nasl +0 -0
  215. {troubadix-25.12.4 → troubadix-26.2.0}/tests/standalone_plugins/test_changed_cves.py +0 -0
  216. {troubadix-25.12.4 → troubadix-26.2.0}/tests/standalone_plugins/test_no_solution.py +0 -0
  217. {troubadix-25.12.4 → troubadix-26.2.0}/tests/test_naslinter.py +0 -0
  218. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/__init__.py +0 -0
  219. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/codespell/codespell.additions +0 -0
  220. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/codespell/codespell.exclude +0 -0
  221. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/codespell/codespell.ignore +0 -0
  222. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/helper/__init__.py +0 -0
  223. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/cve_format.py +0 -0
  224. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/encoding.py +0 -0
  225. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/if_statement_syntax.py +0 -0
  226. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/misplaced_compare_in_if.py +0 -0
  227. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/missing_tag_solution.py +0 -0
  228. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/reporting_consistency.py +0 -0
  229. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/script_category.py +0 -0
  230. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/set_get_kb_calls.py +0 -0
  231. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/tabs.py +0 -0
  232. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/todo_tbd.py +0 -0
  233. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/plugins/vt_file_permissions.py +0 -0
  234. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/standalone_plugins/__init__.py +0 -0
  235. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/standalone_plugins/changed_packages/marker/__init__.py +0 -0
  236. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/standalone_plugins/changed_packages/marker/added_epoch.py +0 -0
  237. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/standalone_plugins/changed_packages/marker/added_release.py +0 -0
  238. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/standalone_plugins/changed_packages/marker/added_udeb.py +0 -0
  239. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/standalone_plugins/changed_packages/marker/marker.py +0 -0
  240. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/standalone_plugins/common.py +0 -0
  241. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/standalone_plugins/dependency_graph/__init__.py +0 -0
  242. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/standalone_plugins/dependency_graph/cli.py +0 -0
  243. {troubadix-25.12.4 → troubadix-26.2.0}/troubadix/standalone_plugins/dependency_graph/models.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: troubadix
3
- Version: 25.12.4
3
+ Version: 26.2.0
4
4
  Summary: A linting and QA check tool for NASL files
5
5
  License: GPL-3.0-or-later
6
6
  License-File: LICENSE
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "troubadix"
3
- version = "25.12.4"
3
+ version = "26.2.0"
4
4
  description = "A linting and QA check tool for NASL files"
5
5
  authors = ["Greenbone <info@greenbone.net>"]
6
6
  license = "GPL-3.0-or-later"
@@ -41,7 +41,7 @@ ruff = ">=0.5.6,<0.15.0"
41
41
  autohooks-plugin-ruff = ">=24.1,<26.0"
42
42
 
43
43
  [tool.black]
44
- line-length = 80
44
+ line-length = 100
45
45
  target-version = ['py310', 'py311', 'py312']
46
46
  exclude = '''
47
47
  /(
@@ -7,7 +7,6 @@ from troubadix.helper.date_format import check_date
7
7
 
8
8
 
9
9
  class CheckCreationDateTestCase(TestCase):
10
-
11
10
  def test_ok(self):
12
11
  results = list(
13
12
  check_date(
@@ -107,20 +107,14 @@ class FindIfStatementsTestCase(unittest.TestCase):
107
107
  self.assertIn('display("nested block")', result.statements[1].outcome)
108
108
 
109
109
  self.assertEqual("inner2", result.statements[2].condition)
110
- self.assertEqual(
111
- 'display("nested inline")', result.statements[2].outcome
112
- )
110
+ self.assertEqual('display("nested inline")', result.statements[2].outcome)
113
111
 
114
112
  def test_complex_condition(self):
115
- content = (
116
- 'if (a == 1 && b > 2 || c != "string") { display("complex"); }'
117
- )
113
+ content = 'if (a == 1 && b > 2 || c != "string") { display("complex"); }'
118
114
  result = find_if_statements(content)
119
115
 
120
116
  self.assertEqual(1, len(result.statements))
121
- self.assertEqual(
122
- 'a == 1 && b > 2 || c != "string"', result.statements[0].condition
123
- )
117
+ self.assertEqual('a == 1 && b > 2 || c != "string"', result.statements[0].condition)
124
118
  self.assertEqual('display("complex");', result.statements[0].outcome)
125
119
 
126
120
  def test_if_with_problematic_stuff(self):
@@ -151,9 +145,7 @@ class FindIfStatementsTestCase(unittest.TestCase):
151
145
  result = find_if_statements(content)
152
146
  self.assertEqual(len(result.statements), 0)
153
147
  self.assertEqual(len(result.errors), 1)
154
- self.assertEqual(
155
- result.errors[0].error_type.name, "TERMINATED_AFTER_CONDITION"
156
- )
148
+ self.assertEqual(result.errors[0].error_type.name, "TERMINATED_AFTER_CONDITION")
157
149
 
158
150
  def test_unclosed_block_brace(self):
159
151
  content = "if(condition) {\ndisplay();\n# Missing closing brace"
@@ -226,9 +218,7 @@ class FindIfStatementsTestCase(unittest.TestCase):
226
218
  IfErrorType.TERMINATED_AFTER_CONDITION,
227
219
  result.errors[0].error_type,
228
220
  )
229
- self.assertEqual(
230
- IfErrorType.UNCLOSED_CONDITION, result.errors[1].error_type
231
- )
221
+ self.assertEqual(IfErrorType.UNCLOSED_CONDITION, result.errors[1].error_type)
232
222
 
233
223
  def test_multiple_nested_inline_if_statements(self):
234
224
  content = """
@@ -132,9 +132,7 @@ class LinguisticExceptionHandlerTestCase(unittest.TestCase):
132
132
  self.assertEqual(check.execute("test", "hello3hello"), False)
133
133
 
134
134
  def test_patterns_tuple_in_file_check(self):
135
- check = PatternsInFileCheck(
136
- "test", [(r"test\d", re.IGNORECASE), (r"hello\dtest", 0)]
137
- )
135
+ check = PatternsInFileCheck("test", [(r"test\d", re.IGNORECASE), (r"hello\dtest", 0)])
138
136
 
139
137
  self.assertEqual(check.execute("test", "test1"), True)
140
138
  self.assertEqual(check.execute("test", "TEST2"), True)
@@ -158,9 +156,7 @@ class LinguisticExceptionHandlerTestCase(unittest.TestCase):
158
156
  self.assertEqual(check.execute("foo1", "test1"), False)
159
157
 
160
158
  def test_pattern_in_file_pattern_flags_check(self):
161
- check = PatternInFilePatternCheck(
162
- r"test|hello", r"foo|bar", re.IGNORECASE, re.IGNORECASE
163
- )
159
+ check = PatternInFilePatternCheck(r"test|hello", r"foo|bar", re.IGNORECASE, re.IGNORECASE)
164
160
 
165
161
  self.assertEqual(check.execute("test1", "foo1"), True)
166
162
  self.assertEqual(check.execute("test1", "FOO2"), True)
@@ -200,15 +196,7 @@ class LinguisticExceptionHandlerTestCase(unittest.TestCase):
200
196
  def test_linguistic_exception_handler(self):
201
197
  checks = [FileCheck("test"), TextCheck("foo")]
202
198
 
203
- self.assertEqual(
204
- handle_linguistic_checks("test1", "foo1", checks), True
205
- )
206
- self.assertEqual(
207
- handle_linguistic_checks("test1", "bar1", checks), True
208
- )
209
- self.assertEqual(
210
- handle_linguistic_checks("hello1", "foo1", checks), True
211
- )
212
- self.assertEqual(
213
- handle_linguistic_checks("hello1", "bar1", checks), False
214
- )
199
+ self.assertEqual(handle_linguistic_checks("test1", "foo1", checks), True)
200
+ self.assertEqual(handle_linguistic_checks("test1", "bar1", checks), True)
201
+ self.assertEqual(handle_linguistic_checks("hello1", "foo1", checks), True)
202
+ self.assertEqual(handle_linguistic_checks("hello1", "bar1", checks), False)
@@ -49,11 +49,7 @@ class SpecialScriptTagPatternsTestCase(unittest.TestCase):
49
49
  self.assertIs(patterns1, patterns2)
50
50
 
51
51
  def test_same_pattern_instance(self):
52
- pattern1 = get_special_script_tag_pattern(
53
- SpecialScriptTag.ADD_PREFERENCE
54
- )
55
- pattern2 = get_special_script_tag_pattern(
56
- SpecialScriptTag.ADD_PREFERENCE
57
- )
52
+ pattern1 = get_special_script_tag_pattern(SpecialScriptTag.ADD_PREFERENCE)
53
+ pattern2 = get_special_script_tag_pattern(SpecialScriptTag.ADD_PREFERENCE)
58
54
 
59
55
  self.assertIs(pattern1, pattern2)
@@ -13,9 +13,7 @@ class RemoveCommentsTestCase(unittest.TestCase):
13
13
  self.assertEqual(remove_comments(input_content), expected_output)
14
14
 
15
15
  def test_no_comments(self):
16
- input_content = (
17
- "function detect_archlinux(sock, port, SCRIPT_DESC, is_pfsense) {"
18
- )
16
+ input_content = "function detect_archlinux(sock, port, SCRIPT_DESC, is_pfsense) {"
19
17
  expected_output = input_content
20
18
  self.assertEqual(remove_comments(input_content), expected_output)
21
19
 
@@ -25,14 +23,14 @@ class RemoveCommentsTestCase(unittest.TestCase):
25
23
  self.assertEqual(remove_comments(input_content), expected_output)
26
24
 
27
25
  def test_inline_comments(self):
28
- input_content = (
29
- "function hello(){ # A function\n return 42; # The answer"
30
- )
26
+ input_content = "function hello(){ # A function\n return 42; # The answer"
31
27
  expected_output = "function hello(){ \n return 42; "
32
28
  self.assertEqual(remove_comments(input_content), expected_output)
33
29
 
34
30
  def test_hash_in_strings(self):
35
- input_content = "message = 'This # is not a comment';\nurl = \"http://example.com/#anchor\";"
31
+ input_content = (
32
+ "message = 'This # is not a comment';\nurl = \"http://example.com/#anchor\";"
33
+ )
36
34
  expected_output = input_content
37
35
  self.assertEqual(remove_comments(input_content), expected_output)
38
36
 
@@ -41,9 +39,7 @@ class RemoveCommentsTestCase(unittest.TestCase):
41
39
  "display('Hash: #'); # Real comment\n"
42
40
  's = "My string with # character"; # Another comment'
43
41
  )
44
- expected_output = (
45
- "display('Hash: #'); \ns = \"My string with # character\"; "
46
- )
42
+ expected_output = "display('Hash: #'); \ns = \"My string with # character\"; "
47
43
  self.assertEqual(remove_comments(input_content), expected_output)
48
44
 
49
45
  def test_complex_scenario(self):
@@ -69,9 +65,7 @@ class RemoveCommentsTestCase(unittest.TestCase):
69
65
  self.assertEqual(remove_comments(input_content), expected_output)
70
66
 
71
67
  def test_indented_comments(self):
72
- input_content = (
73
- "function func() {\n # Indented comment\n return 0;\n}"
74
- )
68
+ input_content = "function func() {\n # Indented comment\n return 0;\n}"
75
69
  expected_output = "function func() {\n\n return 0;\n}"
76
70
  self.assertEqual(remove_comments(input_content), expected_output)
77
71
 
@@ -149,9 +149,7 @@ class TestIsPositionInString(unittest.TestCase):
149
149
  def test_escaped_quote_in_single_quotes(self):
150
150
  text = "x = 'don\\'t';"
151
151
  self.assertTrue(is_position_in_string(text, 8)) # inside the string
152
- self.assertTrue(
153
- is_position_in_string(text, 10)
154
- ) # after the escaped quote
152
+ self.assertTrue(is_position_in_string(text, 10)) # after the escaped quote
155
153
 
156
154
  def test_mixed_quotes(self):
157
155
  text = 'a = "it\'s ok"; b = \'say "hi"\';'
@@ -56,9 +56,7 @@ class TestBadwords(PluginTestCase):
56
56
  path = Path("some/find_service3.nasl")
57
57
  content = " OpenVAS-8 and probably prior\nOpenVAS-9"
58
58
 
59
- fake_context = self.create_file_plugin_context(
60
- nasl_file=path, lines=content.splitlines()
61
- )
59
+ fake_context = self.create_file_plugin_context(nasl_file=path, lines=content.splitlines())
62
60
 
63
61
  plugin = CheckBadwords(fake_context)
64
62
  results = list(plugin.run())
@@ -72,9 +70,7 @@ class TestBadwords(PluginTestCase):
72
70
  "https://www.invt.com/software-download\n"
73
71
  )
74
72
 
75
- fake_context = self.create_file_plugin_context(
76
- nasl_file=path, lines=content.splitlines()
77
- )
73
+ fake_context = self.create_file_plugin_context(nasl_file=path, lines=content.splitlines())
78
74
 
79
75
  plugin = CheckBadwords(fake_context)
80
76
  results = list(plugin.run())
@@ -48,9 +48,7 @@ class CheckCopyrightTextTestCase(PluginTestCase):
48
48
  "right holder(s).\n"
49
49
  ' script_copyright("Copyright (C) 1234");\n'
50
50
  )
51
- fake_context = self.create_file_plugin_context(
52
- nasl_file=path, file_content=content
53
- )
51
+ fake_context = self.create_file_plugin_context(nasl_file=path, file_content=content)
54
52
 
55
53
  plugin = CheckCopyrightText(fake_context)
56
54
 
@@ -75,9 +73,7 @@ class CheckCopyrightTextTestCase(PluginTestCase):
75
73
  "# advisory, and are Copyright (C) the respective author(s)\n"
76
74
  ' script_copyright("Copyright (C) 134");\n'
77
75
  )
78
- fake_context = self.create_file_plugin_context(
79
- nasl_file=path, file_content=content
80
- )
76
+ fake_context = self.create_file_plugin_context(nasl_file=path, file_content=content)
81
77
 
82
78
  plugin = CheckCopyrightText(fake_context)
83
79
 
@@ -99,9 +95,7 @@ class CheckCopyrightTextTestCase(PluginTestCase):
99
95
  f"{wrong_text}"
100
96
  ' script_copyright("Copyright (C) 1234");\n'
101
97
  )
102
- fake_context = self.create_file_plugin_context(
103
- nasl_file=path, file_content=content
104
- )
98
+ fake_context = self.create_file_plugin_context(nasl_file=path, file_content=content)
105
99
 
106
100
  plugin = CheckCopyrightText(fake_context)
107
101
 
@@ -125,9 +119,7 @@ class CheckCopyrightTextTestCase(PluginTestCase):
125
119
  )
126
120
  path.write_text(content, encoding=CURRENT_ENCODING)
127
121
 
128
- fake_context = self.create_file_plugin_context(
129
- nasl_file=path, file_content=content
130
- )
122
+ fake_context = self.create_file_plugin_context(nasl_file=path, file_content=content)
131
123
 
132
124
  plugin = CheckCopyrightText(fake_context)
133
125
 
@@ -138,7 +130,6 @@ class CheckCopyrightTextTestCase(PluginTestCase):
138
130
 
139
131
  self.assertIsInstance(results[0], LinterFix)
140
132
  self.assertEqual(
141
- "The copyright statement has been updated to "
142
- f"{CORRECT_COPYRIGHT_PHRASE}",
133
+ f"The copyright statement has been updated to {CORRECT_COPYRIGHT_PHRASE}",
143
134
  results[0].message,
144
135
  )
@@ -33,9 +33,7 @@ class CheckCopyrightYearTestCase(PluginTestCase):
33
33
  ' script_copyright("Copyright (C) 2022 Greenbone AG");\n'
34
34
  )
35
35
 
36
- fake_context = self.create_file_plugin_context(
37
- nasl_file=path, file_content=content
38
- )
36
+ fake_context = self.create_file_plugin_context(nasl_file=path, file_content=content)
39
37
  plugin = CheckCopyrightYear(fake_context)
40
38
 
41
39
  results = list(plugin.run())
@@ -50,9 +48,7 @@ class CheckCopyrightYearTestCase(PluginTestCase):
50
48
  '+0200 (Tue, 14 May 2022)");\n'
51
49
  ' script_copyright("Copyright (C) 2022 Greenbone AG");\n'
52
50
  )
53
- fake_context = self.create_file_plugin_context(
54
- nasl_file=path, file_content=content
55
- )
51
+ fake_context = self.create_file_plugin_context(nasl_file=path, file_content=content)
56
52
  plugin = CheckCopyrightYear(fake_context)
57
53
 
58
54
  results = list(plugin.run())
@@ -70,9 +66,7 @@ class CheckCopyrightYearTestCase(PluginTestCase):
70
66
  '+0200 (Tue, 14 May 2022)");\n'
71
67
  ' script_copyright("Copyright (C) 2020 Greenbone AG");\n'
72
68
  )
73
- fake_context = self.create_file_plugin_context(
74
- nasl_file=path, file_content=content
75
- )
69
+ fake_context = self.create_file_plugin_context(nasl_file=path, file_content=content)
76
70
  plugin = CheckCopyrightYear(fake_context)
77
71
 
78
72
  results = list(plugin.run())
@@ -86,9 +80,7 @@ class CheckCopyrightYearTestCase(PluginTestCase):
86
80
  '+0200 (Tue, 14 May 2022)");\n'
87
81
  ' script_copyright("Copyright (C) 2020 Greenbone AG");\n'
88
82
  )
89
- fake_context = self.create_file_plugin_context(
90
- nasl_file=path, file_content=content
91
- )
83
+ fake_context = self.create_file_plugin_context(nasl_file=path, file_content=content)
92
84
  plugin = CheckCopyrightYear(fake_context)
93
85
 
94
86
  results = list(plugin.run())
@@ -110,16 +102,12 @@ class CheckCopyrightYearTestCase(PluginTestCase):
110
102
  ' script_copyright("Copyright (C) 2022 Greenbone AG");\n'
111
103
  )
112
104
 
113
- fake_context = self.create_file_plugin_context(
114
- nasl_file=path, file_content=content
115
- )
105
+ fake_context = self.create_file_plugin_context(nasl_file=path, file_content=content)
116
106
  plugin = CheckCopyrightYear(fake_context)
117
107
 
118
108
  results = list(plugin.run())
119
109
  self.assertEqual(len(results), 1)
120
- self.assertEqual(
121
- "Missing creation_date statement in VT", results[0].message
122
- )
110
+ self.assertEqual("Missing creation_date statement in VT", results[0].message)
123
111
 
124
112
  def test_missing_copyright_tag(self):
125
113
  path = Path("some/file.nasl")
@@ -129,9 +117,7 @@ class CheckCopyrightYearTestCase(PluginTestCase):
129
117
  '+0200 (Tue, 14 May 2022)");\n'
130
118
  )
131
119
 
132
- fake_context = self.create_file_plugin_context(
133
- nasl_file=path, file_content=content
134
- )
120
+ fake_context = self.create_file_plugin_context(nasl_file=path, file_content=content)
135
121
  plugin = CheckCopyrightYear(fake_context)
136
122
 
137
123
  results = list(plugin.run())
@@ -147,9 +133,7 @@ class CheckCopyrightYearTestCase(PluginTestCase):
147
133
  ' script_copyright("Copyright (C) Greenbone AG");\n'
148
134
  )
149
135
 
150
- fake_context = self.create_file_plugin_context(
151
- nasl_file=path, file_content=content
152
- )
136
+ fake_context = self.create_file_plugin_context(nasl_file=path, file_content=content)
153
137
  plugin = CheckCopyrightYear(fake_context)
154
138
 
155
139
  results = list(plugin.run())
@@ -167,9 +151,7 @@ class CheckCopyrightYearTestCase(PluginTestCase):
167
151
  ' script_copyright("Copyright (C) 2022 Greenbone AG");\n'
168
152
  )
169
153
 
170
- fake_context = self.create_file_plugin_context(
171
- nasl_file=path, file_content=content
172
- )
154
+ fake_context = self.create_file_plugin_context(nasl_file=path, file_content=content)
173
155
  plugin = CheckCopyrightYear(fake_context)
174
156
 
175
157
  results = list(plugin.run())
@@ -188,9 +170,7 @@ class CheckCopyrightYearTestCase(PluginTestCase):
188
170
  '+0200 (Tue, 14 May 2020)");\n'
189
171
  ' script_copyright("Copyright (C) 2021 Greenbone AG");\n'
190
172
  )
191
- fake_context = self.create_file_plugin_context(
192
- nasl_file=path, file_content=content
193
- )
173
+ fake_context = self.create_file_plugin_context(nasl_file=path, file_content=content)
194
174
  plugin = CheckCopyrightYear(fake_context)
195
175
 
196
176
  results = list(plugin.run())
@@ -200,8 +180,7 @@ class CheckCopyrightYearTestCase(PluginTestCase):
200
180
  results[0].message,
201
181
  )
202
182
  self.assertEqual(
203
- "a pre2008 vt has a copyright value in the fileheader"
204
- " newer than the creation_year",
183
+ "a pre2008 vt has a copyright value in the fileheader newer than the creation_year",
205
184
  results[1].message,
206
185
  )
207
186
 
@@ -214,9 +193,7 @@ class CheckCopyrightYearTestCase(PluginTestCase):
214
193
  ' script_copyright("Copyright (C) 1000 Greenbone AG");\n'
215
194
  )
216
195
 
217
- fake_context = self.create_file_plugin_context(
218
- nasl_file=path, file_content=content
219
- )
196
+ fake_context = self.create_file_plugin_context(nasl_file=path, file_content=content)
220
197
  plugin = CheckCopyrightYear(fake_context)
221
198
 
222
199
  results = list(plugin.run())
@@ -24,16 +24,13 @@ from . import PluginTestCase
24
24
 
25
25
 
26
26
  class CheckCreationDateTestCase(PluginTestCase):
27
-
28
27
  def test_ok(self):
29
28
  path = Path("some/file.nasl")
30
29
  content = (
31
30
  ' script_tag(name:"creation_date", value:"2013-05-14 11:24:55 '
32
31
  '+0200 (Tue, 14 May 2013)");\n'
33
32
  )
34
- fake_context = self.create_file_plugin_context(
35
- nasl_file=path, file_content=content
36
- )
33
+ fake_context = self.create_file_plugin_context(nasl_file=path, file_content=content)
37
34
  plugin = CheckCreationDate(fake_context)
38
35
 
39
36
  results = list(plugin.run())
@@ -55,9 +52,7 @@ class CheckCreationDateTestCase(PluginTestCase):
55
52
  ' script_tag(name:"cvss_base_vector", '
56
53
  'value:"AV:N/AC:L/Au:N/C:P/I:P/A:P");\n'
57
54
  )
58
- fake_context = self.create_file_plugin_context(
59
- nasl_file=path, file_content=content
60
- )
55
+ fake_context = self.create_file_plugin_context(nasl_file=path, file_content=content)
61
56
  plugin = CheckCreationDate(fake_context)
62
57
 
63
58
  results = list(plugin.run())
@@ -79,9 +74,7 @@ class CheckCreationDateTestCase(PluginTestCase):
79
74
  ' script_tag(name:"cvss_base_vector", '
80
75
  'value:"AV:N/AC:L/Au:N/C:P/I:P/A:P");\n'
81
76
  )
82
- fake_context = self.create_file_plugin_context(
83
- nasl_file=path, file_content=content
84
- )
77
+ fake_context = self.create_file_plugin_context(nasl_file=path, file_content=content)
85
78
  plugin = CheckCreationDate(fake_context)
86
79
 
87
80
  results = list(plugin.run())
@@ -96,9 +89,7 @@ class CheckCreationDateTestCase(PluginTestCase):
96
89
  ' script_tag(name:"last_modification", value:"2025-01-01 00:00:00 '
97
90
  '+0200 (Wed, 01 Jan 2025)");\n'
98
91
  )
99
- fake_context = self.create_file_plugin_context(
100
- nasl_file=path, file_content=content
101
- )
92
+ fake_context = self.create_file_plugin_context(nasl_file=path, file_content=content)
102
93
  plugin = CheckCreationDate(fake_context)
103
94
 
104
95
  results = list(plugin.run())
@@ -119,9 +110,7 @@ class CheckCreationDateTestCase(PluginTestCase):
119
110
  ' script_tag(name:"last_modification", value:"2025-01-01 00:00:00 '
120
111
  '+0200 (Wed, 01 Jan 2025)");\n'
121
112
  )
122
- fake_context = self.create_file_plugin_context(
123
- nasl_file=path, file_content=content
124
- )
113
+ fake_context = self.create_file_plugin_context(nasl_file=path, file_content=content)
125
114
  plugin = CheckCreationDate(fake_context)
126
115
 
127
116
  results = list(plugin.run())
@@ -28,12 +28,9 @@ class CheckCVEFormatTestCase(PluginTestCase):
28
28
  def test_ok(self):
29
29
  path = Path("some/file.nasl")
30
30
  content = (
31
- ' script_tag(name:"cvss_base", value:"7.5");\n'
32
- ' script_cve_id("CVE-2022-23807");\n'
33
- )
34
- fake_context = self.create_file_plugin_context(
35
- nasl_file=path, file_content=content
31
+ ' script_tag(name:"cvss_base", value:"7.5");\n script_cve_id("CVE-2022-23807");\n'
36
32
  )
33
+ fake_context = self.create_file_plugin_context(nasl_file=path, file_content=content)
37
34
  plugin = CheckCVEFormat(fake_context)
38
35
 
39
36
  results = list(plugin.run())
@@ -52,9 +49,7 @@ class CheckCVEFormatTestCase(PluginTestCase):
52
49
  def test_detection_script(self):
53
50
  path = Path("some/file.nasl")
54
51
  content = ' script_tag(name:"cvss_base", value:"0.0");\n'
55
- fake_context = self.create_file_plugin_context(
56
- nasl_file=path, file_content=content
57
- )
52
+ fake_context = self.create_file_plugin_context(nasl_file=path, file_content=content)
58
53
  plugin = CheckCVEFormat(fake_context)
59
54
 
60
55
  results = list(plugin.run())
@@ -64,9 +59,7 @@ class CheckCVEFormatTestCase(PluginTestCase):
64
59
  def test_no_cve_reference(self):
65
60
  path = Path("some/file.nasl")
66
61
  content = ' script_tag(name:"cvss_base", value:"7.5");\n'
67
- fake_context = self.create_file_plugin_context(
68
- nasl_file=path, file_content=content
69
- )
62
+ fake_context = self.create_file_plugin_context(nasl_file=path, file_content=content)
70
63
  plugin = CheckCVEFormat(fake_context)
71
64
 
72
65
  results = list(plugin.run())
@@ -81,12 +74,9 @@ class CheckCVEFormatTestCase(PluginTestCase):
81
74
  def test_invalid_cve_format(self):
82
75
  path = Path("some/file.nasl")
83
76
  content = (
84
- ' script_tag(name:"cvss_base", value:"10.0");\n'
85
- ' script_cve_id("CVE-a123-23807");\n'
86
- )
87
- fake_context = self.create_file_plugin_context(
88
- nasl_file=path, file_content=content
77
+ ' script_tag(name:"cvss_base", value:"10.0");\n script_cve_id("CVE-a123-23807");\n'
89
78
  )
79
+ fake_context = self.create_file_plugin_context(nasl_file=path, file_content=content)
90
80
  plugin = CheckCVEFormat(fake_context)
91
81
 
92
82
  results = list(plugin.run())
@@ -101,13 +91,10 @@ class CheckCVEFormatTestCase(PluginTestCase):
101
91
  def test_more_then_four_digits(self):
102
92
  path = Path("some/file.nasl")
103
93
  content = (
104
- ' script_tag(name:"cvss_base", value:"7.5");\n'
105
- ' script_cve_id("CVE-2021-03807");\n'
94
+ ' script_tag(name:"cvss_base", value:"7.5");\n script_cve_id("CVE-2021-03807");\n'
106
95
  )
107
96
 
108
- fake_context = self.create_file_plugin_context(
109
- nasl_file=path, file_content=content
110
- )
97
+ fake_context = self.create_file_plugin_context(nasl_file=path, file_content=content)
111
98
  plugin = CheckCVEFormat(fake_context)
112
99
 
113
100
  results = list(plugin.run())
@@ -122,12 +109,9 @@ class CheckCVEFormatTestCase(PluginTestCase):
122
109
  def test_invalid_year(self):
123
110
  path = Path("some/file.nasl")
124
111
  content = (
125
- ' script_tag(name:"cvss_base", value:"7.5");\n'
126
- ' script_cve_id("CVE-1971-3807");\n'
127
- )
128
- fake_context = self.create_file_plugin_context(
129
- nasl_file=path, file_content=content
112
+ ' script_tag(name:"cvss_base", value:"7.5");\n script_cve_id("CVE-1971-3807");\n'
130
113
  )
114
+ fake_context = self.create_file_plugin_context(nasl_file=path, file_content=content)
131
115
  plugin = CheckCVEFormat(fake_context)
132
116
 
133
117
  results = list(plugin.run())
@@ -144,9 +128,7 @@ class CheckCVEFormatTestCase(PluginTestCase):
144
128
  ' script_tag(name:"cvss_base", value:"7.5");\n'
145
129
  f' script_cve_id("CVE-{current_year + 1}-3807");\n'
146
130
  )
147
- fake_context = self.create_file_plugin_context(
148
- nasl_file=path, file_content=content
149
- )
131
+ fake_context = self.create_file_plugin_context(nasl_file=path, file_content=content)
150
132
  plugin = CheckCVEFormat(fake_context)
151
133
 
152
134
  results = list(plugin.run())
@@ -164,9 +146,7 @@ class CheckCVEFormatTestCase(PluginTestCase):
164
146
  ' script_tag(name:"cvss_base", value:"7.5");\n'
165
147
  ' script_cve_id("CVE-2021-3807","CVE-2021-3807");\n'
166
148
  )
167
- fake_context = self.create_file_plugin_context(
168
- nasl_file=path, file_content=content
169
- )
149
+ fake_context = self.create_file_plugin_context(nasl_file=path, file_content=content)
170
150
  plugin = CheckCVEFormat(fake_context)
171
151
 
172
152
  results = list(plugin.run())
@@ -31,9 +31,7 @@ class CheckCVSSFormatTestCase(PluginTestCase):
31
31
  ' script_tag(name:"cvss_base_vector", '
32
32
  'value:"AV:N/AC:L/Au:S/C:N/I:P/A:N");\n'
33
33
  )
34
- fake_context = self.create_file_plugin_context(
35
- nasl_file=path, file_content=content
36
- )
34
+ fake_context = self.create_file_plugin_context(nasl_file=path, file_content=content)
37
35
  plugin = CheckCVSSFormat(fake_context)
38
36
 
39
37
  results = list(plugin.run())
@@ -56,9 +54,7 @@ class CheckCVSSFormatTestCase(PluginTestCase):
56
54
  ' script_tag(name:"cvss_base_vector", '
57
55
  'value:"AV:N/AC:L/Au:S/C:N/I:P/A:N");\n'
58
56
  )
59
- fake_context = self.create_file_plugin_context(
60
- nasl_file=path, file_content=content
61
- )
57
+ fake_context = self.create_file_plugin_context(nasl_file=path, file_content=content)
62
58
  plugin = CheckCVSSFormat(fake_context)
63
59
 
64
60
  results = list(plugin.run())
@@ -72,13 +68,8 @@ class CheckCVSSFormatTestCase(PluginTestCase):
72
68
 
73
69
  def test_missing_base(self):
74
70
  path = Path("some/file.nasl")
75
- content = (
76
- ' script_tag(name:"cvss_base_vector", '
77
- 'value:"AV:N/AC:L/Au:S/C:N/I:P/A:N");\n'
78
- )
79
- fake_context = self.create_file_plugin_context(
80
- nasl_file=path, file_content=content
81
- )
71
+ content = ' script_tag(name:"cvss_base_vector", value:"AV:N/AC:L/Au:S/C:N/I:P/A:N");\n'
72
+ fake_context = self.create_file_plugin_context(nasl_file=path, file_content=content)
82
73
  plugin = CheckCVSSFormat(fake_context)
83
74
 
84
75
  results = list(plugin.run())
@@ -97,9 +88,7 @@ class CheckCVSSFormatTestCase(PluginTestCase):
97
88
  ' script_tag(name:"cvss_base_vector", '
98
89
  'value:"AV:N/AC:L/Au:S/C:N/I:P/A:");\n'
99
90
  )
100
- fake_context = self.create_file_plugin_context(
101
- nasl_file=path, file_content=content
102
- )
91
+ fake_context = self.create_file_plugin_context(nasl_file=path, file_content=content)
103
92
  plugin = CheckCVSSFormat(fake_context)
104
93
 
105
94
  results = list(plugin.run())
@@ -114,9 +103,7 @@ class CheckCVSSFormatTestCase(PluginTestCase):
114
103
  def test_missing_vector(self):
115
104
  path = Path("some/file.nasl")
116
105
  content = ' script_tag(name:"cvss_base", value:"4.0");\n'
117
- fake_context = self.create_file_plugin_context(
118
- nasl_file=path, file_content=content
119
- )
106
+ fake_context = self.create_file_plugin_context(nasl_file=path, file_content=content)
120
107
  plugin = CheckCVSSFormat(fake_context)
121
108
 
122
109
  results = list(plugin.run())
@@ -135,9 +122,7 @@ class CheckCVSSFormatTestCase(PluginTestCase):
135
122
  ' script_tag(name:"cvss_base_vector", '
136
123
  'value:"AV:N/AC:L/Au:S/C:N/I:P/A:N");\n'
137
124
  )
138
- fake_context = self.create_file_plugin_context(
139
- nasl_file=path, file_content=content
140
- )
125
+ fake_context = self.create_file_plugin_context(nasl_file=path, file_content=content)
141
126
  plugin = CheckCVSSFormat(fake_context)
142
127
 
143
128
  results = list(plugin.run())
@@ -88,8 +88,7 @@ class CheckDependenciesTestCase(PluginTestCase):
88
88
  self.assertEqual(len(results), 1)
89
89
  self.assertIsInstance(results[0], LinterError)
90
90
  self.assertEqual(
91
- f"The script dependency {dependency} could "
92
- "not be found within the VTs.",
91
+ f"The script dependency {dependency} could not be found within the VTs.",
93
92
  results[0].message,
94
93
  )
95
94
 
@@ -188,8 +187,7 @@ class CheckDependenciesTestCase(PluginTestCase):
188
187
  self.assertEqual(len(results), 1)
189
188
  self.assertIsInstance(results[0], LinterError)
190
189
  self.assertEqual(
191
- "The script dependency example2.nasl could "
192
- "not be found within the VTs.",
190
+ "The script dependency example2.nasl could not be found within the VTs.",
193
191
  results[0].message,
194
192
  )
195
193