From 58c34a2473d8b5ccfdb0600daafb66251e2749cb Mon Sep 17 00:00:00 2001 From: Mateo Cervilla Date: Mon, 31 Jul 2023 19:40:02 -0300 Subject: [PATCH] style(#3723): minor fixes --- .../wazuh_testing/mocking/__init__.py | 15 +++++++-------- .../cpe_indexing_packages.yaml | 2 +- .../cpe_indexing_system.yaml | 2 +- .../test_feeds/test_duplicate_feeds.py | 3 ++- .../data/test_cases/cases_update_interval.yaml | 1 - ...ion_scan_provider_and_nvd_vulnerabilities.yaml | 1 - ...nfiguration_scan_provider_vulnerabilities.yaml | 1 - .../configuration_scan_vulnerability_removal.yaml | 7 +++---- .../cases_scan_vulnerability_removal.yaml | 2 +- 9 files changed, 15 insertions(+), 19 deletions(-) diff --git a/deps/wazuh_testing/wazuh_testing/mocking/__init__.py b/deps/wazuh_testing/wazuh_testing/mocking/__init__.py index d68b6c723d..2001f5a162 100644 --- a/deps/wazuh_testing/wazuh_testing/mocking/__init__.py +++ b/deps/wazuh_testing/wazuh_testing/mocking/__init__.py @@ -134,14 +134,13 @@ 'node_name': 'node01', 'date_add': '1652381429', 'last_keepalive': '253402300799', 'sync_status': 'synced', 'connection_status': 'active'}, 'AlmaLinux-8': {'hostname': 'localhost', 'architecture': 'x64', 'os_name': 'AlmaLinux', 'os_version': '8', - 'os_codename': '', 'os_major': '8', 'os_minor': '', 'os_patch': '', 'os_build': '', - 'os_platform': 'almalinux', 'sysname': 'Linux', 'release': '5.3.18-22-default', 'version': 'Wazuh v4.4.0', - 'os_release': '', 'checksum': '1652388661375945607', 'name': 'ALMALINUX8', 'ip': '127.0.0.1', - 'register_ip': 'any', 'internal_key': '', - 'os_uname': 'Linux |localhost|5.3.18-22-default |#1 SMP Wed Jun 3 12:16:43 UTC 2020 (720aeba)|x86_64', - 'os_arch': 'x64', 'config_sum': '', 'merged_sum': '', 'manager_host': 'localhost.localdomain', - 'node_name': 'node01', 'date_add': '1652381429', 'last_keepalive': '253402300799', - 'sync_status': 'synced', 'connection_status': 'active'} + 'os_codename': '', 'os_major': '8', 'os_minor': '', 'os_patch': '', 'os_build': '', + 'os_platform': 'almalinux', 'sysname': 'Linux', 'release': '5.3.18-22-default', + 'version': 'Wazuh v4.4.0', 'os_release': '', 'checksum': '1652388661375945607', + 'name': 'ALMALINUX8', 'ip': '127.0.0.1', 'register_ip': 'any', 'internal_key': '', + 'os_arch': 'x64', 'config_sum': '', 'merged_sum': '', 'manager_host': 'localhost.localdomain', + 'node_name': 'node01', 'date_add': '1652381429', 'last_keepalive': '253402300799', + 'sync_status': 'synced', 'connection_status': 'active'} } diff --git a/tests/integration/test_vulnerability_detector/test_feeds/data/configuration_template/cpe_indexing_packages.yaml b/tests/integration/test_vulnerability_detector/test_feeds/data/configuration_template/cpe_indexing_packages.yaml index ffaadbf730..c05e57379c 100644 --- a/tests/integration/test_vulnerability_detector/test_feeds/data/configuration_template/cpe_indexing_packages.yaml +++ b/tests/integration/test_vulnerability_detector/test_feeds/data/configuration_template/cpe_indexing_packages.yaml @@ -76,4 +76,4 @@ - name: 'syscollector' elements: - disabled: - value: 'yes' \ No newline at end of file + value: 'yes' diff --git a/tests/integration/test_vulnerability_detector/test_feeds/data/configuration_template/cpe_indexing_system.yaml b/tests/integration/test_vulnerability_detector/test_feeds/data/configuration_template/cpe_indexing_system.yaml index b5968d5bd1..38aa810fe2 100644 --- a/tests/integration/test_vulnerability_detector/test_feeds/data/configuration_template/cpe_indexing_system.yaml +++ b/tests/integration/test_vulnerability_detector/test_feeds/data/configuration_template/cpe_indexing_system.yaml @@ -78,4 +78,4 @@ - name: 'syscollector' elements: - disabled: - value: 'yes' \ No newline at end of file + value: 'yes' diff --git a/tests/integration/test_vulnerability_detector/test_feeds/test_duplicate_feeds.py b/tests/integration/test_vulnerability_detector/test_feeds/test_duplicate_feeds.py index 438e72723c..8e84201b85 100644 --- a/tests/integration/test_vulnerability_detector/test_feeds/test_duplicate_feeds.py +++ b/tests/integration/test_vulnerability_detector/test_feeds/test_duplicate_feeds.py @@ -93,7 +93,8 @@ # Set offline custom feeds configuration to_modify = ['CUSTOM_REDHAT_OVAL_FEED_PATH', 'CUSTOM_REDHAT_JSON_FEED_PATH', 'CUSTOM_DEBIAN_OVAL_FEED_PATH', 'CUSTOM_DEBIAN_JSON_FEED_PATH', 'CUSTOM_CANONICAL_OVAL_FEED_PATH', 'CUSTOM_ALAS_JSON_FEED_PATH', - 'CUSTOM_ARCHLINUX_JSON_FEED_PATH', 'CUSTOM_MSU_JSON_FEED_PATH', 'CUSTOM_SUSE_OVAL_FEED', 'CUSTOM_ALMA_OVAL_FEED'] + 'CUSTOM_ARCHLINUX_JSON_FEED_PATH', 'CUSTOM_MSU_JSON_FEED_PATH', 'CUSTOM_SUSE_OVAL_FEED', + 'CUSTOM_ALMA_OVAL_FEED'] new_values = [custom_redhat_oval_feed_path, custom_redhat_json_feed_path, custom_debian_oval_feed_path, custom_debian_json_feed_path, custom_canonical_oval_feed_path, custom_alas_feed_path, custom_archlinux_feed_path, custom_msu_feed_path, custom_suse_feed_path, custom_alma_feed_path] diff --git a/tests/integration/test_vulnerability_detector/test_providers/data/test_cases/cases_update_interval.yaml b/tests/integration/test_vulnerability_detector/test_providers/data/test_cases/cases_update_interval.yaml index 5952310ec5..397bad93d7 100644 --- a/tests/integration/test_vulnerability_detector/test_providers/data/test_cases/cases_update_interval.yaml +++ b/tests/integration/test_vulnerability_detector/test_providers/data/test_cases/cases_update_interval.yaml @@ -77,4 +77,3 @@ metadata: provider_name: 'AlmaLinux 8' update_interval: '5s' - diff --git a/tests/integration/test_vulnerability_detector/test_scan_results/data/configuration_template/configuration_scan_provider_and_nvd_vulnerabilities.yaml b/tests/integration/test_vulnerability_detector/test_scan_results/data/configuration_template/configuration_scan_provider_and_nvd_vulnerabilities.yaml index 1d259b049e..050c66b1fa 100644 --- a/tests/integration/test_vulnerability_detector/test_scan_results/data/configuration_template/configuration_scan_provider_and_nvd_vulnerabilities.yaml +++ b/tests/integration/test_vulnerability_detector/test_scan_results/data/configuration_template/configuration_scan_provider_and_nvd_vulnerabilities.yaml @@ -273,7 +273,6 @@ - path: value: CUSTOM_NVD_JSON_FEED - # ALMALINUX configuration - sections: - section: vulnerability-detector diff --git a/tests/integration/test_vulnerability_detector/test_scan_results/data/configuration_template/configuration_scan_provider_vulnerabilities.yaml b/tests/integration/test_vulnerability_detector/test_scan_results/data/configuration_template/configuration_scan_provider_vulnerabilities.yaml index 8ea5cf77cc..54e33dbc60 100644 --- a/tests/integration/test_vulnerability_detector/test_scan_results/data/configuration_template/configuration_scan_provider_vulnerabilities.yaml +++ b/tests/integration/test_vulnerability_detector/test_scan_results/data/configuration_template/configuration_scan_provider_vulnerabilities.yaml @@ -272,7 +272,6 @@ - path: value: CUSTOM_NVD_JSON_FEED - # ALMALINUX configuration - sections: - section: vulnerability-detector diff --git a/tests/integration/test_vulnerability_detector/test_scan_results/data/configuration_template/configuration_scan_vulnerability_removal.yaml b/tests/integration/test_vulnerability_detector/test_scan_results/data/configuration_template/configuration_scan_vulnerability_removal.yaml index 99c3545a16..49020bb05c 100644 --- a/tests/integration/test_vulnerability_detector/test_scan_results/data/configuration_template/configuration_scan_vulnerability_removal.yaml +++ b/tests/integration/test_vulnerability_detector/test_scan_results/data/configuration_template/configuration_scan_vulnerability_removal.yaml @@ -179,7 +179,6 @@ - disabled: value: 'no' - # ALMALINUX configuration - sections: - section: vulnerability-detector @@ -214,17 +213,17 @@ value: '10s' - section: sca elements: - - enabled: + - enabled: value: 'no' - section: rootcheck elements: - - disabled: + - disabled: value: 'yes' - section: syscheck elements: - - disabled: + - disabled: value: 'yes' - section: wodle diff --git a/tests/integration/test_vulnerability_detector/test_scan_results/data/test_cases/cases_scan_vulnerability_removal.yaml b/tests/integration/test_vulnerability_detector/test_scan_results/data/test_cases/cases_scan_vulnerability_removal.yaml index 89422f38cc..ec389f7a31 100644 --- a/tests/integration/test_vulnerability_detector/test_scan_results/data/test_cases/cases_scan_vulnerability_removal.yaml +++ b/tests/integration/test_vulnerability_detector/test_scan_results/data/test_cases/cases_scan_vulnerability_removal.yaml @@ -23,7 +23,7 @@ metadata: provider_name: 'alas' system: 'ALAS_2022' - json_feed: 'custom_alas_2022_feed.json' + json_feed: 'custom_alas_2022_feed.json' oval_feed: null nvd_feed: 'custom_nvd_feed.json' json_feed_tag: CUSTOM_ALAS_2022_JSON_FEED