troubadix 25.7.2__tar.gz → 25.8.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-25.7.2 → troubadix-25.8.0}/PKG-INFO +1 -1
- {troubadix-25.7.2 → troubadix-25.8.0}/pyproject.toml +1 -1
- troubadix-25.8.0/tests/helper/test_if_block_parser.py +251 -0
- troubadix-25.8.0/tests/plugins/test_if_statement_syntax.py +166 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_using_display.py +0 -15
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/__version__.py +1 -1
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/codespell/codespell.additions +2 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/codespell/codespell.exclude +11 -2
- troubadix-25.8.0/troubadix/helper/if_block_parser.py +250 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/__init__.py +2 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/http_links_in_tags.py +3 -0
- troubadix-25.8.0/troubadix/plugins/if_statement_syntax.py +41 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/using_display.py +6 -13
- troubadix-25.7.2/tests/helper/test_if_block_parser.py +0 -216
- troubadix-25.7.2/troubadix/helper/if_block_parser.py +0 -200
- {troubadix-25.7.2 → troubadix-25.8.0}/LICENSE +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/README.md +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/__init__.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/helper/__init__.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/helper/test_date_format.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/helper/test_linguistic_exception_handler.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/helper/test_patterns.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/helper/test_remove_comments.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/helper/test_text_utils.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/manual_tests/comment_removal_diff.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/__init__.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/fail.nasl +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/fail2.nasl +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test.nasl +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_badwords.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_copyright_text.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_copyright_year.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_creation_date.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_cve_format.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_cvss_format.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_dependencies.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_dependency_category_order.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_deprecated_dependency.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_deprecated_functions.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_double_end_points.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_duplicate_oid.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_duplicated_script_tags.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_encoding.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_files/fail_bad_new_line.nasl +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_files/fail_badwords.nasl +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_files/fail_name_and_copyright_newline.nasl +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_files/fail_name_newline.nasl +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_files/fail_permissions.nasl +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_files/fail_spelling.nasl +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_files/nasl/21.04/fail.nasl +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_files/nasl/21.04/fail_badwords.nasl +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_files/nasl/21.04/fail_name_and_copyright_newline.nasl +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_files/nasl/21.04/fail_name_newline.nasl +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_files/nasl/21.04/fail_solution_template.nasl +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_files/nasl/21.04/runner/fail.nasl +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_files/nasl/21.04/runner/fail2.nasl +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_files/nasl/21.04/runner/test.nasl +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_files/nasl/21.04/runner/test_valid_oid.nasl +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_files/nasl/21.04/test.inc +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_files/nasl/21.04/test.nasl +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_files/nasl/warning.nasl +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_files/ok_permissions.nasl +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_files/test_oid.nasl +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_forking_nasl_functions.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_get_kb_on_services.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_grammar.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_http_links_in_tags.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_illegal_characters.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_log_messages.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_malformed_dependencies.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_misplaced_compare_in_if.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_missing_desc_exit.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_missing_tag_solution.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_multiple_re_parameters.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_newlines.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_overlong_description_lines.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_overlong_script_tags.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_prod_svc_detect_in_vulnvt.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_qod.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_reporting_consistency.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_script_add_preference_type.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_script_calls_empty_values.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_script_calls_recommended.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_script_category.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_script_copyright.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_script_family.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_script_tag_form.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_script_tag_whitespaces.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_script_tags_mandatory.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_script_version_and_last_modification_tags.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_script_xref_form.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_script_xref_url.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_security_messages.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_set_get_kb_calls.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_severity_date.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_severity_format.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_severity_origin.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_solution_text.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_solution_type.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_spaces_before_dots.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_spaces_in_filename.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_spelling.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_tabs.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_todo_tbd.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_trailing_spaces_tabs.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_valid_oid.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_valid_script_tag_names.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_variable_redefinition_in_foreach.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_vt_file_permissions.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/plugins/test_vt_placement.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/standalone_plugins/__init__.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/standalone_plugins/changed_packages/__init__.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/standalone_plugins/changed_packages/markers/__init__.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/standalone_plugins/changed_packages/markers/test_added_epoch.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/standalone_plugins/changed_packages/markers/test_added_release.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/standalone_plugins/changed_packages/markers/test_added_udeb.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/standalone_plugins/changed_packages/markers/test_changed_update.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/standalone_plugins/changed_packages/markers/test_dropped_architecture.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/standalone_plugins/changed_packages/test_changed_packages.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/standalone_plugins/changed_packages/test_package.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/standalone_plugins/nasl/21.04/21_script.nasl +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/standalone_plugins/nasl/22.04/22_script.nasl +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/standalone_plugins/nasl/common/bar.nasl +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/standalone_plugins/nasl/common/foo.nasl +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/standalone_plugins/nasl/common/foobar.nasl +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/standalone_plugins/nasl/common/gsf/enterprise_script.nasl +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/standalone_plugins/test_changed_creation_date.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/standalone_plugins/test_changed_cves.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/standalone_plugins/test_changed_oid.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/standalone_plugins/test_dependency_graph.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/standalone_plugins/test_deprecate_vts.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/standalone_plugins/test_file_extensions.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/standalone_plugins/test_last_modification.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/standalone_plugins/test_no_solution.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/standalone_plugins/test_version_updated.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/test_argparser.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/test_helper.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/test_naslinter.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/test_reporter.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/test_results.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/tests/test_runner.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/__init__.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/argparser.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/codespell/codespell.ignore +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/helper/__init__.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/helper/date_format.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/helper/helper.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/helper/linguistic_exception_handler.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/helper/patterns.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/helper/remove_comments.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/helper/text_utils.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugin.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/badwords.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/copyright_text.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/copyright_year.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/creation_date.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/cve_format.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/cvss_format.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/dependencies.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/dependency_category_order.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/deprecated_dependency.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/deprecated_functions.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/double_end_points.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/duplicate_oid.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/duplicated_script_tags.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/encoding.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/forking_nasl_functions.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/get_kb_on_services.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/grammar.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/illegal_characters.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/log_messages.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/malformed_dependencies.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/misplaced_compare_in_if.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/missing_desc_exit.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/missing_tag_solution.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/multiple_re_parameters.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/newlines.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/overlong_description_lines.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/overlong_script_tags.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/prod_svc_detect_in_vulnvt.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/qod.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/reporting_consistency.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/script_add_preference_type.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/script_calls_empty_values.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/script_calls_recommended.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/script_category.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/script_copyright.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/script_family.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/script_tag_form.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/script_tag_whitespaces.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/script_tags_mandatory.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/script_version_and_last_modification_tags.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/script_xref_form.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/script_xref_url.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/security_messages.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/set_get_kb_calls.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/severity_date.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/severity_format.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/severity_origin.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/solution_text.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/solution_type.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/spaces_before_dots.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/spaces_in_filename.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/spelling.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/tabs.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/todo_tbd.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/trailing_spaces_tabs.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/valid_oid.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/valid_script_tag_names.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/variable_assigned_in_if.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/variable_redefinition_in_foreach.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/vt_file_permissions.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/plugins/vt_placement.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/reporter.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/results.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/runner.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/standalone_plugins/__init__.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/standalone_plugins/allowed_rev_diff.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/standalone_plugins/changed_creation_date.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/standalone_plugins/changed_cves.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/standalone_plugins/changed_oid.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/standalone_plugins/changed_packages/changed_packages.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/standalone_plugins/changed_packages/marker/__init__.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/standalone_plugins/changed_packages/marker/added_epoch.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/standalone_plugins/changed_packages/marker/added_release.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/standalone_plugins/changed_packages/marker/added_udeb.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/standalone_plugins/changed_packages/marker/changed_update.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/standalone_plugins/changed_packages/marker/dropped_architecture.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/standalone_plugins/changed_packages/marker/marker.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/standalone_plugins/changed_packages/package.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/standalone_plugins/common.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/standalone_plugins/dependency_graph/__init__.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/standalone_plugins/dependency_graph/checks.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/standalone_plugins/dependency_graph/cli.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/standalone_plugins/dependency_graph/dependency_graph.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/standalone_plugins/dependency_graph/models.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/standalone_plugins/deprecate_vts.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/standalone_plugins/file_extensions.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/standalone_plugins/last_modification.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/standalone_plugins/no_solution.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/standalone_plugins/util.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/standalone_plugins/version_updated.py +0 -0
- {troubadix-25.7.2 → troubadix-25.8.0}/troubadix/troubadix.py +0 -0
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
# SPDX-FileCopyrightText: 2025 Greenbone AG
|
|
3
|
+
|
|
4
|
+
import unittest
|
|
5
|
+
|
|
6
|
+
from troubadix.helper.if_block_parser import IfErrorType, find_if_statements
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class FindIfStatementsTestCase(unittest.TestCase):
|
|
10
|
+
def test_empty_input(self):
|
|
11
|
+
result = find_if_statements("")
|
|
12
|
+
self.assertEqual(len(result.statements), 0)
|
|
13
|
+
self.assertEqual(len(result.errors), 0)
|
|
14
|
+
|
|
15
|
+
def test_inline_single_expression(self):
|
|
16
|
+
content = 'if(TRUE) display("inline");'
|
|
17
|
+
result = find_if_statements(content)
|
|
18
|
+
|
|
19
|
+
self.assertEqual(1, len(result.statements))
|
|
20
|
+
self.assertEqual("TRUE", result.statements[0].condition)
|
|
21
|
+
self.assertEqual('display("inline")', result.statements[0].outcome)
|
|
22
|
+
# Check that position is correct (start at 'if', end at semicolon)
|
|
23
|
+
self.assertEqual(0, result.statements[0].if_start)
|
|
24
|
+
self.assertEqual(len(content), result.statements[0].if_end)
|
|
25
|
+
|
|
26
|
+
def test_single_line_with_newline(self):
|
|
27
|
+
content = 'if(TRUE)\n display("single line");'
|
|
28
|
+
result = find_if_statements(content)
|
|
29
|
+
|
|
30
|
+
self.assertEqual(1, len(result.statements))
|
|
31
|
+
self.assertEqual("TRUE", result.statements[0].condition)
|
|
32
|
+
self.assertEqual('display("single line")', result.statements[0].outcome)
|
|
33
|
+
|
|
34
|
+
def test_standard_block(self):
|
|
35
|
+
content = 'if(TRUE) {\n display("block");\n}'
|
|
36
|
+
result = find_if_statements(content)
|
|
37
|
+
|
|
38
|
+
self.assertEqual(1, len(result.statements))
|
|
39
|
+
self.assertEqual("TRUE", result.statements[0].condition)
|
|
40
|
+
self.assertEqual('display("block");', result.statements[0].outcome)
|
|
41
|
+
# Check position spans from 'if' to the closing brace
|
|
42
|
+
self.assertEqual(0, result.statements[0].if_start)
|
|
43
|
+
self.assertEqual(len(content), result.statements[0].if_end)
|
|
44
|
+
|
|
45
|
+
def test_block_brace_on_newline(self):
|
|
46
|
+
content = 'if(TRUE)\n{\n display("block");\n}'
|
|
47
|
+
result = find_if_statements(content)
|
|
48
|
+
|
|
49
|
+
self.assertEqual(1, len(result.statements))
|
|
50
|
+
self.assertEqual("TRUE", result.statements[0].condition)
|
|
51
|
+
self.assertEqual('display("block");', result.statements[0].outcome)
|
|
52
|
+
|
|
53
|
+
def test_empty_block(self):
|
|
54
|
+
content = "if(TRUE)\n{\n}"
|
|
55
|
+
result = find_if_statements(content)
|
|
56
|
+
|
|
57
|
+
self.assertEqual(1, len(result.statements))
|
|
58
|
+
self.assertEqual("TRUE", result.statements[0].condition)
|
|
59
|
+
self.assertEqual("", result.statements[0].outcome)
|
|
60
|
+
|
|
61
|
+
def test_compact_block(self):
|
|
62
|
+
content = "if(TRUE){}"
|
|
63
|
+
result = find_if_statements(content)
|
|
64
|
+
|
|
65
|
+
self.assertEqual(1, len(result.statements))
|
|
66
|
+
self.assertEqual("TRUE", result.statements[0].condition)
|
|
67
|
+
self.assertEqual("", result.statements[0].outcome)
|
|
68
|
+
|
|
69
|
+
def test_multiple_if_statements(self):
|
|
70
|
+
content = """
|
|
71
|
+
if(cond1) display("one");
|
|
72
|
+
if(cond2) {
|
|
73
|
+
display("two");
|
|
74
|
+
}
|
|
75
|
+
if(cond3)
|
|
76
|
+
display("three");
|
|
77
|
+
"""
|
|
78
|
+
result = find_if_statements(content)
|
|
79
|
+
self.assertEqual(3, len(result.statements))
|
|
80
|
+
|
|
81
|
+
self.assertEqual("cond1", result.statements[0].condition)
|
|
82
|
+
self.assertEqual('display("one")', result.statements[0].outcome)
|
|
83
|
+
|
|
84
|
+
self.assertEqual("cond2", result.statements[1].condition)
|
|
85
|
+
self.assertEqual('display("two");', result.statements[1].outcome)
|
|
86
|
+
|
|
87
|
+
self.assertEqual("cond3", result.statements[2].condition)
|
|
88
|
+
self.assertEqual('display("three")', result.statements[2].outcome)
|
|
89
|
+
|
|
90
|
+
def test_nested_if_statements(self):
|
|
91
|
+
content = """
|
|
92
|
+
if(outer) {
|
|
93
|
+
if(inner1) {
|
|
94
|
+
display("nested block");
|
|
95
|
+
}
|
|
96
|
+
if(inner2) display("nested inline");
|
|
97
|
+
}
|
|
98
|
+
"""
|
|
99
|
+
result = find_if_statements(content)
|
|
100
|
+
self.assertEqual(3, len(result.statements))
|
|
101
|
+
|
|
102
|
+
self.assertEqual("outer", result.statements[0].condition)
|
|
103
|
+
self.assertIn("if(inner1)", result.statements[0].outcome)
|
|
104
|
+
self.assertIn("if(inner2)", result.statements[0].outcome)
|
|
105
|
+
|
|
106
|
+
self.assertEqual("inner1", result.statements[1].condition)
|
|
107
|
+
self.assertIn('display("nested block")', result.statements[1].outcome)
|
|
108
|
+
|
|
109
|
+
self.assertEqual("inner2", result.statements[2].condition)
|
|
110
|
+
self.assertEqual(
|
|
111
|
+
'display("nested inline")', result.statements[2].outcome
|
|
112
|
+
)
|
|
113
|
+
|
|
114
|
+
def test_complex_condition(self):
|
|
115
|
+
content = (
|
|
116
|
+
'if (a == 1 && b > 2 || c != "string") { display("complex"); }'
|
|
117
|
+
)
|
|
118
|
+
result = find_if_statements(content)
|
|
119
|
+
|
|
120
|
+
self.assertEqual(1, len(result.statements))
|
|
121
|
+
self.assertEqual(
|
|
122
|
+
'a == 1 && b > 2 || c != "string"', result.statements[0].condition
|
|
123
|
+
)
|
|
124
|
+
self.assertEqual('display("complex");', result.statements[0].outcome)
|
|
125
|
+
|
|
126
|
+
def test_if_with_problematic_stuff(self):
|
|
127
|
+
# escape single quote and backslash, function call in condition
|
|
128
|
+
content = r"if(some_func('\'\\')) display('\'test\\');"
|
|
129
|
+
result = find_if_statements(content)
|
|
130
|
+
|
|
131
|
+
self.assertEqual(1, len(result.statements))
|
|
132
|
+
self.assertEqual(r"some_func('\'\\')", result.statements[0].condition)
|
|
133
|
+
self.assertEqual(r"display('\'test\\')", result.statements[0].outcome)
|
|
134
|
+
|
|
135
|
+
def test_unclosed_parenthesis(self):
|
|
136
|
+
content = "if(unclosed condition\ndisplay();"
|
|
137
|
+
result = find_if_statements(content)
|
|
138
|
+
self.assertEqual(len(result.statements), 0)
|
|
139
|
+
self.assertEqual(len(result.errors), 1)
|
|
140
|
+
self.assertEqual(result.errors[0].error_type.name, "UNCLOSED_CONDITION")
|
|
141
|
+
|
|
142
|
+
def test_no_statement_after_condition(self):
|
|
143
|
+
content = "if(condition)"
|
|
144
|
+
result = find_if_statements(content)
|
|
145
|
+
self.assertEqual(len(result.statements), 0)
|
|
146
|
+
self.assertEqual(len(result.errors), 1)
|
|
147
|
+
self.assertEqual(result.errors[0].error_type.name, "MISSING_OUTCOME")
|
|
148
|
+
|
|
149
|
+
def test_useless_semicolon(self):
|
|
150
|
+
content = "if(condition);"
|
|
151
|
+
result = find_if_statements(content)
|
|
152
|
+
self.assertEqual(len(result.statements), 0)
|
|
153
|
+
self.assertEqual(len(result.errors), 1)
|
|
154
|
+
self.assertEqual(
|
|
155
|
+
result.errors[0].error_type.name, "TERMINATED_AFTER_CONDITION"
|
|
156
|
+
)
|
|
157
|
+
|
|
158
|
+
def test_unclosed_block_brace(self):
|
|
159
|
+
content = "if(condition) {\ndisplay();\n# Missing closing brace"
|
|
160
|
+
result = find_if_statements(content)
|
|
161
|
+
self.assertEqual(len(result.statements), 0)
|
|
162
|
+
self.assertEqual(len(result.errors), 1)
|
|
163
|
+
self.assertEqual(result.errors[0].error_type.name, "UNCLOSED_BODY")
|
|
164
|
+
|
|
165
|
+
def test_no_semicolon_in_single_expression(self):
|
|
166
|
+
content = "if(condition) display()" # Missing semicolon
|
|
167
|
+
result = find_if_statements(content)
|
|
168
|
+
self.assertEqual(len(result.statements), 0)
|
|
169
|
+
self.assertEqual(len(result.errors), 1)
|
|
170
|
+
self.assertEqual(result.errors[0].error_type.name, "MISSING_STATEMENT")
|
|
171
|
+
|
|
172
|
+
def test_complex_condition_with_unmatched_brace(self):
|
|
173
|
+
content = "if(func(1, 2) || check(a) { display(); }" # Missing closing ) in condition
|
|
174
|
+
result = find_if_statements(content)
|
|
175
|
+
self.assertEqual(len(result.statements), 0)
|
|
176
|
+
self.assertEqual(len(result.errors), 1)
|
|
177
|
+
self.assertEqual(result.errors[0].error_type.name, "UNCLOSED_CONDITION")
|
|
178
|
+
|
|
179
|
+
def test_position_info_in_error_message(self):
|
|
180
|
+
content = "# Some comment\nif(bad) something" # No semicolon
|
|
181
|
+
result = find_if_statements(content)
|
|
182
|
+
self.assertEqual(len(result.statements), 0)
|
|
183
|
+
self.assertEqual(len(result.errors), 1)
|
|
184
|
+
self.assertEqual(result.errors[0].line, 2)
|
|
185
|
+
|
|
186
|
+
def test_condition_and_statement_positions_block(self):
|
|
187
|
+
content = 'if(TRUE) {\n display("block");\n}'
|
|
188
|
+
result = find_if_statements(content)
|
|
189
|
+
|
|
190
|
+
self.assertEqual(1, len(result.statements))
|
|
191
|
+
# Check condition position (inside parentheses)
|
|
192
|
+
self.assertEqual(3, result.statements[0].condition_start)
|
|
193
|
+
self.assertEqual(7, result.statements[0].condition_end)
|
|
194
|
+
# Check outcome position (inside braces)
|
|
195
|
+
self.assertEqual(10, result.statements[0].outcome_start)
|
|
196
|
+
self.assertEqual(31, result.statements[0].outcome_end)
|
|
197
|
+
|
|
198
|
+
def test_condition_and_statement_positions_single(self):
|
|
199
|
+
content = 'if(num > 5) display("inline");'
|
|
200
|
+
result = find_if_statements(content)
|
|
201
|
+
|
|
202
|
+
self.assertEqual(1, len(result.statements))
|
|
203
|
+
# Check condition position (inside parentheses)
|
|
204
|
+
self.assertEqual(3, result.statements[0].condition_start)
|
|
205
|
+
self.assertEqual(10, result.statements[0].condition_end)
|
|
206
|
+
# Check outcome position (after parenthesis to semicolon)
|
|
207
|
+
self.assertEqual(12, result.statements[0].outcome_start)
|
|
208
|
+
self.assertEqual(29, result.statements[0].outcome_end)
|
|
209
|
+
|
|
210
|
+
def test_mixed_valid_and_invalid_if_statements(self):
|
|
211
|
+
content = """
|
|
212
|
+
if(a > 0) display("ok1");
|
|
213
|
+
if(b > 0) ;
|
|
214
|
+
if(c > 0) {
|
|
215
|
+
display("ok2");
|
|
216
|
+
}
|
|
217
|
+
if(d > 0)
|
|
218
|
+
if(e > 0) display("ok3");
|
|
219
|
+
if(f > 0 display();
|
|
220
|
+
"""
|
|
221
|
+
result = find_if_statements(content)
|
|
222
|
+
self.assertEqual(4, len(result.statements))
|
|
223
|
+
self.assertEqual(2, len(result.errors))
|
|
224
|
+
self.assertEqual("a > 0", result.statements[0].condition)
|
|
225
|
+
self.assertEqual(
|
|
226
|
+
IfErrorType.TERMINATED_AFTER_CONDITION,
|
|
227
|
+
result.errors[0].error_type,
|
|
228
|
+
)
|
|
229
|
+
self.assertEqual(
|
|
230
|
+
IfErrorType.UNCLOSED_CONDITION, result.errors[1].error_type
|
|
231
|
+
)
|
|
232
|
+
|
|
233
|
+
def test_multiple_nested_inline_if_statements(self):
|
|
234
|
+
content = """
|
|
235
|
+
if(a > 0)
|
|
236
|
+
|
|
237
|
+
if(b > 0)
|
|
238
|
+
|
|
239
|
+
if(c > 0)
|
|
240
|
+
|
|
241
|
+
display("deep");
|
|
242
|
+
"""
|
|
243
|
+
result = find_if_statements(content)
|
|
244
|
+
# Should parse 3 nested if statements
|
|
245
|
+
self.assertEqual(3, len(result.statements))
|
|
246
|
+
self.assertEqual("a > 0", result.statements[0].condition)
|
|
247
|
+
self.assertIn("if(b > 0)", result.statements[0].outcome)
|
|
248
|
+
self.assertEqual("b > 0", result.statements[1].condition)
|
|
249
|
+
self.assertIn("if(c > 0)", result.statements[1].outcome)
|
|
250
|
+
self.assertEqual("c > 0", result.statements[2].condition)
|
|
251
|
+
self.assertEqual('display("deep")', result.statements[2].outcome)
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
# SPDX-FileCopyrightText: 2025 Greenbone AG
|
|
3
|
+
|
|
4
|
+
from pathlib import Path
|
|
5
|
+
|
|
6
|
+
from troubadix.plugins.if_statement_syntax import CheckIfStatementSyntax
|
|
7
|
+
|
|
8
|
+
from . import PluginTestCase
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class CheckIfStatementSyntaxTestCase(PluginTestCase):
|
|
12
|
+
"""Test cases for the CheckIfStatementSyntax plugin."""
|
|
13
|
+
|
|
14
|
+
def test_valid_if_statements(self):
|
|
15
|
+
nasl_file = Path(__file__).parent / "test.nasl"
|
|
16
|
+
content = """
|
|
17
|
+
if(condition) {
|
|
18
|
+
display("block statement");
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
if(another_condition) display("single statement");
|
|
22
|
+
|
|
23
|
+
if(nested_condition) {
|
|
24
|
+
if(inner_condition) {
|
|
25
|
+
display("nested");
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
fake_context = self.create_file_plugin_context(
|
|
31
|
+
nasl_file=nasl_file, file_content=content
|
|
32
|
+
)
|
|
33
|
+
plugin = CheckIfStatementSyntax(fake_context)
|
|
34
|
+
|
|
35
|
+
results = list(plugin.run())
|
|
36
|
+
|
|
37
|
+
self.assertEqual(len(results), 0)
|
|
38
|
+
|
|
39
|
+
def test_unclosed_parenthesis(self):
|
|
40
|
+
nasl_file = Path(__file__).parent / "test.nasl"
|
|
41
|
+
content = """
|
|
42
|
+
if(unclosed_condition {
|
|
43
|
+
display("this should fail");
|
|
44
|
+
}
|
|
45
|
+
"""
|
|
46
|
+
|
|
47
|
+
fake_context = self.create_file_plugin_context(
|
|
48
|
+
nasl_file=nasl_file, file_content=content
|
|
49
|
+
)
|
|
50
|
+
plugin = CheckIfStatementSyntax(fake_context)
|
|
51
|
+
|
|
52
|
+
results = list(plugin.run())
|
|
53
|
+
|
|
54
|
+
self.assertEqual(len(results), 1)
|
|
55
|
+
self.assertIn("Unclosed parenthesis", results[0].message)
|
|
56
|
+
self.assertIn("line 2", results[0].message)
|
|
57
|
+
|
|
58
|
+
def test_unclosed_brace(self):
|
|
59
|
+
nasl_file = Path(__file__).parent / "test.nasl"
|
|
60
|
+
content = """
|
|
61
|
+
if(condition) {
|
|
62
|
+
display("missing closing brace");
|
|
63
|
+
# Missing closing brace
|
|
64
|
+
"""
|
|
65
|
+
|
|
66
|
+
fake_context = self.create_file_plugin_context(
|
|
67
|
+
nasl_file=nasl_file, file_content=content
|
|
68
|
+
)
|
|
69
|
+
plugin = CheckIfStatementSyntax(fake_context)
|
|
70
|
+
|
|
71
|
+
results = list(plugin.run())
|
|
72
|
+
|
|
73
|
+
self.assertEqual(len(results), 1)
|
|
74
|
+
self.assertIn("Unclosed brace", results[0].message)
|
|
75
|
+
|
|
76
|
+
def test_missing_statement(self):
|
|
77
|
+
nasl_file = Path(__file__).parent / "test.nasl"
|
|
78
|
+
content = """
|
|
79
|
+
if(condition)
|
|
80
|
+
# No statement follows
|
|
81
|
+
"""
|
|
82
|
+
|
|
83
|
+
fake_context = self.create_file_plugin_context(
|
|
84
|
+
nasl_file=nasl_file, file_content=content
|
|
85
|
+
)
|
|
86
|
+
plugin = CheckIfStatementSyntax(fake_context)
|
|
87
|
+
|
|
88
|
+
results = list(plugin.run())
|
|
89
|
+
|
|
90
|
+
self.assertEqual(len(results), 1)
|
|
91
|
+
self.assertIn("Missing statement", results[0].message)
|
|
92
|
+
|
|
93
|
+
def test_semicolon_after_condition(self):
|
|
94
|
+
nasl_file = Path(__file__).parent / "test.nasl"
|
|
95
|
+
content = """
|
|
96
|
+
if(condition);
|
|
97
|
+
{
|
|
98
|
+
display("this will always execute");
|
|
99
|
+
}
|
|
100
|
+
"""
|
|
101
|
+
|
|
102
|
+
fake_context = self.create_file_plugin_context(
|
|
103
|
+
nasl_file=nasl_file, file_content=content
|
|
104
|
+
)
|
|
105
|
+
plugin = CheckIfStatementSyntax(fake_context)
|
|
106
|
+
|
|
107
|
+
results = list(plugin.run())
|
|
108
|
+
|
|
109
|
+
self.assertEqual(len(results), 1)
|
|
110
|
+
self.assertIn("Semicolon after if condition", results[0].message)
|
|
111
|
+
|
|
112
|
+
def test_missing_semicolon_in_expression(self):
|
|
113
|
+
nasl_file = Path(__file__).parent / "test.nasl"
|
|
114
|
+
content = """
|
|
115
|
+
if(condition) display("missing semicolon")
|
|
116
|
+
# No semicolon at end of expression
|
|
117
|
+
"""
|
|
118
|
+
|
|
119
|
+
fake_context = self.create_file_plugin_context(
|
|
120
|
+
nasl_file=nasl_file, file_content=content
|
|
121
|
+
)
|
|
122
|
+
plugin = CheckIfStatementSyntax(fake_context)
|
|
123
|
+
|
|
124
|
+
results = list(plugin.run())
|
|
125
|
+
|
|
126
|
+
self.assertEqual(len(results), 1)
|
|
127
|
+
self.assertIn("Missing expression", results[0].message)
|
|
128
|
+
|
|
129
|
+
def test_comment_handling(self):
|
|
130
|
+
nasl_file = Path(__file__).parent / "test.nasl"
|
|
131
|
+
content = """
|
|
132
|
+
# This comment has an unclosed if(condition that should be ignored
|
|
133
|
+
if(real_condition) {
|
|
134
|
+
# Another comment with if(fake
|
|
135
|
+
display("real code");
|
|
136
|
+
}
|
|
137
|
+
"""
|
|
138
|
+
|
|
139
|
+
fake_context = self.create_file_plugin_context(
|
|
140
|
+
nasl_file=nasl_file, file_content=content
|
|
141
|
+
)
|
|
142
|
+
plugin = CheckIfStatementSyntax(fake_context)
|
|
143
|
+
|
|
144
|
+
results = list(plugin.run())
|
|
145
|
+
|
|
146
|
+
self.assertEqual(len(results), 0)
|
|
147
|
+
|
|
148
|
+
def test_complex_nested_error(self):
|
|
149
|
+
nasl_file = Path(__file__).parent / "test.nasl"
|
|
150
|
+
content = """
|
|
151
|
+
if(outer_condition) {
|
|
152
|
+
if(inner_condition { # Missing closing parenthesis
|
|
153
|
+
display("nested error");
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
"""
|
|
157
|
+
|
|
158
|
+
fake_context = self.create_file_plugin_context(
|
|
159
|
+
nasl_file=nasl_file, file_content=content
|
|
160
|
+
)
|
|
161
|
+
plugin = CheckIfStatementSyntax(fake_context)
|
|
162
|
+
|
|
163
|
+
results = list(plugin.run())
|
|
164
|
+
|
|
165
|
+
self.assertEqual(len(results), 1)
|
|
166
|
+
self.assertIn("Unclosed parenthesis", results[0].message)
|
|
@@ -131,18 +131,3 @@ class CheckUsingDisplayTestCase(PluginTestCase):
|
|
|
131
131
|
results = list(plugin.run())
|
|
132
132
|
|
|
133
133
|
self.assertEqual(0, len(results))
|
|
134
|
-
|
|
135
|
-
def test_propagate_if_parser_error(self):
|
|
136
|
-
path = Path("some/file.nasl")
|
|
137
|
-
content = "if (Foo);\ndisplay('Foo');"
|
|
138
|
-
fake_context = self.create_file_plugin_context(
|
|
139
|
-
nasl_file=path, file_content=content
|
|
140
|
-
)
|
|
141
|
-
plugin = CheckUsingDisplay(fake_context)
|
|
142
|
-
|
|
143
|
-
results = list(plugin.run())
|
|
144
|
-
|
|
145
|
-
# only one result for if parser error,
|
|
146
|
-
# display call not part of result due to early exit of entire run.
|
|
147
|
-
self.assertEqual(1, len(results))
|
|
148
|
-
self.assertIn("Semicolon after if condition", results[0].message)
|
|
@@ -250,6 +250,7 @@ complete_xml = string (complete_xml, '<oval_system_characteristics xmlns="http:/
|
|
|
250
250
|
Connection, Expect, If-Match, If-None-Match, If-Range, If-Unmodified-Since, Max-Forwards, TE,
|
|
251
251
|
"Connection: TE, close\r\n",
|
|
252
252
|
"Connection: TE,,Keep-Alive\r\n\r\n" );
|
|
253
|
+
('content="Xenon Boostrap Admin Panel"' >< res || '<body class="cui">' >< res)) {
|
|
253
254
|
control of Cisco Nexus 9000 Series Fabric Switches in Application Centric Infrastructure (ACI)
|
|
254
255
|
# Copyright (c) 2008 Tim Brown
|
|
255
256
|
# Copyright (C) 2008 Tim Brown
|
|
@@ -347,6 +348,7 @@ CVE-2020-5208: Fixed multiple remote code executtion vulnerabilities
|
|
|
347
348
|
CVE-2020-8492: Fixed a regular expression in urrlib that was prone to
|
|
348
349
|
CVE-2021-30004: Fixed an issue where forging attacks might have occured
|
|
349
350
|
* CVE-2021-47311: net: qcom/emac: fix UAF in emac_remove (bsc#1225010).
|
|
351
|
+
- CVE-2025-3200: Multiple products from Wiesemann & Theis");
|
|
350
352
|
dass eine geeignete Windows 8.1 Version, vorzugsweise eine 64-Bit Variante, eingesetzt werden muss.");
|
|
351
353
|
"DataArchivingService/webcontent/aas",
|
|
352
354
|
"/DataArchivingService/webcontent/aas/aas_store.jsp");
|
|
@@ -437,6 +439,7 @@ Federico Manuel Bento discovered that the Linux kernel did not properly
|
|
|
437
439
|
# Fedora Update for tre FEDORA-2016-cd09eab674
|
|
438
440
|
Festplatten- und Dateiverschluesselung eingesetzt werden. Alternativ SOLLTE 'dm-crypt' in
|
|
439
441
|
files. If a user were tricked into opening a specially-crafted CAF file, a
|
|
442
|
+
files packed with UPack.
|
|
440
443
|
files to potentially execute code and it is tracked by the Mitre CVE
|
|
441
444
|
file_xml = '\t\t<file_item' + status + ' xmlns="http://oval.mitre.org/XMLSchema/' +
|
|
442
445
|
Fixed a bug where Podman could not run containers usin... [Please see the references for more information on the vulnerabilities]");
|
|
@@ -507,7 +510,8 @@ Helin, Andre Bargull, Massimiliano Tomassoli, laf.intel, Massimiliano
|
|
|
507
510
|
hello_data += clen + _ciphers;
|
|
508
511
|
"H", "HSI",
|
|
509
512
|
- HP Helion Eucalyptus does not correctly check IAM user's permissions for accessing versioned objects and ACLs.
|
|
510
|
-
hp_printer[
|
|
513
|
+
hp_printer["login_success"] = "<?hp te\.includeSubPage";
|
|
514
|
+
# <?hp te.includeSubPage("/webApps/Wired/ip4.htf") ?>
|
|
511
515
|
</HSI>
|
|
512
516
|
<HSI>
|
|
513
517
|
# <HTML>Acess not granted.</HTML>
|
|
@@ -532,6 +536,7 @@ if (!banner || banner !~ "^(RICOH|LANIER|SAVIN|Gestetner|NRG) ")
|
|
|
532
536
|
if(!banner = get_kb_item("shttp/" + port + "/banner"))
|
|
533
537
|
if (banner =~ "Huawei TE[0-9]0") {
|
|
534
538
|
if( banner =~ "(MD|BU)-" ) {
|
|
539
|
+
if( banner !~ "Server\s*:\s*Boa" || ( "AirLive" >!< banner && banner !~ "(WL|MD|BU|POE)-") )
|
|
535
540
|
if( ( buf =~ "<title>GLPI - Authentification" || buf =~ "<title>GLPI - Authentication" ) && ( buf =~ "Powered By Indepnet" ||
|
|
536
541
|
if( "CONEXANT SYSTEMS, INC." >< r &&
|
|
537
542
|
if( "CONEXANT SYSTEMS, INC" >< r && "ACCESS RUNNER ADSL CONSOLE PORT" >< r && "LOGON PASSWORD" >< r ) {
|
|
@@ -591,7 +596,6 @@ if ((res = ispkgvuln(pkg:"app-admin/lsat", unaffected: make_list(), vulnerable:
|
|
|
591
596
|
if(res =~ "<span>[Ss]arix&[Tt]rade;</span>" && res =~ "<span>Copyright\s*©\s*[0-9]+-[0-9]+,\s*[Pp][Ee][Ll][Cc][Oo]\s*·"
|
|
592
597
|
if (res =~ "[Ss]creen[Cc]onnect" &&
|
|
593
598
|
if( res && "WAN SETTINGS" >< res && "value='3G Interface" >< res && "menu.html" >< res &&
|
|
594
|
-
if( "Server: Boa" >!< banner || ( "AirLive" >!< banner && banner !~ "(WL|MD|BU|POE)-") )
|
|
595
599
|
if( strlen( data ) < 8 || data !~ "^(DELETE|PROPFIND|PUT|GET|HEAD|POST|OPTIONS|REPORT|MKCOL|MOVE|PROPPATCH|COPY|PATCH|CONNECT|TRACE|LOCK|UNLOCK|TRACK|M-POST|CHECKOUT|CHECKIN|UNCHECKOUT|VERSION-CONTROL|BASELINE-CONTROL).*HTTP/(1\.[01]|2)" ) {
|
|
596
600
|
if(strlen(res) && "nonexistant" >< res && "XJ004CSS" >< res) {
|
|
597
601
|
if( sysdesc =~ "^(RICOH|LANIER|SAVIN|NRG)" && sysdesc =~ "(RICOH|LANIER|SAVIN|NRG) Network Printer" ) {
|
|
@@ -610,6 +614,7 @@ ii libapt-pkg4.12:amd64 0.9.7.5ubuntu5.6 amd64 package managment runtime lib
|
|
|
610
614
|
ii libapt-pkg4.12:amd64 0.9.7.7ubuntu6 amd64 package managment runtime library
|
|
611
615
|
ii libapt-pkg4.12:amd64 0.9.7.9+deb7u7 amd64 package managment runtime library
|
|
612
616
|
ii libapt-pkg4.12:amd64 0.9.9.1~ubuntu3.3 amd64 package managment runtime library
|
|
617
|
+
ii unminimize 0.2.1 amd64 Un-minimize your minimial images or setup
|
|
613
618
|
image. This occured because of a lack of proper validation that cached
|
|
614
619
|
Imaging and Communications in Medicine (DICOM) service accessible from a public WAN (Internet) /
|
|
615
620
|
Imaging and Communications in Medicine (DICOM) web viewer accessible from a public WAN (Internet)
|
|
@@ -728,6 +733,8 @@ mark_dead = script_get_preference( "Mark unrechable Hosts as dead (not scanning)
|
|
|
728
733
|
Mark Shepard discovered a double free in the TCP listener cleanup which could result in denial of service by an authenticated user if Dropbear is running with the '-a' option.
|
|
729
734
|
masked. All LSAT users are advised to unmerge it.
|
|
730
735
|
"Max-Forwards", "TE" ) ) {
|
|
736
|
+
"/mdm/checkin",
|
|
737
|
+
/mdm/checkin and /lshw endpoints.");
|
|
731
738
|
"Memorise" >< poshRes)
|
|
732
739
|
memory disclosure whne processing of a specially crafted mp4 file with
|
|
733
740
|
# Mesosphere Marathon Web UI Public WAN (Internet) Accessible
|
|
@@ -886,6 +893,7 @@ reenable php7-dba support of Berkeley DB (bsc#1108554)");
|
|
|
886
893
|
reg_xml = '\t\t<registry_item' + status + ' xmlns="http://oval.mitre.org/' +
|
|
887
894
|
Reject invalid eliptic curve point coordinates (bsc#1131291)");
|
|
888
895
|
rejection for EXTRAVERSION = -xfs, but likely little else will be
|
|
896
|
+
remote attackers to execute arbitrary code via a crafted Upack PE file.
|
|
889
897
|
- Remote Command Execution via WAN and LAN
|
|
890
898
|
- Remote Unauthenticated Information Disclosure via WAN and LAN
|
|
891
899
|
Remove all mitre.org links from the script descriptions as
|
|
@@ -1546,6 +1554,7 @@ Wan-Teh Chang as the original reporters of CVE-2013-5607.
|
|
|
1546
1554
|
web-based interface for Cisco Small Business RV320 and RV325 Dual Gigabit WAN VPN Routers could
|
|
1547
1555
|
webcontent/aas/aas_store.jsp.");
|
|
1548
1556
|
* Webdienst Assoziation
|
|
1557
|
+
"webdynpro/resources/sap.com/caf~eu~gp~mail~cf~ui",
|
|
1549
1558
|
Wen Guanxing discovered that PCRE incorrectly handled certain regular
|
|
1550
1559
|
Wen Xu and Po-Ning Tseng discovered that btrfs file system implementation
|
|
1551
1560
|
Wen Xu and Po-Ning Tseng discovered that the btrfs filesystem
|