troubadix 26.1.0__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.
- {troubadix-26.1.0 → troubadix-26.2.0}/PKG-INFO +1 -1
- {troubadix-26.1.0 → troubadix-26.2.0}/pyproject.toml +1 -1
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/helper/test_date_format.py +0 -1
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_copyright_text.py +1 -1
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_copyright_year.py +1 -1
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_creation_date.py +0 -1
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_cve_format.py +4 -4
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_cvss_format.py +1 -1
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_dependencies.py +2 -2
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_dependency_category_order.py +1 -1
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_deprecated_dependency.py +1 -1
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_deprecated_functions.py +2 -3
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_double_end_points.py +1 -1
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_duplicate_oid.py +1 -1
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_duplicated_script_tags.py +2 -2
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_script_add_preference_type.py +2 -6
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_script_copyright.py +3 -3
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_script_version_and_last_modification_tags.py +2 -2
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_script_xref_url.py +1 -1
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_security_messages.py +3 -3
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_severity_date.py +0 -1
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_severity_format.py +0 -1
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_severity_origin.py +0 -1
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_spaces_before_dots.py +0 -1
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_using_display.py +1 -1
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_vt_placement.py +1 -1
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/standalone_plugins/changed_packages/test_package.py +41 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/standalone_plugins/test_changed_creation_date.py +0 -9
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/standalone_plugins/test_dependency_graph.py +0 -1
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/standalone_plugins/test_deprecate_vts.py +2 -4
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/standalone_plugins/test_last_modification.py +1 -2
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/test_helper.py +2 -2
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/test_runner.py +2 -2
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/__version__.py +1 -1
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/helper/date_format.py +2 -3
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/copyright_text.py +1 -1
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/dependencies.py +1 -1
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/dependency_category_order.py +1 -1
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/deprecated_dependency.py +2 -2
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/deprecated_functions.py +2 -3
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/duplicated_script_tags.py +1 -2
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/grammar.py +4 -6
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/http_links_in_tags.py +2 -3
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/illegal_characters.py +1 -2
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/multiple_re_parameters.py +0 -1
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/overlong_description_lines.py +1 -1
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/overlong_script_tags.py +9 -14
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/qod.py +0 -1
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/script_calls_recommended.py +1 -1
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/script_family.py +1 -1
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/script_tag_whitespaces.py +1 -2
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/script_tags_mandatory.py +1 -1
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/script_version_and_last_modification_tags.py +1 -1
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/security_messages.py +2 -4
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/severity_date.py +0 -1
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/severity_format.py +0 -1
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/severity_origin.py +0 -1
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/spaces_before_dots.py +0 -1
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/spaces_in_filename.py +1 -1
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/trailing_spaces_tabs.py +1 -1
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/valid_script_tag_names.py +1 -1
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/reporter.py +2 -3
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/standalone_plugins/allowed_rev_diff.py +2 -2
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/standalone_plugins/changed_creation_date.py +1 -5
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/standalone_plugins/changed_oid.py +1 -2
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/standalone_plugins/changed_packages/package.py +12 -3
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/standalone_plugins/file_extensions.py +1 -1
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/standalone_plugins/no_solution.py +2 -4
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/standalone_plugins/util.py +0 -2
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/standalone_plugins/version_updated.py +1 -2
- {troubadix-26.1.0 → troubadix-26.2.0}/LICENSE +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/README.md +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/__init__.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/helper/__init__.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/helper/test_if_block_parser.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/helper/test_linguistic_exception_handler.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/helper/test_patterns.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/helper/test_remove_comments.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/helper/test_text_utils.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/manual_tests/comment_removal_diff.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/__init__.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/fail.nasl +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/fail2.nasl +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test.nasl +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_badwords.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_encoding.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_files/fail_bad_new_line.nasl +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_files/fail_badwords.nasl +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_files/fail_name_and_copyright_newline.nasl +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_files/fail_name_newline.nasl +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_files/fail_permissions.nasl +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_files/fail_spelling.nasl +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_files/nasl/21.04/fail.nasl +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_files/nasl/21.04/fail_badwords.nasl +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_files/nasl/21.04/fail_name_and_copyright_newline.nasl +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_files/nasl/21.04/fail_name_newline.nasl +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_files/nasl/21.04/fail_solution_template.nasl +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_files/nasl/21.04/runner/fail.nasl +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_files/nasl/21.04/runner/fail2.nasl +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_files/nasl/21.04/runner/test.nasl +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_files/nasl/21.04/runner/test_valid_oid.nasl +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_files/nasl/21.04/test.inc +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_files/nasl/21.04/test.nasl +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_files/nasl/warning.nasl +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_files/ok_permissions.nasl +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_files/test_oid.nasl +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_forking_nasl_functions.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_get_kb_on_services.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_grammar.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_http_links_in_tags.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_if_statement_syntax.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_illegal_characters.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_log_messages.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_malformed_dependencies.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_misplaced_compare_in_if.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_missing_desc_exit.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_missing_tag_solution.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_multiple_re_parameters.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_newlines.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_overlong_description_lines.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_overlong_script_tags.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_prod_svc_detect_in_vulnvt.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_qod.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_reporting_consistency.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_script_add_preference_id.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_script_calls_empty_values.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_script_calls_recommended.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_script_category.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_script_family.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_script_tag_form.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_script_tag_whitespaces.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_script_tags_mandatory.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_script_xref_form.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_set_get_kb_calls.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_solution_text.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_solution_type.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_spaces_in_filename.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_spelling.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_tabs.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_todo_tbd.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_trailing_spaces_tabs.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_valid_oid.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_valid_script_tag_names.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_variable_redefinition_in_foreach.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/plugins/test_vt_file_permissions.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/standalone_plugins/__init__.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/standalone_plugins/changed_packages/__init__.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/standalone_plugins/changed_packages/markers/__init__.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/standalone_plugins/changed_packages/markers/test_added_epoch.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/standalone_plugins/changed_packages/markers/test_added_release.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/standalone_plugins/changed_packages/markers/test_added_udeb.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/standalone_plugins/changed_packages/markers/test_changed_update.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/standalone_plugins/changed_packages/markers/test_dropped_architecture.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/standalone_plugins/changed_packages/test_changed_packages.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/standalone_plugins/nasl/21.04/21_script.nasl +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/standalone_plugins/nasl/22.04/22_script.nasl +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/standalone_plugins/nasl/common/bar.nasl +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/standalone_plugins/nasl/common/foo.nasl +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/standalone_plugins/nasl/common/foobar.nasl +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/standalone_plugins/nasl/common/gsf/enterprise_script.nasl +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/standalone_plugins/test_changed_cves.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/standalone_plugins/test_changed_oid.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/standalone_plugins/test_file_extensions.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/standalone_plugins/test_no_solution.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/standalone_plugins/test_version_updated.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/test_argparser.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/test_naslinter.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/test_reporter.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/tests/test_results.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/__init__.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/argparser.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/codespell/codespell.additions +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/codespell/codespell.exclude +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/codespell/codespell.ignore +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/helper/__init__.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/helper/helper.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/helper/if_block_parser.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/helper/linguistic_exception_handler.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/helper/patterns.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/helper/remove_comments.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/helper/text_utils.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugin.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/__init__.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/badwords.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/copyright_year.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/creation_date.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/cve_format.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/cvss_format.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/double_end_points.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/duplicate_oid.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/encoding.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/forking_nasl_functions.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/get_kb_on_services.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/if_statement_syntax.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/log_messages.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/malformed_dependencies.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/misplaced_compare_in_if.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/missing_desc_exit.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/missing_tag_solution.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/newlines.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/prod_svc_detect_in_vulnvt.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/reporting_consistency.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/script_add_preference_id.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/script_add_preference_type.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/script_calls_empty_values.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/script_category.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/script_copyright.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/script_tag_form.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/script_xref_form.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/script_xref_url.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/set_get_kb_calls.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/solution_text.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/solution_type.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/spelling.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/tabs.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/todo_tbd.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/using_display.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/valid_oid.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/variable_assigned_in_if.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/variable_redefinition_in_foreach.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/vt_file_permissions.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/plugins/vt_placement.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/results.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/runner.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/standalone_plugins/__init__.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/standalone_plugins/changed_cves.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/standalone_plugins/changed_packages/changed_packages.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/standalone_plugins/changed_packages/marker/__init__.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/standalone_plugins/changed_packages/marker/added_epoch.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/standalone_plugins/changed_packages/marker/added_release.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/standalone_plugins/changed_packages/marker/added_udeb.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/standalone_plugins/changed_packages/marker/changed_update.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/standalone_plugins/changed_packages/marker/dropped_architecture.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/standalone_plugins/changed_packages/marker/marker.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/standalone_plugins/common.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/standalone_plugins/dependency_graph/__init__.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/standalone_plugins/dependency_graph/checks.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/standalone_plugins/dependency_graph/cli.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/standalone_plugins/dependency_graph/dependency_graph.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/standalone_plugins/dependency_graph/models.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/standalone_plugins/deprecate_vts.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/standalone_plugins/last_modification.py +0 -0
- {troubadix-26.1.0 → troubadix-26.2.0}/troubadix/troubadix.py +0 -0
|
@@ -130,6 +130,6 @@ class CheckCopyrightTextTestCase(PluginTestCase):
|
|
|
130
130
|
|
|
131
131
|
self.assertIsInstance(results[0], LinterFix)
|
|
132
132
|
self.assertEqual(
|
|
133
|
-
"The copyright statement has been updated to
|
|
133
|
+
f"The copyright statement has been updated to {CORRECT_COPYRIGHT_PHRASE}",
|
|
134
134
|
results[0].message,
|
|
135
135
|
)
|
|
@@ -180,7 +180,7 @@ class CheckCopyrightYearTestCase(PluginTestCase):
|
|
|
180
180
|
results[0].message,
|
|
181
181
|
)
|
|
182
182
|
self.assertEqual(
|
|
183
|
-
"a pre2008 vt has a copyright value in the fileheader
|
|
183
|
+
"a pre2008 vt has a copyright value in the fileheader newer than the creation_year",
|
|
184
184
|
results[1].message,
|
|
185
185
|
)
|
|
186
186
|
|
|
@@ -28,7 +28,7 @@ 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
|
|
31
|
+
' script_tag(name:"cvss_base", value:"7.5");\n script_cve_id("CVE-2022-23807");\n'
|
|
32
32
|
)
|
|
33
33
|
fake_context = self.create_file_plugin_context(nasl_file=path, file_content=content)
|
|
34
34
|
plugin = CheckCVEFormat(fake_context)
|
|
@@ -74,7 +74,7 @@ class CheckCVEFormatTestCase(PluginTestCase):
|
|
|
74
74
|
def test_invalid_cve_format(self):
|
|
75
75
|
path = Path("some/file.nasl")
|
|
76
76
|
content = (
|
|
77
|
-
' script_tag(name:"cvss_base", value:"10.0");\n
|
|
77
|
+
' script_tag(name:"cvss_base", value:"10.0");\n script_cve_id("CVE-a123-23807");\n'
|
|
78
78
|
)
|
|
79
79
|
fake_context = self.create_file_plugin_context(nasl_file=path, file_content=content)
|
|
80
80
|
plugin = CheckCVEFormat(fake_context)
|
|
@@ -91,7 +91,7 @@ class CheckCVEFormatTestCase(PluginTestCase):
|
|
|
91
91
|
def test_more_then_four_digits(self):
|
|
92
92
|
path = Path("some/file.nasl")
|
|
93
93
|
content = (
|
|
94
|
-
' script_tag(name:"cvss_base", value:"7.5");\n
|
|
94
|
+
' script_tag(name:"cvss_base", value:"7.5");\n script_cve_id("CVE-2021-03807");\n'
|
|
95
95
|
)
|
|
96
96
|
|
|
97
97
|
fake_context = self.create_file_plugin_context(nasl_file=path, file_content=content)
|
|
@@ -109,7 +109,7 @@ class CheckCVEFormatTestCase(PluginTestCase):
|
|
|
109
109
|
def test_invalid_year(self):
|
|
110
110
|
path = Path("some/file.nasl")
|
|
111
111
|
content = (
|
|
112
|
-
' script_tag(name:"cvss_base", value:"7.5");\n
|
|
112
|
+
' script_tag(name:"cvss_base", value:"7.5");\n script_cve_id("CVE-1971-3807");\n'
|
|
113
113
|
)
|
|
114
114
|
fake_context = self.create_file_plugin_context(nasl_file=path, file_content=content)
|
|
115
115
|
plugin = CheckCVEFormat(fake_context)
|
|
@@ -68,7 +68,7 @@ class CheckCVSSFormatTestCase(PluginTestCase):
|
|
|
68
68
|
|
|
69
69
|
def test_missing_base(self):
|
|
70
70
|
path = Path("some/file.nasl")
|
|
71
|
-
content = ' script_tag(name:"cvss_base_vector",
|
|
71
|
+
content = ' script_tag(name:"cvss_base_vector", value:"AV:N/AC:L/Au:S/C:N/I:P/A:N");\n'
|
|
72
72
|
fake_context = self.create_file_plugin_context(nasl_file=path, file_content=content)
|
|
73
73
|
plugin = CheckCVSSFormat(fake_context)
|
|
74
74
|
|
|
@@ -88,7 +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
|
|
91
|
+
f"The script dependency {dependency} could not be found within the VTs.",
|
|
92
92
|
results[0].message,
|
|
93
93
|
)
|
|
94
94
|
|
|
@@ -187,7 +187,7 @@ class CheckDependenciesTestCase(PluginTestCase):
|
|
|
187
187
|
self.assertEqual(len(results), 1)
|
|
188
188
|
self.assertIsInstance(results[0], LinterError)
|
|
189
189
|
self.assertEqual(
|
|
190
|
-
"The script dependency example2.nasl could
|
|
190
|
+
"The script dependency example2.nasl could not be found within the VTs.",
|
|
191
191
|
results[0].message,
|
|
192
192
|
)
|
|
193
193
|
|
|
@@ -86,7 +86,7 @@ class CheckDependencyCategoryOrderTestCase(PluginTestCase):
|
|
|
86
86
|
self.assertEqual(len(results), 1)
|
|
87
87
|
self.assertIsInstance(results[0], LinterError)
|
|
88
88
|
self.assertEqual(
|
|
89
|
-
f"The script dependency {dependency} could
|
|
89
|
+
f"The script dependency {dependency} could not be found within the VTs.",
|
|
90
90
|
results[0].message,
|
|
91
91
|
)
|
|
92
92
|
|
|
@@ -127,7 +127,7 @@ class CheckDeprecatedDependencyTestCase(PluginTestCase):
|
|
|
127
127
|
self.assertEqual(len(results), 1)
|
|
128
128
|
self.assertIsInstance(results[0], LinterError)
|
|
129
129
|
self.assertEqual(
|
|
130
|
-
f"The script dependency {dependency} could
|
|
130
|
+
f"The script dependency {dependency} could not be found within the VTs.",
|
|
131
131
|
results[0].message,
|
|
132
132
|
)
|
|
133
133
|
|
|
@@ -55,10 +55,9 @@ class CheckDeprecatedDependencyTestCase(PluginTestCase):
|
|
|
55
55
|
|
|
56
56
|
def test_deprecated_functions(self):
|
|
57
57
|
deprecated_output = {
|
|
58
|
-
'script_summary();, use script_tag(name:"'
|
|
59
|
-
'summary", value:""); instead': " script_"
|
|
58
|
+
'script_summary();, use script_tag(name:"summary", value:""); instead': " script_"
|
|
60
59
|
'summary("deprecated");',
|
|
61
|
-
"script_id();, use script_oid(); with
|
|
60
|
+
"script_id();, use script_oid(); with the full OID instead": " script_id(123345);",
|
|
62
61
|
"security_note();": ' security_note("deprecated");',
|
|
63
62
|
"security_warning();": ' security_warning("deprecated");',
|
|
64
63
|
"security_hole();": ' security_hole("deprecated");',
|
|
@@ -60,6 +60,6 @@ class CheckDoubleEndPointsTestCase(PluginTestCase):
|
|
|
60
60
|
self.assertEqual(len(results), 1)
|
|
61
61
|
self.assertIsInstance(results[0], LinterError)
|
|
62
62
|
self.assertEqual(
|
|
63
|
-
"The script tag 'summary'
|
|
63
|
+
"The script tag 'summary' is ending with two or more points: 'Foo Bar...'.",
|
|
64
64
|
results[0].message,
|
|
65
65
|
)
|
|
@@ -52,7 +52,7 @@ class CheckDuplicateOIDTestCase(PluginTestCase):
|
|
|
52
52
|
self.assertEqual(len(results), 1)
|
|
53
53
|
self.assertIsInstance(results[0], LinterError)
|
|
54
54
|
self.assertEqual(
|
|
55
|
-
"Could not find an OID
|
|
55
|
+
"Could not find an OID in 'test_files/nasl/21.04/fail_badwords.nasl'.",
|
|
56
56
|
results[0].message,
|
|
57
57
|
)
|
|
58
58
|
|
|
@@ -62,7 +62,7 @@ class CheckDuplicatedScriptTagsTestCase(PluginTestCase):
|
|
|
62
62
|
self.assertEqual(len(results), 1)
|
|
63
63
|
self.assertIsInstance(results[0], LinterError)
|
|
64
64
|
self.assertEqual(
|
|
65
|
-
"The VT is using the script tag
|
|
65
|
+
"The VT is using the script tag 'script_name' multiple number of times.",
|
|
66
66
|
results[0].message,
|
|
67
67
|
)
|
|
68
68
|
|
|
@@ -80,7 +80,7 @@ class CheckDuplicatedScriptTagsTestCase(PluginTestCase):
|
|
|
80
80
|
self.assertEqual(len(results), 1)
|
|
81
81
|
self.assertIsInstance(results[0], LinterError)
|
|
82
82
|
self.assertEqual(
|
|
83
|
-
"The VT is using the script tag
|
|
83
|
+
"The VT is using the script tag 'cvss_base' multiple number of times.",
|
|
84
84
|
results[0].message,
|
|
85
85
|
)
|
|
86
86
|
|
|
@@ -97,9 +97,7 @@ class CheckScriptAddPreferenceTypeTestCase(PluginTestCase):
|
|
|
97
97
|
)
|
|
98
98
|
path = Path("some/file.nasl")
|
|
99
99
|
content = (
|
|
100
|
-
' script_tag(name:"cvss_base", value:"4.0");\n'
|
|
101
|
-
' script_name("Foo Bar");\n'
|
|
102
|
-
f"{add_pref}\n"
|
|
100
|
+
f' script_tag(name:"cvss_base", value:"4.0");\n script_name("Foo Bar");\n{add_pref}\n'
|
|
103
101
|
)
|
|
104
102
|
fake_context = self.create_file_plugin_context(nasl_file=path, file_content=content)
|
|
105
103
|
plugin = CheckScriptAddPreferenceType(fake_context)
|
|
@@ -119,9 +117,7 @@ class CheckScriptAddPreferenceTypeTestCase(PluginTestCase):
|
|
|
119
117
|
add_pref = 'script_add_preference(name:"File or Directory Name", value:"/home", id:1);'
|
|
120
118
|
path = Path("some/file.nasl")
|
|
121
119
|
content = (
|
|
122
|
-
' script_tag(name:"cvss_base", value:"4.0");\n'
|
|
123
|
-
' script_name("Foo Bar");\n'
|
|
124
|
-
f"{add_pref}\n"
|
|
120
|
+
f' script_tag(name:"cvss_base", value:"4.0");\n script_name("Foo Bar");\n{add_pref}\n'
|
|
125
121
|
)
|
|
126
122
|
fake_context = self.create_file_plugin_context(nasl_file=path, file_content=content)
|
|
127
123
|
plugin = CheckScriptAddPreferenceType(fake_context)
|
|
@@ -54,7 +54,7 @@ class CheckScriptCopyrightTestCase(PluginTestCase):
|
|
|
54
54
|
self.assertEqual(len(results), 1)
|
|
55
55
|
self.assertIsInstance(results[0], LinterError)
|
|
56
56
|
self.assertIn(
|
|
57
|
-
"The VT is using an incorrect syntax for its
|
|
57
|
+
"The VT is using an incorrect syntax for its copyright statement.",
|
|
58
58
|
results[0].message,
|
|
59
59
|
)
|
|
60
60
|
|
|
@@ -69,7 +69,7 @@ class CheckScriptCopyrightTestCase(PluginTestCase):
|
|
|
69
69
|
self.assertEqual(len(results), 1)
|
|
70
70
|
self.assertIsInstance(results[0], LinterError)
|
|
71
71
|
self.assertIn(
|
|
72
|
-
"The VT is using an incorrect syntax for its
|
|
72
|
+
"The VT is using an incorrect syntax for its copyright statement.",
|
|
73
73
|
results[0].message,
|
|
74
74
|
)
|
|
75
75
|
|
|
@@ -84,6 +84,6 @@ class CheckScriptCopyrightTestCase(PluginTestCase):
|
|
|
84
84
|
self.assertEqual(len(results), 1)
|
|
85
85
|
self.assertIsInstance(results[0], LinterError)
|
|
86
86
|
self.assertIn(
|
|
87
|
-
"The VT is using an incorrect syntax for its
|
|
87
|
+
"The VT is using an incorrect syntax for its copyright statement.",
|
|
88
88
|
results[0].message,
|
|
89
89
|
)
|
|
@@ -68,7 +68,7 @@ class CheckScriptVersionAndLastModificationTagsTestCase(PluginTestCase):
|
|
|
68
68
|
results[0].message,
|
|
69
69
|
)
|
|
70
70
|
self.assertEqual(
|
|
71
|
-
|
|
71
|
+
'VT is is using a wrong syntax for script_tag(name:"last_modification".',
|
|
72
72
|
results[1].message,
|
|
73
73
|
)
|
|
74
74
|
|
|
@@ -91,7 +91,7 @@ class CheckScriptVersionAndLastModificationTagsTestCase(PluginTestCase):
|
|
|
91
91
|
results[0].message,
|
|
92
92
|
)
|
|
93
93
|
self.assertEqual(
|
|
94
|
-
|
|
94
|
+
'VT is is using a wrong syntax for script_tag(name:"last_modification".',
|
|
95
95
|
results[1].message,
|
|
96
96
|
)
|
|
97
97
|
|
|
@@ -86,7 +86,7 @@ class CheckScriptXrefUrlTestCase(PluginTestCase):
|
|
|
86
86
|
self.assertEqual(len(results), 1)
|
|
87
87
|
self.assertIsInstance(results[0], LinterError)
|
|
88
88
|
self.assertEqual(
|
|
89
|
-
'script_xref(name:"URL", value:"www.example.com");: Invalid URL
|
|
89
|
+
'script_xref(name:"URL", value:"www.example.com");: Invalid URL value',
|
|
90
90
|
results[0].message,
|
|
91
91
|
)
|
|
92
92
|
|
|
@@ -84,7 +84,7 @@ class CheckSecurityMessagesTestCase(PluginTestCase):
|
|
|
84
84
|
self.assertEqual(len(results), 1)
|
|
85
85
|
self.assertIsInstance(results[0], LinterError)
|
|
86
86
|
self.assertEqual(
|
|
87
|
-
"VT is using a security_message or implementing
|
|
87
|
+
"VT is using a security_message or implementing function in a VT without severity",
|
|
88
88
|
results[0].message,
|
|
89
89
|
)
|
|
90
90
|
|
|
@@ -106,7 +106,7 @@ class CheckSecurityMessagesTestCase(PluginTestCase):
|
|
|
106
106
|
self.assertEqual(len(results), 1)
|
|
107
107
|
self.assertIsInstance(results[0], LinterError)
|
|
108
108
|
self.assertEqual(
|
|
109
|
-
"VT is using a security_message or implementing
|
|
109
|
+
"VT is using a security_message or implementing function in a VT without severity",
|
|
110
110
|
results[0].message,
|
|
111
111
|
)
|
|
112
112
|
|
|
@@ -129,7 +129,7 @@ class CheckSecurityMessagesTestCase(PluginTestCase):
|
|
|
129
129
|
self.assertEqual(len(results), 1)
|
|
130
130
|
self.assertIsInstance(results[0], LinterError)
|
|
131
131
|
self.assertEqual(
|
|
132
|
-
"VT is using a security_message or implementing
|
|
132
|
+
"VT is using a security_message or implementing function in a VT without severity",
|
|
133
133
|
results[0].message,
|
|
134
134
|
)
|
|
135
135
|
|
|
@@ -98,7 +98,7 @@ class CheckUsingDisplayTestCase(PluginTestCase):
|
|
|
98
98
|
def test_using_debug_if_display(self):
|
|
99
99
|
"""Test that display() inside a debug if statement is allowed"""
|
|
100
100
|
path = Path("some/file.nasl")
|
|
101
|
-
content = ' script_tag(name:"cvss_base", value:"4.0");\
|
|
101
|
+
content = ' script_tag(name:"cvss_base", value:"4.0");\nif (debug) display("FOO");\n'
|
|
102
102
|
fake_context = self.create_file_plugin_context(nasl_file=path, file_content=content)
|
|
103
103
|
plugin = CheckUsingDisplay(fake_context)
|
|
104
104
|
|
|
@@ -127,6 +127,6 @@ class CheckVTPlacementTestCase(PluginTestCase):
|
|
|
127
127
|
self.assertEqual(len(results), 1)
|
|
128
128
|
self.assertIsInstance(results[0], LinterError)
|
|
129
129
|
self.assertEqual(
|
|
130
|
-
"VT should be
|
|
130
|
+
f"VT should be placed in the root directory ({tempdir}).",
|
|
131
131
|
results[0].message,
|
|
132
132
|
)
|
{troubadix-26.1.0 → troubadix-26.2.0}/tests/standalone_plugins/changed_packages/test_package.py
RENAMED
|
@@ -62,6 +62,8 @@ class PackageTestCase(TestCase):
|
|
|
62
62
|
package = Package("foo", "1.2.3", "DEB10")
|
|
63
63
|
other_package = Package("foo", "1.2.3", "DEB10")
|
|
64
64
|
|
|
65
|
+
# Code security alert
|
|
66
|
+
# Impossible to avert because no "assertLessFalse" function exists
|
|
65
67
|
self.assertFalse(package < other_package)
|
|
66
68
|
self.assertFalse(package > other_package)
|
|
67
69
|
|
|
@@ -70,4 +72,43 @@ class PackageTestCase(TestCase):
|
|
|
70
72
|
other_package = Package("a", "1.2.3", "DEB11")
|
|
71
73
|
|
|
72
74
|
self.assertLess(package, other_package)
|
|
75
|
+
# Code security alert
|
|
76
|
+
# Impossible to avert because no "assertLessFalse" function exists
|
|
73
77
|
self.assertFalse(other_package < package)
|
|
78
|
+
|
|
79
|
+
def test_le_equal(self):
|
|
80
|
+
package = Package("a", "1.2.3", "DEB10")
|
|
81
|
+
other_package = Package("a", "1.2.3", "DEB10")
|
|
82
|
+
|
|
83
|
+
self.assertLessEqual(package, other_package)
|
|
84
|
+
# Code security alert
|
|
85
|
+
# Impossible to avert because no "assertLessEqualFalse" function exists
|
|
86
|
+
self.assertFalse(other_package < package)
|
|
87
|
+
self.assertFalse(package < other_package)
|
|
88
|
+
|
|
89
|
+
def test_le_lesser_by_name(self):
|
|
90
|
+
package = Package("a", "1.2.3", "DEB10")
|
|
91
|
+
other_package = Package("b", "1.2.3", "DEB10")
|
|
92
|
+
|
|
93
|
+
self.assertLessEqual(package, other_package)
|
|
94
|
+
# Code security alert
|
|
95
|
+
# Impossible to avert because no "assertLessEqualFalse" function exists
|
|
96
|
+
self.assertFalse(other_package <= package)
|
|
97
|
+
|
|
98
|
+
def test_le_lesser_by_release(self):
|
|
99
|
+
package = Package("a", "1.2.3", "DEB10")
|
|
100
|
+
other_package = Package("a", "1.2.3", "DEB11")
|
|
101
|
+
|
|
102
|
+
self.assertLessEqual(package, other_package)
|
|
103
|
+
# Code security alert
|
|
104
|
+
# Impossible to avert because no "assertLessEqualFalse" function exists
|
|
105
|
+
self.assertFalse(other_package <= package)
|
|
106
|
+
|
|
107
|
+
def test_le_lesser_by_version(self):
|
|
108
|
+
package = Package("a", "1.2.3", "DEB10")
|
|
109
|
+
other_package = Package("a", "1.2.4", "DEB10")
|
|
110
|
+
|
|
111
|
+
self.assertLessEqual(package, other_package)
|
|
112
|
+
# Code security alert
|
|
113
|
+
# Impossible to avert because no "assertLessEqualFalse" function exists
|
|
114
|
+
self.assertFalse(other_package <= package)
|
{troubadix-26.1.0 → troubadix-26.2.0}/tests/standalone_plugins/test_changed_creation_date.py
RENAMED
|
@@ -21,11 +21,9 @@ TEST_FILES = [Path("test.nasl")]
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
class TestChangedCreationDate(unittest.TestCase):
|
|
24
|
-
|
|
25
24
|
@patch("troubadix.standalone_plugins.changed_creation_date.Path.exists")
|
|
26
25
|
@patch("troubadix.standalone_plugins.changed_creation_date.git")
|
|
27
26
|
def test_check_creation_date_ok(self, mock_git, mock_exists):
|
|
28
|
-
|
|
29
27
|
mock_git.return_value = (
|
|
30
28
|
'-script_tag(name:"creation_date",'
|
|
31
29
|
' value:"2025-03-04 10:00:00 +0200 (Tue, 04 Mar 2025)");\n'
|
|
@@ -40,7 +38,6 @@ class TestChangedCreationDate(unittest.TestCase):
|
|
|
40
38
|
@patch("troubadix.standalone_plugins.changed_creation_date.Path.exists")
|
|
41
39
|
@patch("troubadix.standalone_plugins.changed_creation_date.git")
|
|
42
40
|
def test_check_creation_date_fail(self, mock_git, mock_exists):
|
|
43
|
-
|
|
44
41
|
mock_git.return_value = (
|
|
45
42
|
'-script_tag(name:"creation_date",'
|
|
46
43
|
' value:"2025-03-04 10:00:00 +0200 (Tue, 04 Mar 2025)");\n'
|
|
@@ -54,7 +51,6 @@ class TestChangedCreationDate(unittest.TestCase):
|
|
|
54
51
|
@patch("troubadix.standalone_plugins.changed_creation_date.Path.exists")
|
|
55
52
|
@patch("troubadix.standalone_plugins.changed_creation_date.git")
|
|
56
53
|
def test_creation_date_not_modified_lines_added(self, mock_git, mock_exists):
|
|
57
|
-
|
|
58
54
|
mock_git.return_value = (
|
|
59
55
|
'-script_tag(name:"creation_date",'
|
|
60
56
|
' value:"2025-03-04 10:00:00 +0200 (Tue, 04 Mar 2025)");\n'
|
|
@@ -69,7 +65,6 @@ class TestChangedCreationDate(unittest.TestCase):
|
|
|
69
65
|
@patch("troubadix.standalone_plugins.changed_creation_date.Path.exists")
|
|
70
66
|
@patch("troubadix.standalone_plugins.changed_creation_date.git")
|
|
71
67
|
def test_creation_date_not_modified_lines_removed(self, mock_git, mock_exists):
|
|
72
|
-
|
|
73
68
|
mock_git.return_value = '-script_tag(name:"This got removed", value:"Nothing");'
|
|
74
69
|
mock_exists.return_value = True
|
|
75
70
|
|
|
@@ -78,7 +73,6 @@ class TestChangedCreationDate(unittest.TestCase):
|
|
|
78
73
|
@patch("troubadix.standalone_plugins.changed_creation_date.Path.exists")
|
|
79
74
|
@patch("troubadix.standalone_plugins.changed_creation_date.git")
|
|
80
75
|
def test_creation_date_added_not_removed(self, mock_git, mock_exists):
|
|
81
|
-
|
|
82
76
|
mock_git.return_value = (
|
|
83
77
|
'+script_tag(name:"This got added", value:"Something");\n'
|
|
84
78
|
'+script_tag(name:"creation_date", '
|
|
@@ -98,7 +92,6 @@ class TestChangedCreationDate(unittest.TestCase):
|
|
|
98
92
|
@patch("troubadix.standalone_plugins.changed_creation_date.git")
|
|
99
93
|
@patch("troubadix.standalone_plugins.changed_creation_date.ArgumentParser.parse_args")
|
|
100
94
|
def test_args_ok(self, mock_parse_args, mock_git):
|
|
101
|
-
|
|
102
95
|
mock_parse_args.return_value = Namespace(commit_range="main..test", files=[])
|
|
103
96
|
mock_git.return_value = "test1.nasl\ntest2.nasl\ntest3.txt"
|
|
104
97
|
|
|
@@ -121,7 +114,6 @@ class TestChangedCreationDate(unittest.TestCase):
|
|
|
121
114
|
@patch("troubadix.standalone_plugins.changed_creation_date.os.chdir")
|
|
122
115
|
@patch("troubadix.standalone_plugins.changed_creation_date.git")
|
|
123
116
|
def test_main_check_creation_date_ok(self, mock_git, _, mock_check_creation_date, __):
|
|
124
|
-
|
|
125
117
|
mock_git.return_value = "test_directory"
|
|
126
118
|
mock_check_creation_date.return_value = 0
|
|
127
119
|
|
|
@@ -132,7 +124,6 @@ class TestChangedCreationDate(unittest.TestCase):
|
|
|
132
124
|
@patch("troubadix.standalone_plugins.changed_creation_date.os.chdir")
|
|
133
125
|
@patch("troubadix.standalone_plugins.changed_creation_date.git")
|
|
134
126
|
def test_main_check_creation_date_fail(self, mock_git, _, mock_check_creation_date, __):
|
|
135
|
-
|
|
136
127
|
mock_git.return_value = "test_directory"
|
|
137
128
|
mock_check_creation_date.return_value = 2
|
|
138
129
|
|
|
@@ -154,8 +154,7 @@ class DeprecateVTsTestCase(unittest.TestCase):
|
|
|
154
154
|
self.assertNotIn(result, "script_dependencies")
|
|
155
155
|
self.assertNotIn(result, 'include("revisions-lib.inc");')
|
|
156
156
|
assert (
|
|
157
|
-
"\n\n Note: This VT has been deprecated and replaced by "
|
|
158
|
-
"a Notus scanner based one."
|
|
157
|
+
"\n\n Note: This VT has been deprecated and replaced by a Notus scanner based one."
|
|
159
158
|
) in result
|
|
160
159
|
|
|
161
160
|
def test_deprecate_with_oid_mapping(self):
|
|
@@ -222,7 +221,7 @@ class DeprecateVTsTestCase(unittest.TestCase):
|
|
|
222
221
|
]
|
|
223
222
|
deprecate(out_dir, to_deprecate, "NOTUS")
|
|
224
223
|
self.assertLogs(
|
|
225
|
-
"Unable to deprecate testfile1.nasl. There are still KB keys
|
|
224
|
+
"Unable to deprecate testfile1.nasl. There are still KB keys remaining."
|
|
226
225
|
)
|
|
227
226
|
|
|
228
227
|
def test_get_summary(self):
|
|
@@ -235,7 +234,6 @@ class DeprecateVTsTestCase(unittest.TestCase):
|
|
|
235
234
|
self.assertEqual(result, expected)
|
|
236
235
|
|
|
237
236
|
def test_finalize_content(self):
|
|
238
|
-
|
|
239
237
|
result = _finalize_content(NASL_CONTENT)
|
|
240
238
|
expected = (
|
|
241
239
|
'...if(description)\n{\n script_oid("1.3.6.1.4.1.25623.1.0.910673");\n '
|
|
@@ -71,8 +71,7 @@ class UpdateTestCase(unittest.TestCase):
|
|
|
71
71
|
terminal = MagicMock()
|
|
72
72
|
with TemporaryDirectory() as tempdir:
|
|
73
73
|
content = (
|
|
74
|
-
' script_version("foo");\n'
|
|
75
|
-
' script_tag(name: "last_modification", value: "bar");\n'
|
|
74
|
+
' script_version("foo");\n script_tag(name: "last_modification", value: "bar");\n'
|
|
76
75
|
)
|
|
77
76
|
testfile1 = tempdir / "testfile1.nasl"
|
|
78
77
|
testfile1.write_text(content, encoding="utf8")
|
|
@@ -91,7 +91,7 @@ class GetPathFromRootTestCase(unittest.TestCase):
|
|
|
91
91
|
# pylint: disable=expression-not-assigned
|
|
92
92
|
def test_no_root_path(self):
|
|
93
93
|
with self.assertRaises(ValueError):
|
|
94
|
-
get_path_from_root(Path("nasl/foo/bar"), Path("nasl/baz/bar"))
|
|
94
|
+
get_path_from_root(Path("nasl/foo/bar"), Path("nasl/baz/bar"))
|
|
95
95
|
|
|
96
96
|
with self.assertRaises(ValueError):
|
|
97
|
-
get_path_from_root(Path("/nasl/foo/bar"), Path("/nasl/baz/bar"))
|
|
97
|
+
get_path_from_root(Path("/nasl/foo/bar"), Path("/nasl/baz/bar"))
|
|
@@ -184,7 +184,7 @@ class TestRunner(unittest.TestCase):
|
|
|
184
184
|
output,
|
|
185
185
|
)
|
|
186
186
|
self.assertIn(
|
|
187
|
-
"Results for plugin
|
|
187
|
+
"Results for plugin check_script_version_and_last_modification_tags",
|
|
188
188
|
output,
|
|
189
189
|
)
|
|
190
190
|
# CI terminal formats for 80 chars per line
|
|
@@ -243,7 +243,7 @@ class TestRunner(unittest.TestCase):
|
|
|
243
243
|
|
|
244
244
|
output = f.getvalue()
|
|
245
245
|
self.assertIn(
|
|
246
|
-
"Checking
|
|
246
|
+
f"Checking {get_path_from_root(nasl_file, self.root)}",
|
|
247
247
|
output,
|
|
248
248
|
)
|
|
249
249
|
self.assertNotIn("No results for plugin check_missing_desc_exit", output)
|
|
@@ -56,7 +56,7 @@ def check_date(date: str, date_name: str, file: str, plugin: str) -> Iterator[Li
|
|
|
56
56
|
elif week_day_str != week_day_parsed:
|
|
57
57
|
formatted_date = week_day_parsed
|
|
58
58
|
yield LinterError(
|
|
59
|
-
f"Wrong day of week. Please change it from '{week_day_str}
|
|
59
|
+
f"Wrong day of week. Please change it from '{week_day_str}' to '{formatted_date}'.",
|
|
60
60
|
file=file,
|
|
61
61
|
plugin=plugin,
|
|
62
62
|
)
|
|
@@ -65,7 +65,6 @@ def check_date(date: str, date_name: str, file: str, plugin: str) -> Iterator[Li
|
|
|
65
65
|
def compare_date_with_last_modification_date(
|
|
66
66
|
date: str, date_name: str, last_mod_date: str, file: str, plugin: str
|
|
67
67
|
) -> Iterator[LinterResult]:
|
|
68
|
-
|
|
69
68
|
yield from check_date(
|
|
70
69
|
last_mod_date,
|
|
71
70
|
"last_modification",
|
|
@@ -76,7 +75,7 @@ def compare_date_with_last_modification_date(
|
|
|
76
75
|
try:
|
|
77
76
|
if parse_date(date) > parse_date(last_mod_date):
|
|
78
77
|
yield LinterError(
|
|
79
|
-
f"The {date_name} must not be greater than
|
|
78
|
+
f"The {date_name} must not be greater than last_modification date.",
|
|
80
79
|
file=file,
|
|
81
80
|
plugin=plugin,
|
|
82
81
|
)
|
|
@@ -101,7 +101,7 @@ class CheckCopyrightText(FileContentPlugin):
|
|
|
101
101
|
nasl_file.write_text(data=self.new_file_content, encoding=CURRENT_ENCODING)
|
|
102
102
|
|
|
103
103
|
yield LinterFix(
|
|
104
|
-
f"The copyright statement has been updated to
|
|
104
|
+
f"The copyright statement has been updated to {CORRECT_COPYRIGHT_PHRASE}",
|
|
105
105
|
file=nasl_file,
|
|
106
106
|
plugin=self.name,
|
|
107
107
|
)
|
|
@@ -77,7 +77,7 @@ class CheckDependencies(FilePlugin):
|
|
|
77
77
|
for dep in split_dependencies(match.group("value")):
|
|
78
78
|
if not any((root / vers / dep).exists() for vers in FEED_VERSIONS):
|
|
79
79
|
yield LinterError(
|
|
80
|
-
f"The script dependency {dep} could not
|
|
80
|
+
f"The script dependency {dep} could not be found within the VTs.",
|
|
81
81
|
file=self.context.nasl_file,
|
|
82
82
|
plugin=self.name,
|
|
83
83
|
)
|
|
@@ -132,7 +132,7 @@ class CheckDependencyCategoryOrder(FileContentPlugin):
|
|
|
132
132
|
|
|
133
133
|
if not dependency_path:
|
|
134
134
|
yield LinterError(
|
|
135
|
-
f"The script dependency {dep} could not
|
|
135
|
+
f"The script dependency {dep} could not be found within the VTs.",
|
|
136
136
|
file=nasl_file,
|
|
137
137
|
plugin=self.name,
|
|
138
138
|
)
|