From d057edd576ca7c6efb9a42352f6cef6844c736e2 Mon Sep 17 00:00:00 2001 From: Deblintrake09 Date: Mon, 24 Jul 2023 18:04:01 -0300 Subject: [PATCH] style(#4045): fix spacing and whitelines --- ...scan_updated_package_still_vulnerable.yaml | 25 ++++++++++--------- ...scan_updated_package_still_vulnerable.yaml | 16 ++++++------ ...t_scan_updated_package_still_vulnerable.py | 4 +-- 3 files changed, 23 insertions(+), 22 deletions(-) diff --git a/tests/integration/test_vulnerability_detector/test_scan_results/data/configuration_template/configuration_scan_updated_package_still_vulnerable.yaml b/tests/integration/test_vulnerability_detector/test_scan_results/data/configuration_template/configuration_scan_updated_package_still_vulnerable.yaml index 58c1a64973..74f688f470 100644 --- a/tests/integration/test_vulnerability_detector/test_scan_results/data/configuration_template/configuration_scan_updated_package_still_vulnerable.yaml +++ b/tests/integration/test_vulnerability_detector/test_scan_results/data/configuration_template/configuration_scan_updated_package_still_vulnerable.yaml @@ -5,9 +5,9 @@ - enabled: value: 'yes' - interval: - value: '5s' + value: 5s - min_full_scan_interval: - value: '5s' + value: 5s - run_on_start: value: 'yes' - provider: @@ -22,33 +22,33 @@ value: focal - provider: attributes: - - name: 'nvd' + - name: nvd elements: - enabled: value: 'yes' - path: value: CUSTOM_NVD_JSON_FEED - update_interval: - value: '10s' + value: 10s - section: sca elements: - - enabled: - value: 'no' + - enabled: + value: 'no' - section: rootcheck elements: - - disabled: - value: 'yes' + - disabled: + value: 'yes' - section: syscheck elements: - - disabled: - value: 'yes' + - disabled: + value: 'yes' - section: wodle attributes: - - name: 'syscollector' + - name: syscollector elements: - disabled: value: 'yes' @@ -56,4 +56,5 @@ - section: auth elements: - disabled: - value: 'no' \ No newline at end of file + value: 'no' + \ No newline at end of file diff --git a/tests/integration/test_vulnerability_detector/test_scan_results/data/test_cases/cases_scan_updated_package_still_vulnerable.yaml b/tests/integration/test_vulnerability_detector/test_scan_results/data/test_cases/cases_scan_updated_package_still_vulnerable.yaml index 65095ec882..9d418fdb0f 100644 --- a/tests/integration/test_vulnerability_detector/test_scan_results/data/test_cases/cases_scan_updated_package_still_vulnerable.yaml +++ b/tests/integration/test_vulnerability_detector/test_scan_results/data/test_cases/cases_scan_updated_package_still_vulnerable.yaml @@ -1,14 +1,14 @@ -- name: 'Alert vulnerability removal' - description: 'Alert when a package is removed from the database' +- name: no_alert_updated_package_still_vulnerable + description: When a package is updated to still vulnerable version, no alert appears showing package vuln as solved configuration_parameters: null metadata: - provider_name: 'canonical' - system: 'FOCAL' - oval_feed: 'custom_feed_updated_packace_still_vulnerable.xml' - nvd_feed: 'real_nvd_feed.json' + provider_name: canonical + system: FOCAL + oval_feed: custom_feed_updated_packace_still_vulnerable.xml + nvd_feed: real_nvd_feed.json oval_feed_tag: CUSTOM_OVAL_FEED nvd_feed_tag: CUSTOM_NVD_JSON_FEED - test_package_version: '1.0.0' - test_package_version_still_vulnerable: '9.0.0' + test_package_version: 1.0.0 + test_package_version_still_vulnerable: 9.0.0 test_package_name: custom-package-0 cve: CVE-2023 diff --git a/tests/integration/test_vulnerability_detector/test_scan_results/test_scan_updated_package_still_vulnerable.py b/tests/integration/test_vulnerability_detector/test_scan_results/test_scan_updated_package_still_vulnerable.py index 3807bce0e9..4ea18ac5a6 100644 --- a/tests/integration/test_vulnerability_detector/test_scan_results/test_scan_updated_package_still_vulnerable.py +++ b/tests/integration/test_vulnerability_detector/test_scan_results/test_scan_updated_package_still_vulnerable.py @@ -90,7 +90,7 @@ @pytest.mark.parametrize('configuration, metadata, agent_system', zip(configurations, configuration_metadata, systems), ids=test_case_ids) def test_vulnerability_updated_package_still_vulnerable(configuration, metadata, agent_system, - set_wazuh_configuration_vdt,truncate_monitored_files, + set_wazuh_configuration_vdt, truncate_monitored_files, clean_cve_tables_func, setup_log_monitor, prepare_full_scan_with_vuln_packages_and_custom_system, restart_modulesd_function): @@ -179,7 +179,7 @@ def test_vulnerability_updated_package_still_vulnerable(configuration, metadata, # Check the new version of the package generates and alert evm.check_vulnerability_affects_alert(package=metadata['test_package_name'], cve=metadata['cve'], agent_id=agent_id) - + # Check the old version of the package being removed is not shown as solved with pytest.raises(TimeoutError): evm.check_vulnerability_scan_remove_alert(metadata['test_package_name'], metadata['cve'], agent_id=agent_id)