troubadix 25.9.1__tar.gz → 25.10.7__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-25.9.1 → troubadix-25.10.7}/PKG-INFO +4 -2
- {troubadix-25.9.1 → troubadix-25.10.7}/pyproject.toml +2 -2
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_grammar.py +56 -28
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_script_add_preference_type.py +53 -4
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/__version__.py +1 -1
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/badwords.py +3 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/grammar.py +13 -2
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/script_add_preference_type.py +43 -22
- {troubadix-25.9.1 → troubadix-25.10.7}/LICENSE +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/README.md +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/__init__.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/helper/__init__.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/helper/test_date_format.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/helper/test_if_block_parser.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/helper/test_linguistic_exception_handler.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/helper/test_patterns.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/helper/test_remove_comments.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/helper/test_text_utils.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/manual_tests/comment_removal_diff.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/__init__.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/fail.nasl +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/fail2.nasl +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test.nasl +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_badwords.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_copyright_text.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_copyright_year.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_creation_date.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_cve_format.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_cvss_format.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_dependencies.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_dependency_category_order.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_deprecated_dependency.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_deprecated_functions.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_double_end_points.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_duplicate_oid.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_duplicated_script_tags.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_encoding.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_files/fail_bad_new_line.nasl +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_files/fail_badwords.nasl +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_files/fail_name_and_copyright_newline.nasl +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_files/fail_name_newline.nasl +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_files/fail_permissions.nasl +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_files/fail_spelling.nasl +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_files/nasl/21.04/fail.nasl +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_files/nasl/21.04/fail_badwords.nasl +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_files/nasl/21.04/fail_name_and_copyright_newline.nasl +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_files/nasl/21.04/fail_name_newline.nasl +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_files/nasl/21.04/fail_solution_template.nasl +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_files/nasl/21.04/runner/fail.nasl +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_files/nasl/21.04/runner/fail2.nasl +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_files/nasl/21.04/runner/test.nasl +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_files/nasl/21.04/runner/test_valid_oid.nasl +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_files/nasl/21.04/test.inc +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_files/nasl/21.04/test.nasl +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_files/nasl/warning.nasl +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_files/ok_permissions.nasl +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_files/test_oid.nasl +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_forking_nasl_functions.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_get_kb_on_services.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_http_links_in_tags.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_if_statement_syntax.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_illegal_characters.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_log_messages.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_malformed_dependencies.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_misplaced_compare_in_if.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_missing_desc_exit.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_missing_tag_solution.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_multiple_re_parameters.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_newlines.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_overlong_description_lines.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_overlong_script_tags.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_prod_svc_detect_in_vulnvt.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_qod.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_reporting_consistency.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_script_calls_empty_values.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_script_calls_recommended.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_script_category.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_script_copyright.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_script_family.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_script_tag_form.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_script_tag_whitespaces.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_script_tags_mandatory.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_script_version_and_last_modification_tags.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_script_xref_form.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_script_xref_url.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_security_messages.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_set_get_kb_calls.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_severity_date.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_severity_format.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_severity_origin.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_solution_text.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_solution_type.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_spaces_before_dots.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_spaces_in_filename.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_spelling.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_tabs.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_todo_tbd.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_trailing_spaces_tabs.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_using_display.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_valid_oid.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_valid_script_tag_names.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_variable_redefinition_in_foreach.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_vt_file_permissions.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_vt_placement.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/standalone_plugins/__init__.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/standalone_plugins/changed_packages/__init__.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/standalone_plugins/changed_packages/markers/__init__.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/standalone_plugins/changed_packages/markers/test_added_epoch.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/standalone_plugins/changed_packages/markers/test_added_release.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/standalone_plugins/changed_packages/markers/test_added_udeb.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/standalone_plugins/changed_packages/markers/test_changed_update.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/standalone_plugins/changed_packages/markers/test_dropped_architecture.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/standalone_plugins/changed_packages/test_changed_packages.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/standalone_plugins/changed_packages/test_package.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/standalone_plugins/nasl/21.04/21_script.nasl +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/standalone_plugins/nasl/22.04/22_script.nasl +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/standalone_plugins/nasl/common/bar.nasl +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/standalone_plugins/nasl/common/foo.nasl +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/standalone_plugins/nasl/common/foobar.nasl +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/standalone_plugins/nasl/common/gsf/enterprise_script.nasl +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/standalone_plugins/test_changed_creation_date.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/standalone_plugins/test_changed_cves.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/standalone_plugins/test_changed_oid.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/standalone_plugins/test_dependency_graph.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/standalone_plugins/test_deprecate_vts.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/standalone_plugins/test_file_extensions.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/standalone_plugins/test_last_modification.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/standalone_plugins/test_no_solution.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/standalone_plugins/test_version_updated.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/test_argparser.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/test_helper.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/test_naslinter.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/test_reporter.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/test_results.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/tests/test_runner.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/__init__.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/argparser.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/codespell/codespell.additions +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/codespell/codespell.exclude +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/codespell/codespell.ignore +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/helper/__init__.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/helper/date_format.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/helper/helper.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/helper/if_block_parser.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/helper/linguistic_exception_handler.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/helper/patterns.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/helper/remove_comments.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/helper/text_utils.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugin.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/__init__.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/copyright_text.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/copyright_year.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/creation_date.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/cve_format.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/cvss_format.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/dependencies.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/dependency_category_order.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/deprecated_dependency.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/deprecated_functions.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/double_end_points.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/duplicate_oid.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/duplicated_script_tags.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/encoding.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/forking_nasl_functions.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/get_kb_on_services.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/http_links_in_tags.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/if_statement_syntax.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/illegal_characters.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/log_messages.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/malformed_dependencies.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/misplaced_compare_in_if.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/missing_desc_exit.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/missing_tag_solution.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/multiple_re_parameters.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/newlines.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/overlong_description_lines.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/overlong_script_tags.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/prod_svc_detect_in_vulnvt.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/qod.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/reporting_consistency.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/script_calls_empty_values.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/script_calls_recommended.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/script_category.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/script_copyright.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/script_family.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/script_tag_form.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/script_tag_whitespaces.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/script_tags_mandatory.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/script_version_and_last_modification_tags.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/script_xref_form.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/script_xref_url.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/security_messages.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/set_get_kb_calls.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/severity_date.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/severity_format.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/severity_origin.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/solution_text.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/solution_type.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/spaces_before_dots.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/spaces_in_filename.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/spelling.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/tabs.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/todo_tbd.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/trailing_spaces_tabs.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/using_display.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/valid_oid.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/valid_script_tag_names.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/variable_assigned_in_if.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/variable_redefinition_in_foreach.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/vt_file_permissions.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/plugins/vt_placement.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/reporter.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/results.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/runner.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/standalone_plugins/__init__.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/standalone_plugins/allowed_rev_diff.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/standalone_plugins/changed_creation_date.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/standalone_plugins/changed_cves.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/standalone_plugins/changed_oid.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/standalone_plugins/changed_packages/changed_packages.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/standalone_plugins/changed_packages/marker/__init__.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/standalone_plugins/changed_packages/marker/added_epoch.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/standalone_plugins/changed_packages/marker/added_release.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/standalone_plugins/changed_packages/marker/added_udeb.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/standalone_plugins/changed_packages/marker/changed_update.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/standalone_plugins/changed_packages/marker/dropped_architecture.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/standalone_plugins/changed_packages/marker/marker.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/standalone_plugins/changed_packages/package.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/standalone_plugins/common.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/standalone_plugins/dependency_graph/__init__.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/standalone_plugins/dependency_graph/checks.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/standalone_plugins/dependency_graph/cli.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/standalone_plugins/dependency_graph/dependency_graph.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/standalone_plugins/dependency_graph/models.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/standalone_plugins/deprecate_vts.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/standalone_plugins/file_extensions.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/standalone_plugins/last_modification.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/standalone_plugins/no_solution.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/standalone_plugins/util.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/standalone_plugins/version_updated.py +0 -0
- {troubadix-25.9.1 → troubadix-25.10.7}/troubadix/troubadix.py +0 -0
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: troubadix
|
|
3
|
-
Version: 25.
|
|
3
|
+
Version: 25.10.7
|
|
4
4
|
Summary: A linting and QA check tool for NASL files
|
|
5
5
|
License: GPL-3.0-or-later
|
|
6
|
+
License-File: LICENSE
|
|
6
7
|
Author: Greenbone
|
|
7
8
|
Author-email: info@greenbone.net
|
|
8
9
|
Requires-Python: >=3.10,<4.0
|
|
@@ -16,6 +17,7 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
16
17
|
Classifier: Programming Language :: Python :: 3.11
|
|
17
18
|
Classifier: Programming Language :: Python :: 3.12
|
|
18
19
|
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
19
21
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
20
22
|
Requires-Dist: chardet (>=4,<6)
|
|
21
23
|
Requires-Dist: charset-normalizer (>=3.2.0,<4.0.0)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "troubadix"
|
|
3
|
-
version = "25.
|
|
3
|
+
version = "25.10.7"
|
|
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"
|
|
@@ -37,7 +37,7 @@ networkx = "^3.4.2"
|
|
|
37
37
|
[tool.poetry.group.dev.dependencies]
|
|
38
38
|
autohooks = ">=21.7.0"
|
|
39
39
|
autohooks-plugin-black = ">=21.12.0"
|
|
40
|
-
ruff = ">=0.5.6,<0.
|
|
40
|
+
ruff = ">=0.5.6,<0.15.0"
|
|
41
41
|
autohooks-plugin-ruff = ">=24.1,<26.0"
|
|
42
42
|
|
|
43
43
|
[tool.black]
|
|
@@ -67,8 +67,9 @@ class CheckNewlinesTestCase(PluginTestCase):
|
|
|
67
67
|
self.assertEqual(len(results), 1)
|
|
68
68
|
self.assertIsInstance(results[0], LinterError)
|
|
69
69
|
self.assertEqual(
|
|
70
|
-
"VT/Include has the following grammar problem
|
|
71
|
-
"
|
|
70
|
+
"VT/Include has the following grammar problem:\n"
|
|
71
|
+
"- Hit: is prone to a security bypass vulnerabilities\n"
|
|
72
|
+
"- Full line: # is prone to a security bypass vulnerabilities",
|
|
72
73
|
results[0].message,
|
|
73
74
|
)
|
|
74
75
|
|
|
@@ -93,15 +94,17 @@ class CheckNewlinesTestCase(PluginTestCase):
|
|
|
93
94
|
self.assertEqual(len(results), 2)
|
|
94
95
|
self.assertIsInstance(results[0], LinterError)
|
|
95
96
|
self.assertEqual(
|
|
96
|
-
"VT/Include has the following grammar problem
|
|
97
|
-
"
|
|
97
|
+
"VT/Include has the following grammar problem:\n"
|
|
98
|
+
"- Hit: is prone to a security bypass vulnerabilities\n"
|
|
99
|
+
"- Full line: # is prone to a security bypass vulnerabilities",
|
|
98
100
|
results[0].message,
|
|
99
101
|
)
|
|
100
102
|
|
|
101
103
|
self.assertIsInstance(results[1], LinterError)
|
|
102
104
|
self.assertEqual(
|
|
103
|
-
"VT/Include has the following grammar problem
|
|
104
|
-
"
|
|
105
|
+
"VT/Include has the following grammar problem:\n"
|
|
106
|
+
"- Hit: refer the Reference\n"
|
|
107
|
+
"- Full line: # refer the Reference",
|
|
105
108
|
results[1].message,
|
|
106
109
|
)
|
|
107
110
|
|
|
@@ -126,9 +129,10 @@ class CheckNewlinesTestCase(PluginTestCase):
|
|
|
126
129
|
self.assertEqual(len(results), 1)
|
|
127
130
|
self.assertIsInstance(results[0], LinterError)
|
|
128
131
|
self.assertEqual(
|
|
129
|
-
"VT/Include has the following grammar problem
|
|
130
|
-
|
|
131
|
-
'
|
|
132
|
+
"VT/Include has the following grammar problem:\n"
|
|
133
|
+
"- Hit: is prone a\n"
|
|
134
|
+
'- Full line: script_tag(name:"summary", value:"Adobe Digital '
|
|
135
|
+
'Edition is prone a to denial of service (DoS) vulnerability.");',
|
|
132
136
|
results[0].message,
|
|
133
137
|
)
|
|
134
138
|
|
|
@@ -153,9 +157,10 @@ class CheckNewlinesTestCase(PluginTestCase):
|
|
|
153
157
|
self.assertEqual(len(results), 1)
|
|
154
158
|
self.assertIsInstance(results[0], LinterError)
|
|
155
159
|
self.assertEqual(
|
|
156
|
-
"VT/Include has the following grammar problem
|
|
157
|
-
|
|
158
|
-
'
|
|
160
|
+
"VT/Include has the following grammar problem:\n"
|
|
161
|
+
"- Hit: is prone an\n"
|
|
162
|
+
'- Full line: script_tag(name:"summary", value:"Splunk Enterprise '
|
|
163
|
+
'is prone an open redirect vulnerability.");',
|
|
159
164
|
results[0].message,
|
|
160
165
|
)
|
|
161
166
|
|
|
@@ -180,9 +185,10 @@ class CheckNewlinesTestCase(PluginTestCase):
|
|
|
180
185
|
self.assertEqual(len(results), 1)
|
|
181
186
|
self.assertIsInstance(results[0], LinterError)
|
|
182
187
|
self.assertEqual(
|
|
183
|
-
"VT/Include has the following grammar problem
|
|
184
|
-
|
|
185
|
-
'
|
|
188
|
+
"VT/Include has the following grammar problem:\n"
|
|
189
|
+
"- Hit: multiple HTTP GET request\n"
|
|
190
|
+
'- Full line: script_tag(name:"vuldetect", value:"Sends multiple '
|
|
191
|
+
'HTTP GET request and checks the responses.");',
|
|
186
192
|
results[0].message,
|
|
187
193
|
)
|
|
188
194
|
|
|
@@ -206,9 +212,10 @@ class CheckNewlinesTestCase(PluginTestCase):
|
|
|
206
212
|
self.assertEqual(len(results), 1)
|
|
207
213
|
self.assertIsInstance(results[0], LinterError)
|
|
208
214
|
self.assertEqual(
|
|
209
|
-
"VT/Include has the following grammar problem
|
|
210
|
-
|
|
211
|
-
'
|
|
215
|
+
"VT/Include has the following grammar problem:\n"
|
|
216
|
+
"- Hit: multiple unknown vulnerability.\n"
|
|
217
|
+
'- Full line: script_tag(name:"summary", value:"Foo Bar is prone '
|
|
218
|
+
'to multiple unknown vulnerability.");',
|
|
212
219
|
results[0].message,
|
|
213
220
|
)
|
|
214
221
|
|
|
@@ -232,9 +239,10 @@ class CheckNewlinesTestCase(PluginTestCase):
|
|
|
232
239
|
self.assertEqual(len(results), 1)
|
|
233
240
|
self.assertIsInstance(results[0], LinterError)
|
|
234
241
|
self.assertEqual(
|
|
235
|
-
"VT/Include has the following grammar problem
|
|
236
|
-
|
|
237
|
-
'
|
|
242
|
+
"VT/Include has the following grammar problem:\n"
|
|
243
|
+
"- Hit: to a to a\n"
|
|
244
|
+
'- Full line: script_tag(name:"summary", value:"Foo Bar is prone '
|
|
245
|
+
'to a to a remote denial-of-service vulnerability.");',
|
|
238
246
|
results[0].message,
|
|
239
247
|
)
|
|
240
248
|
|
|
@@ -258,9 +266,10 @@ class CheckNewlinesTestCase(PluginTestCase):
|
|
|
258
266
|
self.assertEqual(len(results), 1)
|
|
259
267
|
self.assertIsInstance(results[0], LinterError)
|
|
260
268
|
self.assertEqual(
|
|
261
|
-
"VT/Include has the following grammar problem
|
|
262
|
-
|
|
263
|
-
'
|
|
269
|
+
"VT/Include has the following grammar problem:\n"
|
|
270
|
+
"- Hit: in the in the\n"
|
|
271
|
+
'- Full line: script_tag(name:"insight", value:"- CVE-2022-31702: '
|
|
272
|
+
'Command injection in the in the vRNI REST API.");',
|
|
264
273
|
results[0].message,
|
|
265
274
|
)
|
|
266
275
|
|
|
@@ -269,7 +278,7 @@ class CheckNewlinesTestCase(PluginTestCase):
|
|
|
269
278
|
content = (
|
|
270
279
|
' script_tag(name:"cvss_base", value:"4.0");\n'
|
|
271
280
|
' script_tag(name:"solution", value:"Update to version to version '
|
|
272
|
-
'
|
|
281
|
+
'1.2.3 or later.");\n'
|
|
273
282
|
' script_tag(name:"solution_type", value:"VendorFix");\n'
|
|
274
283
|
' script_tag(name:"solution", value:"meh");\n'
|
|
275
284
|
)
|
|
@@ -284,9 +293,10 @@ class CheckNewlinesTestCase(PluginTestCase):
|
|
|
284
293
|
self.assertEqual(len(results), 1)
|
|
285
294
|
self.assertIsInstance(results[0], LinterError)
|
|
286
295
|
self.assertEqual(
|
|
287
|
-
"VT/Include has the following grammar problem
|
|
288
|
-
|
|
289
|
-
'
|
|
296
|
+
"VT/Include has the following grammar problem:\n"
|
|
297
|
+
"- Hit: to version to version\n"
|
|
298
|
+
'- Full line: script_tag(name:"solution", value:"Update to version '
|
|
299
|
+
'to version 1.2.3 or later.");',
|
|
290
300
|
results[0].message,
|
|
291
301
|
)
|
|
292
302
|
|
|
@@ -327,3 +337,21 @@ class CheckNewlinesTestCase(PluginTestCase):
|
|
|
327
337
|
results = list(plugin.run())
|
|
328
338
|
|
|
329
339
|
self.assertEqual(len(results), 0)
|
|
340
|
+
|
|
341
|
+
def test_grammar_fp2(self):
|
|
342
|
+
nasl_file = Path(__file__).parent / "test.nasl"
|
|
343
|
+
content = (
|
|
344
|
+
' script_tag(name:"cvss_base", value:"4.0");\n'
|
|
345
|
+
' script_tag(name:"insight", value:"Nadav Markus and Or Cohen of '
|
|
346
|
+
"Palo Alto Networks discovered\n"
|
|
347
|
+
' script_tag(name:"solution_type", value:"VendorFix");\n'
|
|
348
|
+
' script_tag(name:"solution", value:"meh");\n'
|
|
349
|
+
)
|
|
350
|
+
fake_context = self.create_file_plugin_context(
|
|
351
|
+
nasl_file=nasl_file, file_content=content
|
|
352
|
+
)
|
|
353
|
+
plugin = CheckGrammar(fake_context)
|
|
354
|
+
|
|
355
|
+
results = list(plugin.run())
|
|
356
|
+
|
|
357
|
+
self.assertEqual(len(results), 0)
|
|
@@ -19,6 +19,7 @@ from pathlib import Path
|
|
|
19
19
|
|
|
20
20
|
from troubadix.plugin import LinterError
|
|
21
21
|
from troubadix.plugins.script_add_preference_type import (
|
|
22
|
+
VALID_TYPES,
|
|
22
23
|
CheckScriptAddPreferenceType,
|
|
23
24
|
ValidType,
|
|
24
25
|
)
|
|
@@ -89,9 +90,57 @@ class CheckScriptAddPreferenceTypeTestCase(PluginTestCase):
|
|
|
89
90
|
self.assertEqual(len(results), 1)
|
|
90
91
|
self.assertIsInstance(results[0], LinterError)
|
|
91
92
|
self.assertEqual(
|
|
92
|
-
"VT is using an invalid or misspelled
|
|
93
|
-
"
|
|
94
|
-
"
|
|
95
|
-
|
|
93
|
+
"VT is using an invalid or misspelled type "
|
|
94
|
+
f"(invalid) in {add_pref} \n"
|
|
95
|
+
f"Allowed are: {sorted(VALID_TYPES)}",
|
|
96
|
+
results[0].message,
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
def test_invalid_with_parameters_order(self):
|
|
100
|
+
add_pref = (
|
|
101
|
+
'script_add_preference(name:"File or Directory Name", '
|
|
102
|
+
'type:"string", value:"/home", id:1);'
|
|
103
|
+
)
|
|
104
|
+
path = Path("some/file.nasl")
|
|
105
|
+
content = (
|
|
106
|
+
' script_tag(name:"cvss_base", value:"4.0");\n'
|
|
107
|
+
' script_name("Foo Bar");\n'
|
|
108
|
+
f"{add_pref}\n"
|
|
109
|
+
)
|
|
110
|
+
fake_context = self.create_file_plugin_context(
|
|
111
|
+
nasl_file=path, file_content=content
|
|
112
|
+
)
|
|
113
|
+
plugin = CheckScriptAddPreferenceType(fake_context)
|
|
114
|
+
|
|
115
|
+
results = list(plugin.run())
|
|
116
|
+
|
|
117
|
+
self.assertEqual(len(results), 1)
|
|
118
|
+
self.assertIsInstance(results[0], LinterError)
|
|
119
|
+
self.assertEqual(
|
|
120
|
+
"VT is using an invalid or misspelled type "
|
|
121
|
+
f"(string) in {add_pref} \n"
|
|
122
|
+
f"Allowed are: {sorted(VALID_TYPES)}",
|
|
123
|
+
results[0].message,
|
|
124
|
+
)
|
|
125
|
+
|
|
126
|
+
def test_missing_type(self):
|
|
127
|
+
add_pref = 'script_add_preference(name:"File or Directory Name", value:"/home", id:1);'
|
|
128
|
+
path = Path("some/file.nasl")
|
|
129
|
+
content = (
|
|
130
|
+
' script_tag(name:"cvss_base", value:"4.0");\n'
|
|
131
|
+
' script_name("Foo Bar");\n'
|
|
132
|
+
f"{add_pref}\n"
|
|
133
|
+
)
|
|
134
|
+
fake_context = self.create_file_plugin_context(
|
|
135
|
+
nasl_file=path, file_content=content
|
|
136
|
+
)
|
|
137
|
+
plugin = CheckScriptAddPreferenceType(fake_context)
|
|
138
|
+
|
|
139
|
+
results = list(plugin.run())
|
|
140
|
+
|
|
141
|
+
self.assertEqual(len(results), 1)
|
|
142
|
+
self.assertIsInstance(results[0], LinterError)
|
|
143
|
+
self.assertEqual(
|
|
144
|
+
f"script_add_preference call is missing a 'type' parameter in '{add_pref}'",
|
|
96
145
|
results[0].message,
|
|
97
146
|
)
|
|
@@ -43,6 +43,7 @@ _IGNORE_FILES = [
|
|
|
43
43
|
"http_func.inc",
|
|
44
44
|
"misc_func.inc",
|
|
45
45
|
"OpenVAS_detect.nasl",
|
|
46
|
+
"gb_greenbone_os_consolidation.nasl",
|
|
46
47
|
]
|
|
47
48
|
|
|
48
49
|
EXCEPTIONS = [
|
|
@@ -79,6 +80,8 @@ EXCEPTIONS = [
|
|
|
79
80
|
"OpenVAS / Greenbone Vulnerability Manager",
|
|
80
81
|
"openvas_1808149858",
|
|
81
82
|
"OSPD-OpenVAS",
|
|
83
|
+
"OPENVAS SCAN",
|
|
84
|
+
"openvas_scan",
|
|
82
85
|
"evil.zip -> openvas.jsp",
|
|
83
86
|
'url = "/openvas.jsp";',
|
|
84
87
|
'if( "OpenVAS RCE Test" >< buf )',
|
|
@@ -110,6 +110,8 @@ exceptions = [
|
|
|
110
110
|
# The default has been changed to prompt the user each time a website
|
|
111
111
|
# requests a client certificate.
|
|
112
112
|
TextCheck("a website requests a client certificate"),
|
|
113
|
+
# This is actually a given name
|
|
114
|
+
TextCheck("and Or Cohen"),
|
|
113
115
|
]
|
|
114
116
|
|
|
115
117
|
|
|
@@ -208,14 +210,23 @@ class CheckGrammar(FilePlugin):
|
|
|
208
210
|
|
|
209
211
|
for match in pattern.finditer(self.context.file_content):
|
|
210
212
|
if match:
|
|
213
|
+
|
|
214
|
+
# nb: No strip() here for so that the exclusions can be handled
|
|
215
|
+
# more strict with e.g. leading or trailing newlines.
|
|
216
|
+
full_line = match.group(0)
|
|
217
|
+
|
|
211
218
|
if handle_linguistic_checks(
|
|
212
|
-
str(self.context.nasl_file),
|
|
219
|
+
str(self.context.nasl_file), full_line, exceptions
|
|
213
220
|
):
|
|
214
221
|
continue
|
|
215
222
|
|
|
223
|
+
stripped_line = full_line.strip()
|
|
224
|
+
stripped_hit = match.group(1).strip()
|
|
225
|
+
|
|
216
226
|
yield LinterError(
|
|
217
227
|
"VT/Include has the following grammar problem:"
|
|
218
|
-
f" {
|
|
228
|
+
f"\n- Hit: {stripped_hit}"
|
|
229
|
+
f"\n- Full line: {stripped_line}",
|
|
219
230
|
file=self.context.nasl_file,
|
|
220
231
|
plugin=self.name,
|
|
221
232
|
)
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
# pylint: disable=fixme
|
|
19
19
|
|
|
20
|
+
import re
|
|
20
21
|
from enum import Enum
|
|
21
22
|
from pathlib import Path
|
|
22
23
|
from typing import Iterator
|
|
@@ -27,6 +28,10 @@ from troubadix.helper.patterns import (
|
|
|
27
28
|
)
|
|
28
29
|
from troubadix.plugin import FileContentPlugin, LinterError, LinterResult
|
|
29
30
|
|
|
31
|
+
TYPE_PATTERN = re.compile(
|
|
32
|
+
r'type\s*:\s*(?P<quote>[\'"])(?P<type>[^\'"]+)(?P=quote)'
|
|
33
|
+
)
|
|
34
|
+
|
|
30
35
|
|
|
31
36
|
class ValidType(Enum):
|
|
32
37
|
CHECKBOX = "checkbox"
|
|
@@ -36,6 +41,9 @@ class ValidType(Enum):
|
|
|
36
41
|
ENTRY = "entry"
|
|
37
42
|
|
|
38
43
|
|
|
44
|
+
VALID_TYPES = {t.value for t in ValidType}
|
|
45
|
+
|
|
46
|
+
|
|
39
47
|
class CheckScriptAddPreferenceType(FileContentPlugin):
|
|
40
48
|
name = "check_script_add_preference_type"
|
|
41
49
|
|
|
@@ -65,30 +73,43 @@ class CheckScriptAddPreferenceType(FileContentPlugin):
|
|
|
65
73
|
if "script_add_preference" not in file_content:
|
|
66
74
|
return
|
|
67
75
|
|
|
76
|
+
# Primary regex to capture all script_add_preference calls
|
|
68
77
|
preferences_matches = _get_special_script_tag_pattern(
|
|
69
78
|
name=SpecialScriptTag.ADD_PREFERENCE.value,
|
|
70
|
-
value=r'type\s*:\s*(?P<quote>[\'"])(?P<type>[^\'"]+)'
|
|
71
|
-
r"(?P=quote)\s*[^)]*",
|
|
72
79
|
).finditer(file_content)
|
|
73
80
|
|
|
81
|
+
# Secondary regex to extract type from the captured value (parameter list)
|
|
74
82
|
for preferences_match in preferences_matches:
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
83
|
+
params_content = preferences_match.group("value")
|
|
84
|
+
type_match = TYPE_PATTERN.search(params_content)
|
|
85
|
+
|
|
86
|
+
if not type_match:
|
|
87
|
+
yield LinterError(
|
|
88
|
+
"script_add_preference call is missing a 'type' "
|
|
89
|
+
f"parameter in '{preferences_match.group(0)}'",
|
|
90
|
+
file=nasl_file,
|
|
91
|
+
plugin=self.name,
|
|
92
|
+
)
|
|
93
|
+
continue
|
|
94
|
+
|
|
95
|
+
pref_type = type_match.group("type")
|
|
96
|
+
if pref_type in VALID_TYPES:
|
|
97
|
+
continue
|
|
98
|
+
|
|
99
|
+
# nb: This exists since years and it is currently
|
|
100
|
+
# unclear if we can change it so
|
|
101
|
+
# we're excluding it here for now.
|
|
102
|
+
if (
|
|
103
|
+
"ssh_authorization_init.nasl" in nasl_file.name
|
|
104
|
+
and pref_type == "sshlogin"
|
|
105
|
+
):
|
|
106
|
+
continue
|
|
107
|
+
|
|
108
|
+
yield LinterError(
|
|
109
|
+
"VT is using an invalid or misspelled type "
|
|
110
|
+
f"({pref_type}) in "
|
|
111
|
+
f"{preferences_match.group(0)} \n"
|
|
112
|
+
f"Allowed are: {sorted(VALID_TYPES)}",
|
|
113
|
+
file=nasl_file,
|
|
114
|
+
plugin=self.name,
|
|
115
|
+
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_files/fail_name_and_copyright_newline.nasl
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_files/nasl/21.04/fail_badwords.nasl
RENAMED
|
File without changes
|
|
File without changes
|
{troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_files/nasl/21.04/fail_name_newline.nasl
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{troubadix-25.9.1 → troubadix-25.10.7}/tests/plugins/test_files/nasl/21.04/runner/fail2.nasl
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|