From 16c831357eac8f12053fe251917e9ad5fc2d4818 Mon Sep 17 00:00:00 2001 From: Mateo Cervilla Date: Fri, 28 Jul 2023 18:19:47 -0300 Subject: [PATCH 1/9] feat(#3723): Adds custom AlmaLinux OVAL feed --- .../almalinux/custom_alsa8_oval_feed.xml | 265 ++++++++++++++++++ 1 file changed, 265 insertions(+) create mode 100644 tests/integration/test_vulnerability_detector/data/feeds/almalinux/custom_alsa8_oval_feed.xml diff --git a/tests/integration/test_vulnerability_detector/data/feeds/almalinux/custom_alsa8_oval_feed.xml b/tests/integration/test_vulnerability_detector/data/feeds/almalinux/custom_alsa8_oval_feed.xml new file mode 100644 index 0000000000..951e0f6d17 --- /dev/null +++ b/tests/integration/test_vulnerability_detector/data/feeds/almalinux/custom_alsa8_oval_feed.xml @@ -0,0 +1,265 @@ + + + + AlmaLinux OS Errata System + 0.0.1 + 5.10 + 2023-01-12T08:52:26 + + + + + CVE-000 custom-package-0 + + CVE-000 custom-package-0 + + Important + Copyright 2022 AlmaLinux OS + + + + cpe:/a:almalinux:almalinux:8 + cpe:/a:almalinux:almalinux:8::highavailability + cpe:/a:almalinux:almalinux:8::resilientstorage + + + CVE-000 + + + + + + + + + + + + + + + + CVE-001 custom-package-1 + + CVE-001 custom-package-1 + + Important + Copyright 2022 AlmaLinux OS + + + + cpe:/a:almalinux:almalinux:8 + cpe:/a:almalinux:almalinux:8::highavailability + cpe:/a:almalinux:almalinux:8::resilientstorage + + + CVE-001 + + + + + + + + + + + + + + + + CVE-002 custom-package-2 + + CVE-002 custom-package-2 + + Important + Copyright 2022 AlmaLinux OS + + + + cpe:/a:almalinux:almalinux:8 + cpe:/a:almalinux:almalinux:8::highavailability + cpe:/a:almalinux:almalinux:8::resilientstorage + + + CVE-002 + + + + + + + + + + + + + + + + CVE-003 custom-package-3 + + CVE-003 custom-package-3 + + Important + Copyright 2022 AlmaLinux OS + + + + cpe:/a:almalinux:almalinux:8 + cpe:/a:almalinux:almalinux:8::highavailability + cpe:/a:almalinux:almalinux:8::resilientstorage + + + CVE-003 + + + + + + + + + + + + + + + + CVE-004 custom-package-4 + + CVE-004 custom-package-4 + + Important + Copyright 2022 AlmaLinux OS + + + + cpe:/a:almalinux:almalinux:8 + cpe:/a:almalinux:almalinux:8::highavailability + cpe:/a:almalinux:almalinux:8::resilientstorage + + + CVE-004 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + /etc/almalinux-release + + + custom-package-0 + + + custom-package-1 + + + custom-package-2 + + + custom-package-3 + + + custom-package-4 + + + + + ^almalinux-release + + + ^almalinux-release + ^8[^\d] + + + 51d6647ec21ad6ea + + + 0:2.0.0 + + + + + + 1 + + + + + From 76a0fcc8b17b48021cccb732f66a72010ccd3593 Mon Sep 17 00:00:00 2001 From: Mateo Cervilla Date: Fri, 28 Jul 2023 18:20:55 -0300 Subject: [PATCH 2/9] feat(#3723): Adds AlmaLinux to test_providers vd tests --- .../data/test_cases/cases_disabled.yaml | 18 ++++++++++++++++++ .../data/test_cases/cases_enabled.yaml | 18 ++++++++++++++++++ .../data/test_cases/cases_missing_os.yaml | 8 ++++++++ .../cases_multiple_provider_feeds.yaml | 10 ++++++++++ .../data/test_cases/cases_os.yaml | 18 ++++++++++++++++++ .../test_cases/cases_update_from_year.yaml | 9 +++++++++ .../data/test_cases/cases_update_interval.yaml | 11 +++++++++++ .../test_providers/test_enabled.py | 4 +++- .../test_providers/test_missing_os.py | 3 ++- .../test_multiple_provider_feeds.py | 12 +++++++++--- .../test_providers/test_os.py | 4 +++- .../test_providers/test_update_from_year.py | 3 ++- .../test_providers/test_update_interval.py | 3 ++- 13 files changed, 113 insertions(+), 8 deletions(-) diff --git a/tests/integration/test_vulnerability_detector/test_providers/data/test_cases/cases_disabled.yaml b/tests/integration/test_vulnerability_detector/test_providers/data/test_cases/cases_disabled.yaml index fa47be6f6d..03043ca472 100644 --- a/tests/integration/test_vulnerability_detector/test_providers/data/test_cases/cases_disabled.yaml +++ b/tests/integration/test_vulnerability_detector/test_providers/data/test_cases/cases_disabled.yaml @@ -204,3 +204,21 @@ OS: 15-desktop metadata: provider_name: SUSE Linux Enterprise Desktop 15 + +- name: ALMALINUX 8 + description: Test enabled AlmaLinux 8 + configuration_parameters: + ENABLED: 'no' + PROVIDER: almalinux + OS: '8' + metadata: + provider_name: AlmaLinux 8 + +- name: ALMALINUX 9 + description: Test enabled AlmaLinux 9 + configuration_parameters: + ENABLED: 'no' + PROVIDER: almalinux + OS: '9' + metadata: + provider_name: AlmaLinux 9 diff --git a/tests/integration/test_vulnerability_detector/test_providers/data/test_cases/cases_enabled.yaml b/tests/integration/test_vulnerability_detector/test_providers/data/test_cases/cases_enabled.yaml index 0f5ce73a6b..50df10b52b 100644 --- a/tests/integration/test_vulnerability_detector/test_providers/data/test_cases/cases_enabled.yaml +++ b/tests/integration/test_vulnerability_detector/test_providers/data/test_cases/cases_enabled.yaml @@ -204,3 +204,21 @@ OS: 15-desktop metadata: provider_name: SUSE Linux Enterprise Desktop 15 + +- name: ALMALINUX 8 + description: Test enabled AlmaLinux 8 + configuration_parameters: + ENABLED: 'yes' + PROVIDER: almalinux + OS: '8' + metadata: + provider_name: AlmaLinux 8 + +- name: ALMALINUX 9 + description: Test enabled AlmaLinux 9 + configuration_parameters: + ENABLED: 'yes' + PROVIDER: almalinux + OS: '9' + metadata: + provider_name: AlmaLinux 9 diff --git a/tests/integration/test_vulnerability_detector/test_providers/data/test_cases/cases_missing_os.yaml b/tests/integration/test_vulnerability_detector/test_providers/data/test_cases/cases_missing_os.yaml index 4ee00e780b..8bf3c8ee14 100644 --- a/tests/integration/test_vulnerability_detector/test_providers/data/test_cases/cases_missing_os.yaml +++ b/tests/integration/test_vulnerability_detector/test_providers/data/test_cases/cases_missing_os.yaml @@ -61,3 +61,11 @@ metadata: provider_name: 'SUSE Linux Enterprise' os: [''] + +- name: 'ALMALINUX' + description: 'ALMALINUX' + configuration_parameters: + PROVIDER: 'almalinux' + metadata: + provider_name: 'AlmaLinux' + os: [''] diff --git a/tests/integration/test_vulnerability_detector/test_providers/data/test_cases/cases_multiple_provider_feeds.yaml b/tests/integration/test_vulnerability_detector/test_providers/data/test_cases/cases_multiple_provider_feeds.yaml index 7bb30310df..340d19fcf9 100644 --- a/tests/integration/test_vulnerability_detector/test_providers/data/test_cases/cases_multiple_provider_feeds.yaml +++ b/tests/integration/test_vulnerability_detector/test_providers/data/test_cases/cases_multiple_provider_feeds.yaml @@ -22,3 +22,13 @@ provider_name: 'Debian Bullseye' oval_feed_path: CUSTOM_DEBIAN_OVAL_FEED_PATH json_feed_path: CUSTOM_DEBIAN_JSON_FEED_PATH + +- name: 'ALMALINUX' + description: 'Insert ALMALINUX OVAL feed from local path' + configuration_parameters: + PROVIDER: 'almalinux' + OS: '8' + OS_PATH: CUSTOM_ALMA_OVAL_FEED_PATH + metadata: + provider_name: 'AlmaLinux 8' + oval_feed_path: CUSTOM_ALMA_OVAL_FEED_PATH diff --git a/tests/integration/test_vulnerability_detector/test_providers/data/test_cases/cases_os.yaml b/tests/integration/test_vulnerability_detector/test_providers/data/test_cases/cases_os.yaml index aa586a9d9f..17acc4fa0c 100644 --- a/tests/integration/test_vulnerability_detector/test_providers/data/test_cases/cases_os.yaml +++ b/tests/integration/test_vulnerability_detector/test_providers/data/test_cases/cases_os.yaml @@ -204,3 +204,21 @@ metadata: provider_name: SUSE Linux Enterprise Server 15 os: 15-server + +- name: ALMALINUX 8 + description: AlmaLinux 8 + configuration_parameters: + PROVIDER: almalinux + OS: '8' + metadata: + provider_name: AlmaLinux 8 + os: '8' + +- name: ALMALINUX 9 + description: AlmaLinux 9 + configuration_parameters: + PROVIDER: almalinux + OS: '9' + metadata: + provider_name: AlmaLinux 9 + os: '9' diff --git a/tests/integration/test_vulnerability_detector/test_providers/data/test_cases/cases_update_from_year.yaml b/tests/integration/test_vulnerability_detector/test_providers/data/test_cases/cases_update_from_year.yaml index a45ebd6fd1..3b4b1d01e2 100644 --- a/tests/integration/test_vulnerability_detector/test_providers/data/test_cases/cases_update_from_year.yaml +++ b/tests/integration/test_vulnerability_detector/test_providers/data/test_cases/cases_update_from_year.yaml @@ -51,3 +51,12 @@ metadata: provider: 'suse' provider_name: 'SUSE Linux Enterprise Desktop 15' + +- name: 'ALMALINUX' + description: 'Test update from current year AlmaLinux' + configuration_parameters: + PROVIDER: 'almalinux' + OS: '8' + UPDATE_FROM_YEAR: YEAR + metadata: + provider: 'almalinux' 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 84529339b4..5952310ec5 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 @@ -67,3 +67,14 @@ metadata: provider_name: 'SUSE Linux Enterprise Server 15' update_interval: '5s' + +- name: 'ALMALINUX' + description: 'Test update interval 5s AlmaLinux' + configuration_parameters: + PROVIDER: 'almalinux' + OS: '8' + UPDATE_INTERVAL: '5s' + metadata: + provider_name: 'AlmaLinux 8' + update_interval: '5s' + diff --git a/tests/integration/test_vulnerability_detector/test_providers/test_enabled.py b/tests/integration/test_vulnerability_detector/test_providers/test_enabled.py index 8eccfd5930..2090da24b4 100644 --- a/tests/integration/test_vulnerability_detector/test_providers/test_enabled.py +++ b/tests/integration/test_vulnerability_detector/test_providers/test_enabled.py @@ -9,7 +9,7 @@ brief: Wazuh is able to detect vulnerabilities in the applications installed in agents using the Vulnerability Detector module. This software audit is performed through the integration of vulnerability feeds indexed by Redhat, - Canonical, Debian, Amazon Linux and NVD Database. + Canonical, Debian, Amazon Linux, Alma Linux and NVD Database. components: - vulnerability_detector @@ -46,6 +46,8 @@ - SUSE Linux Enterprise Server 11 - SUSE Linux Enterprise Server 12 - SUSE Linux Enterprise Server 15 + - Alma Linux 8 + - Alma Linux 9 references: - https://documentation.wazuh.com/current/user-manual/capabilities/vulnerability-detection/index.html diff --git a/tests/integration/test_vulnerability_detector/test_providers/test_missing_os.py b/tests/integration/test_vulnerability_detector/test_providers/test_missing_os.py index 5364c0d464..436d39febd 100644 --- a/tests/integration/test_vulnerability_detector/test_providers/test_missing_os.py +++ b/tests/integration/test_vulnerability_detector/test_providers/test_missing_os.py @@ -9,7 +9,7 @@ brief: Wazuh is able to detect vulnerabilities in the applications installed in agents using the Vulnerability Detector module. This software audit is performed through the integration of vulnerability feeds indexed by Redhat, - Canonical, Debian, Amazon Linux and NVD Database. + Canonical, Debian, Amazon Linux, Alma Linux and NVD Database. components: - vulnerability_detector @@ -46,6 +46,7 @@ - SUSE Linux Enterprise Server 11 - SUSE Linux Enterprise Server 12 - SUSE Linux Enterprise Server 15 + - Alma Linux references: - https://documentation.wazuh.com/current/user-manual/capabilities/vulnerability-detection/index.html diff --git a/tests/integration/test_vulnerability_detector/test_providers/test_multiple_provider_feeds.py b/tests/integration/test_vulnerability_detector/test_providers/test_multiple_provider_feeds.py index 46b3a4bb75..3aa3bbe214 100644 --- a/tests/integration/test_vulnerability_detector/test_providers/test_multiple_provider_feeds.py +++ b/tests/integration/test_vulnerability_detector/test_providers/test_multiple_provider_feeds.py @@ -9,7 +9,7 @@ brief: Wazuh is able to detect vulnerabilities in the applications installed in agents using the Vulnerability Detector module. This software audit is performed through the integration of vulnerability feeds indexed by Redhat, - Canonical, Debian, Amazon Linux and NVD Database. + Canonical, Debian, Amazon Linux, Alma Linux and NVD Database. components: - vulnerability_detector @@ -37,6 +37,7 @@ - Red Hat 8 - Ubuntu Focal - Ubuntu Bionic + - AlmaLinux 8 references: - https://documentation.wazuh.com/current/user-manual/capabilities/vulnerability-detection/index.html @@ -75,6 +76,7 @@ custom_redhat_json_feed_path = os.path.join(CUSTOM_FEED_PATH, 'feeds', 'redhat', vd.CUSTOM_REDHAT_JSON_FEED) custom_debian_oval_feed_path = os.path.join(CUSTOM_FEED_PATH, 'feeds', 'debian', vd.CUSTOM_DEBIAN_OVAL_FEED) custom_debian_json_feed_path = os.path.join(CUSTOM_FEED_PATH, 'feeds', 'debian', vd.CUSTOM_DEBIAN_JSON_FEED) +custom_alma_oval_feed_path = os.path.join(CUSTOM_FEED_PATH, 'feeds', 'almalinux', vd.CUSTOM_ALMA_OVAL_FEED) # Test configurations configuration_parameters, configuration_metadata, test_case_ids = configuration.get_test_cases_data( @@ -83,9 +85,9 @@ configuration_metadata) # 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_DEBIAN_JSON_FEED_PATH', 'CUSTOM_ALMA_OVAL_FEED_PATH'] new_values = [custom_redhat_oval_feed_path, custom_redhat_json_feed_path, custom_debian_oval_feed_path, - custom_debian_json_feed_path] + custom_debian_json_feed_path, custom_alma_oval_feed_path] configurations = configuration.update_configuration_template(configurations, to_modify, new_values) configuration_metadata = configuration.update_configuration_template(configuration_metadata, to_modify, new_values) @@ -154,6 +156,10 @@ def test_check_log_multiple_provider_feeds(configuration, metadata, set_wazuh_co evm.check_fetching_feed_log(metadata['json_feed_path']) evm.check_refresh_feed_log(metadata['provider_json_name']) evm.check_provider_database_update_finish_log(provider_name=metadata['provider_json_name']) + elif 'AlmaLinux' in metadata['provider_name']: + evm.check_fetching_feed_log(metadata['oval_feed_path']) + evm.check_refresh_feed_log(metadata['provider_name']) + evm.check_provider_database_update_finish_log(provider_name=metadata['provider_name']) else: raise ValueError(f"Unexpected {metadata['provider_name']} provider in the test case metadata list") diff --git a/tests/integration/test_vulnerability_detector/test_providers/test_os.py b/tests/integration/test_vulnerability_detector/test_providers/test_os.py index af86ea3a70..de1a315ec8 100644 --- a/tests/integration/test_vulnerability_detector/test_providers/test_os.py +++ b/tests/integration/test_vulnerability_detector/test_providers/test_os.py @@ -9,7 +9,7 @@ brief: Wazuh is able to detect vulnerabilities in the applications installed in agents using the Vulnerability Detector module. This software audit is performed through the integration of vulnerability feeds indexed by Redhat, - Canonical, Debian, Amazon Linux and NVD Database. + Canonical, Debian, Amazon Linux, Alma Linux and NVD Database. components: - vulnerability_detector @@ -47,6 +47,8 @@ - SUSE Linux Enterprise Server 11 - SUSE Linux Enterprise Server 12 - SUSE Linux Enterprise Server 15 + - Alma Linux 8 + - Alma Linux 9 references: - https://documentation.wazuh.com/current/user-manual/capabilities/vulnerability-detection/index.html diff --git a/tests/integration/test_vulnerability_detector/test_providers/test_update_from_year.py b/tests/integration/test_vulnerability_detector/test_providers/test_update_from_year.py index f20734b7d6..4695d28593 100644 --- a/tests/integration/test_vulnerability_detector/test_providers/test_update_from_year.py +++ b/tests/integration/test_vulnerability_detector/test_providers/test_update_from_year.py @@ -9,7 +9,7 @@ brief: Wazuh is able to detect vulnerabilities in the applications installed in agents using the Vulnerability Detector module. This software audit is performed through the integration of vulnerability feeds indexed by Redhat, - Canonical, Debian, Amazon Linux and NVD Database. + Canonical, Debian, Amazon Linux, Alma Linux and NVD Database. components: - vulnerability_detector @@ -41,6 +41,7 @@ - Ubuntu Trusty - Ubuntu Jammy - SUSE Linux Enterprise Desktop 15 + - AlmaLinux 8 references: - https://documentation.wazuh.com/current/user-manual/capabilities/vulnerability-detection/index.html diff --git a/tests/integration/test_vulnerability_detector/test_providers/test_update_interval.py b/tests/integration/test_vulnerability_detector/test_providers/test_update_interval.py index 2ada88d1d6..ffffe9db62 100644 --- a/tests/integration/test_vulnerability_detector/test_providers/test_update_interval.py +++ b/tests/integration/test_vulnerability_detector/test_providers/test_update_interval.py @@ -9,7 +9,7 @@ brief: Wazuh is able to detect vulnerabilities in the applications installed in agents using the Vulnerability Detector module. This software audit is performed through the integration of vulnerability feeds indexed by Redhat, - Canonical, Debian, Amazon Linux and NVD Database. + Canonical, Debian, Amazon Linux, Alma Linux and NVD Database. components: - vulnerability_detector @@ -42,6 +42,7 @@ - Ubuntu Trusty - Ubuntu Jammy - SUSE Linux Enterprise Server 15 + - AlmaLinux 8 references: - https://documentation.wazuh.com/current/user-manual/capabilities/vulnerability-detection/index.html From 51623d46c976364022a0868c685474fe78cf0073 Mon Sep 17 00:00:00 2001 From: Mateo Cervilla Date: Fri, 28 Jul 2023 18:21:24 -0300 Subject: [PATCH 3/9] feat(#3723): Adds AlmaLinux to test_scan_results vd tests --- ...onfiguration_scan_nvd_vulnerabilities.yaml | 6 ++ ...scan_provider_and_nvd_vulnerabilities.yaml | 28 +++++++++ ...uration_scan_provider_vulnerabilities.yaml | 28 +++++++++ ...ion_scan_vulnerabilities_triaged_null.yaml | 6 ++ ...figuration_scan_vulnerability_removal.yaml | 60 +++++++++++++++++++ .../data/test_cases/cases_no_agent_data.yaml | 7 +++ ...scan_provider_and_nvd_vulnerabilities.yaml | 12 ++++ .../cases_scan_provider_vulnerabilities.yaml | 12 ++++ .../cases_scan_vulnerability_removal.yaml | 19 ++++++ .../test_scan_nvd_vulnerabilities.py | 3 +- ...t_scan_provider_and_nvd_vulnerabilities.py | 3 +- .../test_scan_provider_vulnerabilities.py | 3 +- .../test_scan_vulnerabilities_triaged_null.py | 3 +- .../test_scan_vulnerability_removal.py | 3 +- 14 files changed, 188 insertions(+), 5 deletions(-) diff --git a/tests/integration/test_vulnerability_detector/test_scan_results/data/configuration_template/configuration_scan_nvd_vulnerabilities.yaml b/tests/integration/test_vulnerability_detector/test_scan_results/data/configuration_template/configuration_scan_nvd_vulnerabilities.yaml index e10e2b0fd9..c05e57379c 100644 --- a/tests/integration/test_vulnerability_detector/test_scan_results/data/configuration_template/configuration_scan_nvd_vulnerabilities.yaml +++ b/tests/integration/test_vulnerability_detector/test_scan_results/data/configuration_template/configuration_scan_nvd_vulnerabilities.yaml @@ -41,6 +41,12 @@ elements: - enabled: value: 'no' + - provider: + attributes: + - name: 'almalinux' + elements: + - enabled: + value: 'no' - provider: attributes: - name: 'nvd' 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 45c2c3bfb7..1d259b049e 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 @@ -272,3 +272,31 @@ value: 'yes' - path: value: CUSTOM_NVD_JSON_FEED + + +# ALMALINUX configuration +- sections: + - section: vulnerability-detector + elements: + - enabled: + value: 'yes' + - run_on_start: + value: 'yes' + - provider: + attributes: + - name: 'almalinux' + elements: + - enabled: + value: 'yes' + - os: + attributes: + - path: CUSTOM_ALMA_OVAL_FEED + value: '8' + - provider: + attributes: + - name: 'nvd' + elements: + - enabled: + value: 'yes' + - path: + value: CUSTOM_NVD_JSON_FEED 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 c064db94f5..8ea5cf77cc 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 @@ -271,3 +271,31 @@ value: 'yes' - path: value: CUSTOM_NVD_JSON_FEED + + +# ALMALINUX configuration +- sections: + - section: vulnerability-detector + elements: + - enabled: + value: 'yes' + - run_on_start: + value: 'yes' + - provider: + attributes: + - name: 'almalinux' + elements: + - enabled: + value: 'yes' + - os: + attributes: + - path: CUSTOM_ALMA_OVAL_FEED + value: '8' + - provider: + attributes: + - name: 'nvd' + elements: + - enabled: + value: 'yes' + - path: + value: CUSTOM_NVD_JSON_FEED diff --git a/tests/integration/test_vulnerability_detector/test_scan_results/data/configuration_template/configuration_scan_vulnerabilities_triaged_null.yaml b/tests/integration/test_vulnerability_detector/test_scan_results/data/configuration_template/configuration_scan_vulnerabilities_triaged_null.yaml index 38d57b9746..15a4d45e3f 100644 --- a/tests/integration/test_vulnerability_detector/test_scan_results/data/configuration_template/configuration_scan_vulnerabilities_triaged_null.yaml +++ b/tests/integration/test_vulnerability_detector/test_scan_results/data/configuration_template/configuration_scan_vulnerabilities_triaged_null.yaml @@ -49,6 +49,12 @@ elements: - enabled: value: 'no' + - provider: + attributes: + - name: almalinux + elements: + - enabled: + value: 'no' - provider: attributes: - name: nvd 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 fb675f8093..99c3545a16 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 @@ -178,3 +178,63 @@ elements: - disabled: value: 'no' + + +# ALMALINUX configuration +- sections: + - section: vulnerability-detector + elements: + - enabled: + value: 'yes' + - interval: + value: '5s' + - min_full_scan_interval: + value: '5s' + - run_on_start: + value: 'yes' + - provider: + attributes: + - name: 'almalinux' + elements: + - enabled: + value: 'yes' + - os: + attributes: + - path: CUSTOM_ALMA_OVAL_FEED + value: '8' + - provider: + attributes: + - name: 'nvd' + elements: + - enabled: + value: 'yes' + - path: + value: CUSTOM_NVD_JSON_FEED + - update_interval: + value: '10s' + - section: sca + elements: + - enabled: + value: 'no' + + - section: rootcheck + elements: + - disabled: + value: 'yes' + + - section: syscheck + elements: + - disabled: + value: 'yes' + + - section: wodle + attributes: + - name: 'syscollector' + elements: + - disabled: + value: 'yes' + + - section: auth + elements: + - disabled: + value: 'no' diff --git a/tests/integration/test_vulnerability_detector/test_scan_results/data/test_cases/cases_no_agent_data.yaml b/tests/integration/test_vulnerability_detector/test_scan_results/data/test_cases/cases_no_agent_data.yaml index 3482d58a35..8a7db2e9c1 100644 --- a/tests/integration/test_vulnerability_detector/test_scan_results/data/test_cases/cases_no_agent_data.yaml +++ b/tests/integration/test_vulnerability_detector/test_scan_results/data/test_cases/cases_no_agent_data.yaml @@ -74,3 +74,10 @@ NVD_JSON_PATH: CUSTOM_NVD_JSON_PATH metadata: system: SLES15 + +- name: 'ALMALINUX' + description: 'Scan ALMALINUX vulnerabilities using only the NVD feed' + configuration_parameters: + NVD_JSON_PATH: CUSTOM_NVD_JSON_PATH + metadata: + system: AlmaLinux-8 diff --git a/tests/integration/test_vulnerability_detector/test_scan_results/data/test_cases/cases_scan_provider_and_nvd_vulnerabilities.yaml b/tests/integration/test_vulnerability_detector/test_scan_results/data/test_cases/cases_scan_provider_and_nvd_vulnerabilities.yaml index 2ca86f4af9..21ec40c469 100644 --- a/tests/integration/test_vulnerability_detector/test_scan_results/data/test_cases/cases_scan_provider_and_nvd_vulnerabilities.yaml +++ b/tests/integration/test_vulnerability_detector/test_scan_results/data/test_cases/cases_scan_provider_and_nvd_vulnerabilities.yaml @@ -71,3 +71,15 @@ nvd_feed: 'custom_nvd_feed.json' oval_feed_tag: CUSTOM_SUSE_OVAL_FEED nvd_feed_tag: CUSTOM_NVD_JSON_FEED + +- name: 'ALMALINUX' + description: 'Scan ALMALINUX vulnerabilities using provider and NVD feed' + configuration_parameters: null + metadata: + provider_name: 'almalinux' + system: 'AlmaLinux-8' + json_feed: null + oval_feed: 'custom_alsa8_oval_feed.xml' + nvd_feed: 'custom_nvd_feed.json' + oval_feed_tag: CUSTOM_ALMA_OVAL_FEED + nvd_feed_tag: CUSTOM_NVD_JSON_FEED diff --git a/tests/integration/test_vulnerability_detector/test_scan_results/data/test_cases/cases_scan_provider_vulnerabilities.yaml b/tests/integration/test_vulnerability_detector/test_scan_results/data/test_cases/cases_scan_provider_vulnerabilities.yaml index 0e2b7c7e0c..50acbc2529 100644 --- a/tests/integration/test_vulnerability_detector/test_scan_results/data/test_cases/cases_scan_provider_vulnerabilities.yaml +++ b/tests/integration/test_vulnerability_detector/test_scan_results/data/test_cases/cases_scan_provider_vulnerabilities.yaml @@ -71,3 +71,15 @@ nvd_feed: 'custom_nvd_alternative_feed.json' oval_feed_tag: CUSTOM_SUSE_OVAL_FEED nvd_feed_tag: CUSTOM_NVD_JSON_FEED + +- name: 'ALMALINUX' + description: 'Scan ALMALINUX vulnerabilities using provider and NVD feed' + configuration_parameters: null + metadata: + provider_name: 'almalinux' + system: 'AlmaLinux-8' + json_feed: null + oval_feed: 'custom_alsa8_oval_feed.xml' + nvd_feed: 'custom_nvd_alternative_feed.json' + oval_feed_tag: CUSTOM_ALMA_OVAL_FEED + nvd_feed_tag: CUSTOM_NVD_JSON_FEED 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 886b6ea83d..89422f38cc 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 @@ -54,3 +54,22 @@ test_package_1_name: 'custom-package-1' test_package_0_cve: 'CVE-000' test_package_1_cve: 'CVE-001' + +- name: 'Alert vulnerability removal - ALMALINUX' + description: 'Alert when a package is removed from the database' + configuration_parameters: null + metadata: + provider_name: 'almalinux' + system: 'AlmaLinux-8' + json_feed: null + oval_feed: 'custom_alsa8_oval_feed.xml' + nvd_feed: 'custom_nvd_feed.json' + oval_feed_tag: CUSTOM_ALMA_OVAL_FEED + nvd_feed_tag: CUSTOM_NVD_JSON_FEED + test_package_vendor: 'WazuhIntegrationTests' + test_package_version: '1.0.0' + test_package_version_not_vulnerable: '2.1.0' + test_package_0_name: 'custom-package-0' + test_package_1_name: 'custom-package-1' + test_package_0_cve: 'CVE-000' + test_package_1_cve: 'CVE-001' diff --git a/tests/integration/test_vulnerability_detector/test_scan_results/test_scan_nvd_vulnerabilities.py b/tests/integration/test_vulnerability_detector/test_scan_results/test_scan_nvd_vulnerabilities.py index 41f208fe0a..a09caf49f2 100644 --- a/tests/integration/test_vulnerability_detector/test_scan_results/test_scan_nvd_vulnerabilities.py +++ b/tests/integration/test_vulnerability_detector/test_scan_results/test_scan_nvd_vulnerabilities.py @@ -9,7 +9,7 @@ brief: Wazuh is able to detect vulnerabilities in the applications installed in agents using the Vulnerability Detector module. This software audit is performed through the integration of vulnerability feeds indexed by Redhat, - Canonical, Debian, Amazon Linux and NVD Database. + Canonical, Debian, Amazon Linux, Alma Linux and NVD Database. components: - vulnerability_detector @@ -43,6 +43,7 @@ - SUSE Enterprise Server 11 - SUSE Enterprise Server 12 - SUSE Enterprise Server 15 + - Alma Linux 8 references: - https://documentation.wazuh.com/current/user-manual/capabilities/vulnerability-detection/index.html diff --git a/tests/integration/test_vulnerability_detector/test_scan_results/test_scan_provider_and_nvd_vulnerabilities.py b/tests/integration/test_vulnerability_detector/test_scan_results/test_scan_provider_and_nvd_vulnerabilities.py index 43dbe2fa73..36885584e0 100644 --- a/tests/integration/test_vulnerability_detector/test_scan_results/test_scan_provider_and_nvd_vulnerabilities.py +++ b/tests/integration/test_vulnerability_detector/test_scan_results/test_scan_provider_and_nvd_vulnerabilities.py @@ -9,7 +9,7 @@ brief: Wazuh is able to detect vulnerabilities in the applications installed in agents using the Vulnerability Detector module. This software audit is performed through the integration of vulnerability feeds indexed by Redhat, - Canonical, Debian, Amazon Linux and NVD Database. + Canonical, Debian, Amazon Linux, Alma Linux and NVD Database. components: - vulnerability_detector @@ -43,6 +43,7 @@ - Suse Enterprise Linux Desktop 15 - Suse Enterprise Linux Desktop 12 - Suse Enterprise Linux Desktop 11 + - Alma Linux 8 references: - https://documentation.wazuh.com/current/user-manual/capabilities/vulnerability-detection/index.html diff --git a/tests/integration/test_vulnerability_detector/test_scan_results/test_scan_provider_vulnerabilities.py b/tests/integration/test_vulnerability_detector/test_scan_results/test_scan_provider_vulnerabilities.py index b2bfd8bc33..e1a57e07a2 100644 --- a/tests/integration/test_vulnerability_detector/test_scan_results/test_scan_provider_vulnerabilities.py +++ b/tests/integration/test_vulnerability_detector/test_scan_results/test_scan_provider_vulnerabilities.py @@ -9,7 +9,7 @@ brief: Wazuh is able to detect vulnerabilities in the applications installed in agents using the Vulnerability Detector module. This software audit is performed through the integration of vulnerability feeds indexed by Redhat, - Canonical, Debian, Amazon Linux and NVD Database. + Canonical, Debian, Amazon Linux, Alma Linux and NVD Database. components: - vulnerability_detector @@ -43,6 +43,7 @@ - Suse Enterprise Linux Desktop 15 - Suse Enterprise Linux Desktop 12 - Suse Enterprise Linux Desktop 11 + - Alma Linux 8 references: - https://documentation.wazuh.com/current/user-manual/capabilities/vulnerability-detection/index.html diff --git a/tests/integration/test_vulnerability_detector/test_scan_results/test_scan_vulnerabilities_triaged_null.py b/tests/integration/test_vulnerability_detector/test_scan_results/test_scan_vulnerabilities_triaged_null.py index bd3b47868d..d95b131138 100644 --- a/tests/integration/test_vulnerability_detector/test_scan_results/test_scan_vulnerabilities_triaged_null.py +++ b/tests/integration/test_vulnerability_detector/test_scan_results/test_scan_vulnerabilities_triaged_null.py @@ -9,7 +9,7 @@ brief: Wazuh is able to detect vulnerabilities in the applications installed in agents using the Vulnerability Detector module. This software audit is performed through the integration of vulnerability feeds indexed by Redhat, - Canonical, Debian, Amazon Linux and NVD Database. + Canonical, Debian, Amazon Linux, Alma Linux and NVD Database. components: - vulnerability_detector @@ -43,6 +43,7 @@ - SUSE Enterprise Server 11 - SUSE Enterprise Server 12 - SUSE Enterprise Server 15 + - Alma Linux references: - https://documentation.wazuh.com/current/user-manual/capabilities/vulnerability-detection/index.html diff --git a/tests/integration/test_vulnerability_detector/test_scan_results/test_scan_vulnerability_removal.py b/tests/integration/test_vulnerability_detector/test_scan_results/test_scan_vulnerability_removal.py index 145a1059cc..27dac672b0 100644 --- a/tests/integration/test_vulnerability_detector/test_scan_results/test_scan_vulnerability_removal.py +++ b/tests/integration/test_vulnerability_detector/test_scan_results/test_scan_vulnerability_removal.py @@ -9,7 +9,7 @@ brief: Wazuh is able to detect vulnerabilities in the applications installed in agents using the Vulnerability Detector module. This software audit is performed through the integration of vulnerability feeds indexed by Redhat, - Canonical, Debian, SUSE, Amazon Linux and NVD Database. + Canonical, Debian, SUSE, Amazon Linux, Alma Linux and NVD Database. components: - vulnerability_detector @@ -44,6 +44,7 @@ - Suse Enterprise Linux Desktop 15 - Suse Enterprise Linux Desktop 12 - Suse Enterprise Linux Desktop 11 + - Alma Linux 8 references: - https://documentation.wazuh.com/current/user-manual/capabilities/vulnerability-detection/index.html From bc8d055fef15239a71a3da649ffe7da974f02fd3 Mon Sep 17 00:00:00 2001 From: Mateo Cervilla Date: Fri, 28 Jul 2023 18:21:55 -0300 Subject: [PATCH 4/9] feat(#3723): Adds AlmaLinux to test_feeds vd tests --- ...onfiguration_import_invalid_feed_type.yaml | 47 +++++++++++++++++++ .../cpe_indexing_packages.yaml | 6 +++ .../cpe_indexing_system.yaml | 6 +++ .../data/test_cases/cases_download_feeds.yaml | 22 +++++++++ .../test_cases/cases_duplicate_feeds.yaml | 10 ++++ .../cases_import_invalid_feed_type.yaml | 9 ++++ .../cases_validate_xml_feed_content.yaml | 20 ++++++++ .../test_feeds/test_cpe_indexing.py | 3 +- .../test_feeds/test_download_feeds.py | 4 +- .../test_feeds/test_duplicate_feeds.py | 8 ++-- .../test_import_invalid_feed_type.py | 3 +- .../test_feeds/test_msu_inventory.py | 3 +- .../test_feeds/test_validate_feed_content.py | 4 +- 13 files changed, 137 insertions(+), 8 deletions(-) diff --git a/tests/integration/test_vulnerability_detector/test_feeds/data/configuration_template/configuration_import_invalid_feed_type.yaml b/tests/integration/test_vulnerability_detector/test_feeds/data/configuration_template/configuration_import_invalid_feed_type.yaml index f48026fdb0..c1c6ab903f 100644 --- a/tests/integration/test_vulnerability_detector/test_feeds/data/configuration_template/configuration_import_invalid_feed_type.yaml +++ b/tests/integration/test_vulnerability_detector/test_feeds/data/configuration_template/configuration_import_invalid_feed_type.yaml @@ -365,3 +365,50 @@ elements: - disabled: value: 'yes' + +# AlmaLinux configuration +- sections: + - section: vulnerability-detector + elements: + - enabled: + value: 'yes' + - run_on_start: + value: 'yes' + - provider: + attributes: + - name: 'almalinux' + elements: + - enabled: + value: 'yes' + - os: + attributes: + - url: CUSTOM_FEED_URL + value: '8' + - provider: + attributes: + - name: 'nvd' + elements: + - enabled: + value: 'no' + + - section: sca + elements: + - enabled: + value: 'no' + + - section: rootcheck + elements: + - disabled: + value: 'yes' + + - section: syscheck + elements: + - disabled: + value: 'yes' + + - section: wodle + attributes: + - name: 'syscollector' + elements: + - disabled: + value: 'yes' 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 f3f6e05252..ffaadbf730 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 @@ -41,6 +41,12 @@ elements: - enabled: value: 'no' + - provider: + attributes: + - name: 'almalinux' + elements: + - enabled: + value: 'no' - provider: attributes: - name: 'nvd' 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 b683409c1b..b5968d5bd1 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 @@ -43,6 +43,12 @@ elements: - enabled: value: 'no' + - provider: + attributes: + - name: 'almalinux' + elements: + - enabled: + value: 'no' - provider: attributes: - name: 'nvd' diff --git a/tests/integration/test_vulnerability_detector/test_feeds/data/test_cases/cases_download_feeds.yaml b/tests/integration/test_vulnerability_detector/test_feeds/data/test_cases/cases_download_feeds.yaml index 094dc2cd5e..dfb8b365fb 100644 --- a/tests/integration/test_vulnerability_detector/test_feeds/data/test_cases/cases_download_feeds.yaml +++ b/tests/integration/test_vulnerability_detector/test_feeds/data/test_cases/cases_download_feeds.yaml @@ -254,3 +254,25 @@ provider_os: SLED15 download_timeout: 360 update_treshold_weeks: 2 + +- name: AlmaLinux 8 + description: AlmaLinux 8 provider + configuration_parameters: + PROVIDER: almalinux + OS: '8' + metadata: + provider_name: AlmaLinux 8 + provider_os: 'AlmaLinux-8' + download_timeout: 360 + update_treshold_weeks: 2 + +- name: AlmaLinux 9 + description: AlmaLinux 9 provider + configuration_parameters: + PROVIDER: almalinux + OS: '9' + metadata: + provider_name: AlmaLinux 9 + provider_os: 'AlmaLinux-9' + download_timeout: 360 + update_treshold_weeks: 2 diff --git a/tests/integration/test_vulnerability_detector/test_feeds/data/test_cases/cases_duplicate_feeds.yaml b/tests/integration/test_vulnerability_detector/test_feeds/data/test_cases/cases_duplicate_feeds.yaml index d49331f257..45850ef076 100644 --- a/tests/integration/test_vulnerability_detector/test_feeds/data/test_cases/cases_duplicate_feeds.yaml +++ b/tests/integration/test_vulnerability_detector/test_feeds/data/test_cases/cases_duplicate_feeds.yaml @@ -109,3 +109,13 @@ metadata: provider_name: 'SUSE Linux Enterprise Desktop 15' provider_json_name: '' + +- name: 'AlmaLinux' + description: 'AlmaLinux 8 provider' + configuration_parameters: + PROVIDER: 'almalinux' + OS: '8' + OS_PATH: CUSTOM_ALMA_OVAL_FEED + metadata: + provider_name: 'AlmaLinux 8' + provider_json_name: '' diff --git a/tests/integration/test_vulnerability_detector/test_feeds/data/test_cases/cases_import_invalid_feed_type.yaml b/tests/integration/test_vulnerability_detector/test_feeds/data/test_cases/cases_import_invalid_feed_type.yaml index d623a49b7f..7d7ecb9512 100644 --- a/tests/integration/test_vulnerability_detector/test_feeds/data/test_cases/cases_import_invalid_feed_type.yaml +++ b/tests/integration/test_vulnerability_detector/test_feeds/data/test_cases/cases_import_invalid_feed_type.yaml @@ -70,3 +70,12 @@ custom_feed_url: https://s3.amazonaws.com/ci.wazuh.com/qa/testing_files/dummy_files/dummy.jpg provider_feed_names: - "suse SLED15" + +- name: 'AlmaLinux - JPG' + description: 'Check downloading and parsing of JPG file as invalid feed in AlmaLinux provider' + configuration_parameters: null + metadata: + target: 'almalinux' + custom_feed_url: https://s3.amazonaws.com/ci.wazuh.com/qa/testing_files/dummy_files/dummy.jpg + provider_feed_names: + - "almalinux 8" diff --git a/tests/integration/test_vulnerability_detector/test_feeds/data/test_cases/cases_validate_xml_feed_content.yaml b/tests/integration/test_vulnerability_detector/test_feeds/data/test_cases/cases_validate_xml_feed_content.yaml index 10388a91e1..6daac94481 100644 --- a/tests/integration/test_vulnerability_detector/test_feeds/data/test_cases/cases_validate_xml_feed_content.yaml +++ b/tests/integration/test_vulnerability_detector/test_feeds/data/test_cases/cases_validate_xml_feed_content.yaml @@ -176,3 +176,23 @@ path: /tmp/suse.linux.enterprise.server.15.xml extension: xml url: https://ftp.suse.com/pub/projects/security/oval/suse.linux.enterprise.server.15.xml + +- name: AlmaLinux 8 + description: AlmaLinux 8 provider + configuration_parameters: + metadata: + provider_name: AlmaLinux 8 + expected_format: xml + path: /tmp/org.almalinux.alsa-8.xml + extension: xml + url: https://security.almalinux.org/oval/org.almalinux.alsa-8.xml + +- name: AlmaLinux 9 + description: AlmaLinux 9 provider + configuration_parameters: + metadata: + provider_name: AlmaLinux 9 + expected_format: xml + path: /tmp/org.almalinux.alsa-9.xml + extension: xml + url: https://security.almalinux.org/oval/org.almalinux.alsa-9.xml diff --git a/tests/integration/test_vulnerability_detector/test_feeds/test_cpe_indexing.py b/tests/integration/test_vulnerability_detector/test_feeds/test_cpe_indexing.py index cc53fed7cd..a2bb38232a 100644 --- a/tests/integration/test_vulnerability_detector/test_feeds/test_cpe_indexing.py +++ b/tests/integration/test_vulnerability_detector/test_feeds/test_cpe_indexing.py @@ -9,7 +9,7 @@ brief: Wazuh is able to detect vulnerabilities in the applications installed in agents using the Vulnerability Detector module. This software audit is performed through the integration of vulnerability feeds indexed by Redhat, - Canonical, Debian, Amazon Linux and NVD Database. + Canonical, Debian, Amazon Linux, Alma Linux and NVD Database. components: - vulnerability_detector @@ -36,6 +36,7 @@ - Red Hat 8 - Ubuntu Focal - Ubuntu Bionic + - AlmaLinux references: - https://documentation.wazuh.com/current/user-manual/capabilities/vulnerability-detection/index.html diff --git a/tests/integration/test_vulnerability_detector/test_feeds/test_download_feeds.py b/tests/integration/test_vulnerability_detector/test_feeds/test_download_feeds.py index 21aaf89b5b..b899ba75be 100644 --- a/tests/integration/test_vulnerability_detector/test_feeds/test_download_feeds.py +++ b/tests/integration/test_vulnerability_detector/test_feeds/test_download_feeds.py @@ -9,7 +9,7 @@ brief: Wazuh is able to detect vulnerabilities in the applications installed in agents using the Vulnerability Detector module. This software audit is performed through the integration of vulnerability feeds indexed by Redhat, - Canonical, Debian, Amazon Linux and NVD Database. + Canonical, Debian, Amazon Linux, Alma Linux and NVD Database. components: - vulnerability_detector @@ -47,6 +47,8 @@ - SUSE Linux Enterprise Server 11 - SUSE Linux Enterprise Server 12 - SUSE Linux Enterprise Server 15 + - AlmaLinux 8 + - AlmaLinux 9 references: - https://documentation.wazuh.com/current/user-manual/capabilities/vulnerability-detection/ 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 c3d71b2256..438e72723c 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 @@ -9,7 +9,7 @@ brief: Wazuh is able to detect vulnerabilities in the applications installed in agents using the Vulnerability Detector module. This software audit is performed through the integration of vulnerability feeds indexed by Redhat, - Canonical, Debian, Amazon Linux and NVD Database. + Canonical, Debian, Amazon Linux, Alma Linux and NVD Database. components: - vulnerability_detector @@ -42,6 +42,7 @@ - Ubuntu Focal - Ubuntu Jammy - SUSE Linux Enterprise Desktop 15 + - AlmaLinux 8 references: - https://documentation.wazuh.com/current/user-manual/capabilities/vulnerability-detection/index.html @@ -81,6 +82,7 @@ custom_archlinux_feed_path = os.path.join(CUSTOM_FEED_PATH, 'feeds', 'arch', vd.CUSTOM_ARCHLINUX_JSON_FEED) custom_msu_feed_path = os.path.join(CUSTOM_FEED_PATH, 'feeds', 'msu', vd.CUSTOM_MSU_JSON_FEED) custom_suse_feed_path = os.path.join(CUSTOM_FEED_PATH, 'feeds', 'suse', vd.CUSTOM_SUSE_OVAL_FEED) +custom_alma_feed_path = os.path.join(CUSTOM_FEED_PATH, 'feeds', 'almalinux', vd.CUSTOM_ALMA_OVAL_FEED) # Test configurations configuration_parameters, configuration_metadata, test_case_ids = configuration.get_test_cases_data( @@ -91,10 +93,10 @@ # 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_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_archlinux_feed_path, custom_msu_feed_path, custom_suse_feed_path, custom_alma_feed_path] configurations = configuration.update_configuration_template(configurations, to_modify, new_values) configuration_metadata = configuration.update_configuration_template(configuration_metadata, to_modify, new_values) diff --git a/tests/integration/test_vulnerability_detector/test_feeds/test_import_invalid_feed_type.py b/tests/integration/test_vulnerability_detector/test_feeds/test_import_invalid_feed_type.py index 86c71a7e6a..f341c0bccc 100644 --- a/tests/integration/test_vulnerability_detector/test_feeds/test_import_invalid_feed_type.py +++ b/tests/integration/test_vulnerability_detector/test_feeds/test_import_invalid_feed_type.py @@ -9,7 +9,7 @@ brief: Wazuh is able to detect vulnerabilities in the applications installed in agents using the Vulnerability Detector module. This software audit is performed through the integration of vulnerability feeds indexed by Redhat, - Canonical, Debian, Amazon Linux and NVD Database. + Canonical, Debian, Amazon Linux, Alma Linux and NVD Database. components: - vulnerability_detector @@ -40,6 +40,7 @@ - Ubuntu Focal - Ubuntu Jammy - SUSE Linux Enterprise Desktop 15 + - AlmaLinux 8 references: - https://documentation.wazuh.com/current/user-manual/capabilities/vulnerability-detection/index.html diff --git a/tests/integration/test_vulnerability_detector/test_feeds/test_msu_inventory.py b/tests/integration/test_vulnerability_detector/test_feeds/test_msu_inventory.py index b03c56be84..b5372f1e81 100644 --- a/tests/integration/test_vulnerability_detector/test_feeds/test_msu_inventory.py +++ b/tests/integration/test_vulnerability_detector/test_feeds/test_msu_inventory.py @@ -9,7 +9,7 @@ brief: Wazuh is able to detect vulnerabilities in the applications installed in agents using the Vulnerability Detector module. This software audit is performed through the integration of vulnerability feeds indexed by Redhat, - Canonical, Debian, Amazon Linux and NVD Database. + Canonical, Debian, Amazon Linux, Alma Linux and NVD Database. components: - vulnerability_detector @@ -47,6 +47,7 @@ - SUSE Linux Enterprise Server 11 - SUSE Linux Enterprise Server 12 - SUSE Linux Enterprise Server 15 + - AlmaLinux references: - https://documentation.wazuh.com/current/user-manual/capabilities/vulnerability-detection/ diff --git a/tests/integration/test_vulnerability_detector/test_feeds/test_validate_feed_content.py b/tests/integration/test_vulnerability_detector/test_feeds/test_validate_feed_content.py index fa3e036749..606da604bd 100644 --- a/tests/integration/test_vulnerability_detector/test_feeds/test_validate_feed_content.py +++ b/tests/integration/test_vulnerability_detector/test_feeds/test_validate_feed_content.py @@ -9,7 +9,7 @@ brief: Wazuh is able to detect vulnerabilities in the applications installed in agents using the Vulnerability Detector module. This software audit is performed through the integration of vulnerability feeds indexed by Redhat, - Canonical, Debian, Amazon Linux and NVD Database. + Canonical, Debian, Amazon Linux, Alma Linux and NVD Database. components: - vulnerability_detector @@ -46,6 +46,8 @@ - SUSE Linux Enterprise Server 11 - SUSE Linux Enterprise Server 12 - SUSE Linux Enterprise Server 15 + - AlmaLinux 8 + - AlmaLinux 9 references: - https://documentation.wazuh.com/current/user-manual/capabilities/vulnerability-detection/ From 21afb3f7172de006d12ffa5a364ab926e65166b4 Mon Sep 17 00:00:00 2001 From: Mateo Cervilla Date: Fri, 28 Jul 2023 18:23:09 -0300 Subject: [PATCH 5/9] feat(#3723): Adds AlmaLinux to the remaining vd tests description --- .../test_cpe_helper/test_cpe_helper.py | 2 +- .../test_scan_types/test_baseline_scan_type.py | 2 +- .../test_scan_types/test_full_scan_type.py | 2 +- .../test_scan_types/test_partial_scan_type.py | 2 +- .../test_vulnerability_inventory_baseline_scan.py | 2 +- .../test_vulnerability_inventory_full_scan.py | 2 +- .../test_vulnerability_inventory_partial_scan.py | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/integration/test_vulnerability_detector/test_cpe_helper/test_cpe_helper.py b/tests/integration/test_vulnerability_detector/test_cpe_helper/test_cpe_helper.py index 8a68b9aa9b..1f5eaac265 100644 --- a/tests/integration/test_vulnerability_detector/test_cpe_helper/test_cpe_helper.py +++ b/tests/integration/test_vulnerability_detector/test_cpe_helper/test_cpe_helper.py @@ -9,7 +9,7 @@ brief: Wazuh is able to detect vulnerabilities in the applications installed in agents using the Vulnerability Detector module. This software audit is performed through the integration of vulnerability feeds indexed by Redhat, - Canonical, Debian, Amazon Linux and NVD Database. + Canonical, Debian, Amazon Linux, Alma Linux and NVD Database. components: - vulnerability_detector diff --git a/tests/integration/test_vulnerability_detector/test_scan_types/test_baseline_scan_type.py b/tests/integration/test_vulnerability_detector/test_scan_types/test_baseline_scan_type.py index ec959efde7..3ec97d1392 100644 --- a/tests/integration/test_vulnerability_detector/test_scan_types/test_baseline_scan_type.py +++ b/tests/integration/test_vulnerability_detector/test_scan_types/test_baseline_scan_type.py @@ -9,7 +9,7 @@ brief: Wazuh is able to detect vulnerabilities in the applications installed in agents using the Vulnerability Detector module. This software audit is performed through the integration of vulnerability feeds indexed by Redhat, - Canonical, Debian, Amazon Linux and NVD Database. + Canonical, Debian, Amazon Linux, Alma Linux and NVD Database. components: - vulnerability_detector diff --git a/tests/integration/test_vulnerability_detector/test_scan_types/test_full_scan_type.py b/tests/integration/test_vulnerability_detector/test_scan_types/test_full_scan_type.py index bc1dc0fb2e..6e44fa0624 100644 --- a/tests/integration/test_vulnerability_detector/test_scan_types/test_full_scan_type.py +++ b/tests/integration/test_vulnerability_detector/test_scan_types/test_full_scan_type.py @@ -9,7 +9,7 @@ brief: Wazuh is able to detect vulnerabilities in the applications installed in agents using the Vulnerability Detector module. This software audit is performed through the integration of vulnerability feeds indexed by Redhat, - Canonical, Debian, Amazon Linux and NVD Database. + Canonical, Debian, Amazon Linux, Alma Linux and NVD Database. components: - vulnerability_detector diff --git a/tests/integration/test_vulnerability_detector/test_scan_types/test_partial_scan_type.py b/tests/integration/test_vulnerability_detector/test_scan_types/test_partial_scan_type.py index b1218353b7..1d1b51a864 100644 --- a/tests/integration/test_vulnerability_detector/test_scan_types/test_partial_scan_type.py +++ b/tests/integration/test_vulnerability_detector/test_scan_types/test_partial_scan_type.py @@ -9,7 +9,7 @@ brief: Wazuh is able to detect vulnerabilities in the applications installed in agents using the Vulnerability Detector module. This software audit is performed through the integration of vulnerability feeds indexed by Redhat, - Canonical, Debian, Amazon Linux and NVD Database. + Canonical, Debian, Amazon Linux, Alma Linux and NVD Database. components: - vulnerability_detector diff --git a/tests/integration/test_vulnerability_detector/test_vulnerability_inventory/test_vulnerability_inventory_baseline_scan.py b/tests/integration/test_vulnerability_detector/test_vulnerability_inventory/test_vulnerability_inventory_baseline_scan.py index 942e8adc49..037f2f33f3 100644 --- a/tests/integration/test_vulnerability_detector/test_vulnerability_inventory/test_vulnerability_inventory_baseline_scan.py +++ b/tests/integration/test_vulnerability_detector/test_vulnerability_inventory/test_vulnerability_inventory_baseline_scan.py @@ -9,7 +9,7 @@ brief: Wazuh is able to detect vulnerabilities in the applications installed in agents using the Vulnerability Detector module. This software audit is performed through the integration of vulnerability feeds indexed by Redhat, - Canonical, Debian, Amazon Linux and NVD Database. + Canonical, Debian, Amazon Linux, Alma Linux and NVD Database. components: - vulnerability_detector diff --git a/tests/integration/test_vulnerability_detector/test_vulnerability_inventory/test_vulnerability_inventory_full_scan.py b/tests/integration/test_vulnerability_detector/test_vulnerability_inventory/test_vulnerability_inventory_full_scan.py index ad807915c0..ec2c30c289 100644 --- a/tests/integration/test_vulnerability_detector/test_vulnerability_inventory/test_vulnerability_inventory_full_scan.py +++ b/tests/integration/test_vulnerability_detector/test_vulnerability_inventory/test_vulnerability_inventory_full_scan.py @@ -9,7 +9,7 @@ brief: Wazuh is able to detect vulnerabilities in the applications installed in agents using the Vulnerability Detector module. This software audit is performed through the integration of vulnerability feeds indexed by Redhat, - Canonical, Debian, Amazon Linux and NVD Database. + Canonical, Debian, Amazon Linux, Alma Linux and NVD Database. components: - vulnerability_detector diff --git a/tests/integration/test_vulnerability_detector/test_vulnerability_inventory/test_vulnerability_inventory_partial_scan.py b/tests/integration/test_vulnerability_detector/test_vulnerability_inventory/test_vulnerability_inventory_partial_scan.py index 556466836b..3486604022 100644 --- a/tests/integration/test_vulnerability_detector/test_vulnerability_inventory/test_vulnerability_inventory_partial_scan.py +++ b/tests/integration/test_vulnerability_detector/test_vulnerability_inventory/test_vulnerability_inventory_partial_scan.py @@ -9,7 +9,7 @@ brief: Wazuh is able to detect vulnerabilities in the applications installed in agents using the Vulnerability Detector module. This software audit is performed through the integration of vulnerability feeds indexed by Redhat, - Canonical, Debian, Amazon Linux and NVD Database. + Canonical, Debian, Amazon Linux, Alma Linux and NVD Database. components: - vulnerability_detector From 80d909985d5165be7450aab0fe704184bc837b7e Mon Sep 17 00:00:00 2001 From: Mateo Cervilla Date: Fri, 28 Jul 2023 18:24:09 -0300 Subject: [PATCH 6/9] feat(#3723): Adds AlmaLinux init configurations --- deps/wazuh_testing/wazuh_testing/mocking/__init__.py | 9 +++++++++ .../modules/vulnerability_detector/__init__.py | 1 + 2 files changed, 10 insertions(+) diff --git a/deps/wazuh_testing/wazuh_testing/mocking/__init__.py b/deps/wazuh_testing/wazuh_testing/mocking/__init__.py index 44e799bbc9..d68b6c723d 100644 --- a/deps/wazuh_testing/wazuh_testing/mocking/__init__.py +++ b/deps/wazuh_testing/wazuh_testing/mocking/__init__.py @@ -132,6 +132,15 @@ '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'}, + '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'} } diff --git a/deps/wazuh_testing/wazuh_testing/modules/vulnerability_detector/__init__.py b/deps/wazuh_testing/wazuh_testing/modules/vulnerability_detector/__init__.py index 328eccd6a0..ad92b8f19e 100644 --- a/deps/wazuh_testing/wazuh_testing/modules/vulnerability_detector/__init__.py +++ b/deps/wazuh_testing/wazuh_testing/modules/vulnerability_detector/__init__.py @@ -37,6 +37,7 @@ CUSTOM_ALAS2_JSON_FEED = 'custom_alas2_feed.json' CUSTOM_ALAS_2022_JSON_FEED = 'custom_alas_2022_feed.json' CUSTOM_SUSE_OVAL_FEED = 'custom_suse_oval_feed.xml' +CUSTOM_ALMA_OVAL_FEED = 'custom_alsa8_oval_feed.xml' VULNERABILITY_DETECTOR_PREFIX = r'.*wazuh-modulesd:vulnerability-detector.*' From 58c34a2473d8b5ccfdb0600daafb66251e2749cb Mon Sep 17 00:00:00 2001 From: Mateo Cervilla Date: Mon, 31 Jul 2023 19:40:02 -0300 Subject: [PATCH 7/9] 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 From 174bf502b0d1c910eecd8bfca4e8f5f959e0c863 Mon Sep 17 00:00:00 2001 From: Matias Pereyra Date: Wed, 2 Aug 2023 01:24:17 +0000 Subject: [PATCH 8/9] style(#3723): Formatting .yaml files according to linting test --- ...onfiguration_import_invalid_feed_type.yaml | 206 +++++++++--------- .../cpe_indexing_packages.yaml | 18 +- .../cpe_indexing_system.yaml | 18 +- .../data/test_cases/cases_download_feeds.yaml | 20 +- .../test_cases/cases_duplicate_feeds.yaml | 114 +++++----- .../cases_import_invalid_feed_type.yaml | 74 +++---- .../data/test_cases/cases_disabled.yaml | 14 +- .../data/test_cases/cases_enabled.yaml | 14 +- .../data/test_cases/cases_missing_os.yaml | 103 +++++---- .../cases_multiple_provider_feeds.yaml | 28 +-- .../data/test_cases/cases_os.yaml | 16 +- .../test_cases/cases_update_from_year.yaml | 60 ++--- .../test_cases/cases_update_interval.yaml | 102 ++++----- ...onfiguration_scan_nvd_vulnerabilities.yaml | 18 +- ...scan_provider_and_nvd_vulnerabilities.yaml | 47 ++-- ...uration_scan_provider_vulnerabilities.yaml | 46 ++-- ...figuration_scan_vulnerability_removal.yaml | 86 ++++---- .../data/test_cases/cases_no_agent_data.yaml | 48 ++-- ...scan_provider_and_nvd_vulnerabilities.yaml | 88 ++++---- .../cases_scan_provider_vulnerabilities.yaml | 88 ++++---- .../cases_scan_vulnerability_removal.yaml | 104 ++++----- 21 files changed, 662 insertions(+), 650 deletions(-) diff --git a/tests/integration/test_vulnerability_detector/test_feeds/data/configuration_template/configuration_import_invalid_feed_type.yaml b/tests/integration/test_vulnerability_detector/test_feeds/data/configuration_template/configuration_import_invalid_feed_type.yaml index c1c6ab903f..2bb19bd3aa 100644 --- a/tests/integration/test_vulnerability_detector/test_feeds/data/configuration_template/configuration_import_invalid_feed_type.yaml +++ b/tests/integration/test_vulnerability_detector/test_feeds/data/configuration_template/configuration_import_invalid_feed_type.yaml @@ -8,7 +8,7 @@ value: 'yes' - provider: attributes: - - name: 'redhat' + - name: redhat elements: - enabled: value: 'yes' @@ -20,7 +20,7 @@ value: CUSTOM_FEED_URL - provider: attributes: - - name: 'nvd' + - name: nvd elements: - enabled: value: 'no' @@ -42,7 +42,7 @@ - section: wodle attributes: - - name: 'syscollector' + - name: syscollector elements: - disabled: value: 'yes' @@ -57,19 +57,19 @@ value: 'yes' - provider: attributes: - - name: 'debian' + - name: debian elements: - enabled: value: 'yes' - os: attributes: - url: CUSTOM_FEED_URL - value: 'bullseye' + value: bullseye - url: value: CUSTOM_FEED_URL - provider: attributes: - - name: 'nvd' + - name: nvd elements: - enabled: value: 'no' @@ -91,7 +91,7 @@ - section: wodle attributes: - - name: 'syscollector' + - name: syscollector elements: - disabled: value: 'yes' @@ -106,17 +106,17 @@ value: 'yes' - provider: attributes: - - name: 'canonical' + - name: canonical elements: - enabled: value: 'yes' - os: attributes: - url: CUSTOM_FEED_URL - value: 'jammy' + value: jammy - provider: attributes: - - name: 'nvd' + - name: nvd elements: - enabled: value: 'no' @@ -138,7 +138,7 @@ - section: wodle attributes: - - name: 'syscollector' + - name: syscollector elements: - disabled: value: 'yes' @@ -153,17 +153,17 @@ value: 'yes' - provider: attributes: - - name: 'alas' + - name: alas elements: - enabled: value: 'yes' - os: attributes: - url: CUSTOM_FEED_URL - value: 'amazon-linux-2' + value: amazon-linux-2 - provider: attributes: - - name: 'nvd' + - name: nvd elements: - enabled: value: 'no' @@ -185,7 +185,7 @@ - section: wodle attributes: - - name: 'syscollector' + - name: syscollector elements: - disabled: value: 'yes' @@ -200,7 +200,7 @@ value: 'yes' - provider: attributes: - - name: 'arch' + - name: arch elements: - enabled: value: 'yes' @@ -208,7 +208,7 @@ value: CUSTOM_FEED_URL - provider: attributes: - - name: 'nvd' + - name: nvd elements: - enabled: value: 'no' @@ -230,94 +230,94 @@ - section: wodle attributes: - - name: 'syscollector' + - name: syscollector elements: - disabled: value: 'yes' # MSU configuration - sections: - - section: vulnerability-detector - elements: - - enabled: - value: 'yes' - - run_on_start: - value: 'yes' - - provider: - attributes: - - name: 'msu' - elements: - - enabled: - value: 'yes' - - url: - value: CUSTOM_FEED_URL - - provider: - attributes: - - name: 'nvd' - elements: - - enabled: - value: 'no' - - - section: sca - elements: - - enabled: - value: 'no' - - - section: rootcheck - elements: - - disabled: - value: 'yes' - - - section: syscheck - elements: - - disabled: - value: 'yes' - - - section: wodle - attributes: - - name: 'syscollector' - elements: - - disabled: - value: 'yes' + - section: vulnerability-detector + elements: + - enabled: + value: 'yes' + - run_on_start: + value: 'yes' + - provider: + attributes: + - name: msu + elements: + - enabled: + value: 'yes' + - url: + value: CUSTOM_FEED_URL + - provider: + attributes: + - name: nvd + elements: + - enabled: + value: 'no' + + - section: sca + elements: + - enabled: + value: 'no' + + - section: rootcheck + elements: + - disabled: + value: 'yes' + + - section: syscheck + elements: + - disabled: + value: 'yes' + + - section: wodle + attributes: + - name: syscollector + elements: + - disabled: + value: 'yes' # NVD configuration - sections: - - section: vulnerability-detector - elements: - - enabled: - value: 'yes' - - run_on_start: - value: 'yes' - - provider: - attributes: - - name: 'nvd' - elements: - - enabled: - value: 'yes' - - url: - value: CUSTOM_FEED_URL - - - section: sca - elements: - - enabled: - value: 'no' - - - section: rootcheck - elements: - - disabled: - value: 'yes' - - - section: syscheck - elements: - - disabled: - value: 'yes' - - - section: wodle - attributes: - - name: 'syscollector' - elements: - - disabled: - value: 'yes' + - section: vulnerability-detector + elements: + - enabled: + value: 'yes' + - run_on_start: + value: 'yes' + - provider: + attributes: + - name: nvd + elements: + - enabled: + value: 'yes' + - url: + value: CUSTOM_FEED_URL + + - section: sca + elements: + - enabled: + value: 'no' + + - section: rootcheck + elements: + - disabled: + value: 'yes' + + - section: syscheck + elements: + - disabled: + value: 'yes' + + - section: wodle + attributes: + - name: syscollector + elements: + - disabled: + value: 'yes' # SUSE configuration - sections: @@ -329,17 +329,17 @@ value: 'yes' - provider: attributes: - - name: 'suse' + - name: suse elements: - enabled: value: 'yes' - os: attributes: - url: CUSTOM_FEED_URL - value: '15-desktop' + value: 15-desktop - provider: attributes: - - name: 'nvd' + - name: nvd elements: - enabled: value: 'no' @@ -361,7 +361,7 @@ - section: wodle attributes: - - name: 'syscollector' + - name: syscollector elements: - disabled: value: 'yes' @@ -376,7 +376,7 @@ value: 'yes' - provider: attributes: - - name: 'almalinux' + - name: almalinux elements: - enabled: value: 'yes' @@ -386,7 +386,7 @@ value: '8' - provider: attributes: - - name: 'nvd' + - name: nvd elements: - enabled: value: 'no' @@ -408,7 +408,7 @@ - section: wodle attributes: - - name: 'syscollector' + - name: syscollector elements: - disabled: value: 'yes' 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 c05e57379c..175437db82 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 @@ -7,49 +7,49 @@ value: 'yes' - provider: attributes: - - name: 'redhat' + - name: redhat elements: - enabled: value: 'no' - provider: attributes: - - name: 'canonical' + - name: canonical elements: - enabled: value: 'no' - provider: attributes: - - name: 'debian' + - name: debian elements: - enabled: value: 'no' - provider: attributes: - - name: 'msu' + - name: msu elements: - enabled: value: 'no' - provider: attributes: - - name: 'alas' + - name: alas elements: - enabled: value: 'no' - provider: attributes: - - name: 'arch' + - name: arch elements: - enabled: value: 'no' - provider: attributes: - - name: 'almalinux' + - name: almalinux elements: - enabled: value: 'no' - provider: attributes: - - name: 'nvd' + - name: nvd elements: - enabled: value: 'yes' @@ -73,7 +73,7 @@ - section: wodle attributes: - - name: 'syscollector' + - name: syscollector elements: - disabled: 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 38aa810fe2..6d2da38899 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 @@ -7,25 +7,25 @@ value: 'yes' - provider: attributes: - - name: 'redhat' + - name: redhat elements: - enabled: value: 'no' - provider: attributes: - - name: 'canonical' + - name: canonical elements: - enabled: value: 'no' - provider: attributes: - - name: 'debian' + - name: debian elements: - enabled: value: 'no' - provider: attributes: - - name: 'msu' + - name: msu elements: - enabled: value: 'yes' @@ -33,25 +33,25 @@ value: MSU_JSON_PATH - provider: attributes: - - name: 'alas' + - name: alas elements: - enabled: value: 'no' - provider: attributes: - - name: 'arch' + - name: arch elements: - enabled: value: 'no' - provider: attributes: - - name: 'almalinux' + - name: almalinux elements: - enabled: value: 'no' - provider: attributes: - - name: 'nvd' + - name: nvd elements: - enabled: value: 'yes' @@ -75,7 +75,7 @@ - section: wodle attributes: - - name: 'syscollector' + - name: syscollector elements: - disabled: value: 'yes' diff --git a/tests/integration/test_vulnerability_detector/test_feeds/data/test_cases/cases_download_feeds.yaml b/tests/integration/test_vulnerability_detector/test_feeds/data/test_cases/cases_download_feeds.yaml index dfb8b365fb..8d59a43e8c 100644 --- a/tests/integration/test_vulnerability_detector/test_feeds/data/test_cases/cases_download_feeds.yaml +++ b/tests/integration/test_vulnerability_detector/test_feeds/data/test_cases/cases_download_feeds.yaml @@ -156,19 +156,19 @@ download_timeout: 120 update_treshold_weeks: 3 -- name: 'ALAS-2022' - description: 'Amazon Linux provider' +- name: ALAS-2022 + description: Amazon Linux provider configuration_parameters: - PROVIDER: 'alas' - OS: 'amazon-linux-2022' + PROVIDER: alas + OS: amazon-linux-2022 metadata: - provider_name: 'Amazon Linux 2022' - provider_os: 'Amazon-Linux-2022' + provider_name: Amazon Linux 2022 + provider_os: Amazon-Linux-2022 download_timeout: 120 update_treshold_weeks: 3 -- name: 'NVD' - description: 'National Vulnerability Database provider' +- name: NVD + description: National Vulnerability Database provider configuration_parameters: PROVIDER: nvd OS: '' @@ -262,7 +262,7 @@ OS: '8' metadata: provider_name: AlmaLinux 8 - provider_os: 'AlmaLinux-8' + provider_os: AlmaLinux-8 download_timeout: 360 update_treshold_weeks: 2 @@ -273,6 +273,6 @@ OS: '9' metadata: provider_name: AlmaLinux 9 - provider_os: 'AlmaLinux-9' + provider_os: AlmaLinux-9 download_timeout: 360 update_treshold_weeks: 2 diff --git a/tests/integration/test_vulnerability_detector/test_feeds/data/test_cases/cases_duplicate_feeds.yaml b/tests/integration/test_vulnerability_detector/test_feeds/data/test_cases/cases_duplicate_feeds.yaml index 45850ef076..2f692077d4 100644 --- a/tests/integration/test_vulnerability_detector/test_feeds/data/test_cases/cases_duplicate_feeds.yaml +++ b/tests/integration/test_vulnerability_detector/test_feeds/data/test_cases/cases_duplicate_feeds.yaml @@ -1,121 +1,121 @@ -- name: 'RedHat' - description: 'Insert RHEL 8 OVAL and JSON feed from local path' +- name: RedHat + description: Insert RHEL 8 OVAL and JSON feed from local path configuration_parameters: - PROVIDER: 'redhat' + PROVIDER: redhat OS: '8' OS_PATH: CUSTOM_REDHAT_OVAL_FEED_PATH PATH: CUSTOM_REDHAT_JSON_FEED_PATH metadata: - provider_name: 'Red Hat Enterprise Linux 8' - provider_json_name: 'JSON Red Hat Enterprise Linux' + provider_name: Red Hat Enterprise Linux 8 + provider_json_name: JSON Red Hat Enterprise Linux -- name: 'Debian' - description: 'Insert Debian Buster OVAL and JSON feed from local path' +- name: Debian + description: Insert Debian Buster OVAL and JSON feed from local path configuration_parameters: - PROVIDER: 'debian' - OS: 'Buster' + PROVIDER: debian + OS: Buster OS_PATH: CUSTOM_DEBIAN_OVAL_FEED_PATH PATH: CUSTOM_DEBIAN_JSON_FEED_PATH metadata: - provider_name: 'Debian Buster' + provider_name: Debian Buster provider_json_name: '' -- name: 'Ubuntu Trusty' - description: 'Ubuntu Trusty provider' +- name: Ubuntu Trusty + description: Ubuntu Trusty provider configuration_parameters: - PROVIDER: 'canonical' - OS: 'trusty' + PROVIDER: canonical + OS: trusty OS_PATH: CUSTOM_CANONICAL_OVAL_FEED_PATH metadata: - provider_name: 'Ubuntu Trusty' + provider_name: Ubuntu Trusty provider_json_name: '' -- name: 'Ubuntu Xenial' - description: 'Ubuntu Xenial provider' +- name: Ubuntu Xenial + description: Ubuntu Xenial provider configuration_parameters: - PROVIDER: 'canonical' - OS: 'xenial' + PROVIDER: canonical + OS: xenial OS_PATH: CUSTOM_CANONICAL_OVAL_FEED_PATH metadata: - provider_name: 'Ubuntu Xenial' + provider_name: Ubuntu Xenial provider_json_name: '' -- name: 'Ubuntu Bionic' - description: 'Ubuntu Bionic provider' +- name: Ubuntu Bionic + description: Ubuntu Bionic provider configuration_parameters: - PROVIDER: 'canonical' - OS: 'bionic' + PROVIDER: canonical + OS: bionic OS_PATH: CUSTOM_CANONICAL_OVAL_FEED_PATH metadata: - provider_name: 'Ubuntu Bionic' + provider_name: Ubuntu Bionic provider_json_name: '' -- name: 'Ubuntu Focal' - description: 'Ubuntu Focal provider' +- name: Ubuntu Focal + description: Ubuntu Focal provider configuration_parameters: - PROVIDER: 'canonical' - OS: 'focal' + PROVIDER: canonical + OS: focal OS_PATH: CUSTOM_CANONICAL_OVAL_FEED_PATH metadata: - provider_name: 'Ubuntu Focal' + provider_name: Ubuntu Focal provider_json_name: '' -- name: 'Ubuntu Jammy' - description: 'Ubuntu Jammy provider' +- name: Ubuntu Jammy + description: Ubuntu Jammy provider configuration_parameters: - PROVIDER: 'canonical' - OS: 'jammy' + PROVIDER: canonical + OS: jammy OS_PATH: CUSTOM_CANONICAL_OVAL_FEED_PATH metadata: - provider_name: 'Ubuntu Jammy' + provider_name: Ubuntu Jammy provider_json_name: '' -- name: 'ALAS' - description: 'Amazon Linux provider' +- name: ALAS + description: Amazon Linux provider configuration_parameters: - PROVIDER: 'alas' - OS: 'amazon-linux' + PROVIDER: alas + OS: amazon-linux OS_PATH: CUSTOM_ALAS_JSON_FEED_PATH metadata: - provider_name: 'Amazon Linux 1' + provider_name: Amazon Linux 1 provider_json_name: '' -- name: 'Arch' - description: 'Arch Linux provider' +- name: Arch + description: Arch Linux provider configuration_parameters: - PROVIDER: 'arch' + PROVIDER: arch OS: '' PATH: CUSTOM_ARCHLINUX_JSON_FEED_PATH metadata: - provider_name: 'Arch Linux' + provider_name: Arch Linux provider_json_name: '' -- name: 'MSU' - description: 'Microsoft Security Update provider' +- name: MSU + description: Microsoft Security Update provider configuration_parameters: - PROVIDER: 'msu' + PROVIDER: msu OS: '' PATH: CUSTOM_MSU_JSON_FEED_PATH metadata: - provider_name: 'Microsoft Security Update' + provider_name: Microsoft Security Update provider_json_name: '' -- name: 'SUSE' - description: 'SUSE Linux Enterprise' +- name: SUSE + description: SUSE Linux Enterprise configuration_parameters: - PROVIDER: 'suse' - OS: '15-desktop' + PROVIDER: suse + OS: 15-desktop OS_PATH: CUSTOM_SUSE_OVAL_FEED metadata: - provider_name: 'SUSE Linux Enterprise Desktop 15' + provider_name: SUSE Linux Enterprise Desktop 15 provider_json_name: '' -- name: 'AlmaLinux' - description: 'AlmaLinux 8 provider' +- name: AlmaLinux + description: AlmaLinux 8 provider configuration_parameters: - PROVIDER: 'almalinux' + PROVIDER: almalinux OS: '8' OS_PATH: CUSTOM_ALMA_OVAL_FEED metadata: - provider_name: 'AlmaLinux 8' + provider_name: AlmaLinux 8 provider_json_name: '' diff --git a/tests/integration/test_vulnerability_detector/test_feeds/data/test_cases/cases_import_invalid_feed_type.yaml b/tests/integration/test_vulnerability_detector/test_feeds/data/test_cases/cases_import_invalid_feed_type.yaml index 7d7ecb9512..4daa800ffc 100644 --- a/tests/integration/test_vulnerability_detector/test_feeds/data/test_cases/cases_import_invalid_feed_type.yaml +++ b/tests/integration/test_vulnerability_detector/test_feeds/data/test_cases/cases_import_invalid_feed_type.yaml @@ -1,81 +1,81 @@ -- name: 'RHEL - PDF' - description: 'Check downloading and parsing of PDF file as invalid feed in Redhat provider' +- name: RHEL - PDF + description: Check downloading and parsing of PDF file as invalid feed in Redhat provider configuration_parameters: null metadata: - target: 'redhat' + target: redhat custom_feed_url: https://s3.amazonaws.com/ci.wazuh.com/qa/testing_files/dummy_files/dummy.pdf provider_feed_names: - - "redhat 8" - - "jredhat provider" + - redhat 8 + - jredhat provider -- name: 'Debian - JPG' - description: 'Check downloading and parsing of JPG file as invalid feedi n Debian provider' +- name: Debian - JPG + description: Check downloading and parsing of JPG file as invalid feedi n Debian provider configuration_parameters: null metadata: - target: 'debian' + target: debian custom_feed_url: https://s3.amazonaws.com/ci.wazuh.com/qa/testing_files/dummy_files/dummy.jpg provider_feed_names: - - "debian BULLSEYE" + - debian BULLSEYE -- name: 'Canonical - MP3' - description: 'Check downloading and parsing of MP3 file as invalid feed in Canonical provider' +- name: Canonical - MP3 + description: Check downloading and parsing of MP3 file as invalid feed in Canonical provider configuration_parameters: null metadata: - target: 'canonical' + target: canonical custom_feed_url: https://s3.amazonaws.com/ci.wazuh.com/qa/testing_files/dummy_files/dummy.mp3 provider_feed_names: - - "canonical JAMMY" + - canonical JAMMY -- name: 'ALAS - DOC' - description: 'Check downloading and parsing of DOC file as invalid feed in ALAS provider' +- name: ALAS - DOC + description: Check downloading and parsing of DOC file as invalid feed in ALAS provider configuration_parameters: null metadata: - target: 'alas' + target: alas custom_feed_url: https://s3.amazonaws.com/ci.wazuh.com/qa/testing_files/dummy_files/dummy.doc provider_feed_names: - - "alas Amazon-Linux-2" + - alas Amazon-Linux-2 -- name: 'Arch - AVI' - description: 'Check downloading and parsing of AVI file as invalid feed in Arch provider' +- name: Arch - AVI + description: Check downloading and parsing of AVI file as invalid feed in Arch provider configuration_parameters: null metadata: - target: 'arch' + target: arch custom_feed_url: https://s3.amazonaws.com/ci.wazuh.com/qa/testing_files/dummy_files/dummy.avi provider_feed_names: - - "arch provider" + - arch provider -- name: 'MSU - JPG' - description: 'Check downloading and parsing of JPG file as invalid feed in the MSU' +- name: MSU - JPG + description: Check downloading and parsing of JPG file as invalid feed in the MSU configuration_parameters: null metadata: - target: 'msu' + target: msu custom_feed_url: https://s3.amazonaws.com/ci.wazuh.com/qa/testing_files/dummy_files/dummy.jpg provider_feed_names: - - "msu provider" + - msu provider -- name: 'NVD - MP3' - description: 'Check downloading and parsing of JPG file as invalid feed in the NVD' +- name: NVD - MP3 + description: Check downloading and parsing of JPG file as invalid feed in the NVD configuration_parameters: null metadata: - target: 'nvd' + target: nvd custom_feed_url: https://s3.amazonaws.com/ci.wazuh.com/qa/testing_files/dummy_files/dummy.mp3 provider_feed_names: - - "nvd provider" + - nvd provider -- name: 'SUSE - JPG' - description: 'Check downloading and parsing of JPG file as invalid feed in Suse provider' +- name: SUSE - JPG + description: Check downloading and parsing of JPG file as invalid feed in Suse provider configuration_parameters: null metadata: - target: 'suse' + target: suse custom_feed_url: https://s3.amazonaws.com/ci.wazuh.com/qa/testing_files/dummy_files/dummy.jpg provider_feed_names: - - "suse SLED15" + - suse SLED15 -- name: 'AlmaLinux - JPG' - description: 'Check downloading and parsing of JPG file as invalid feed in AlmaLinux provider' +- name: AlmaLinux - JPG + description: Check downloading and parsing of JPG file as invalid feed in AlmaLinux provider configuration_parameters: null metadata: - target: 'almalinux' + target: almalinux custom_feed_url: https://s3.amazonaws.com/ci.wazuh.com/qa/testing_files/dummy_files/dummy.jpg provider_feed_names: - - "almalinux 8" + - almalinux 8 diff --git a/tests/integration/test_vulnerability_detector/test_providers/data/test_cases/cases_disabled.yaml b/tests/integration/test_vulnerability_detector/test_providers/data/test_cases/cases_disabled.yaml index 03043ca472..72b710424f 100644 --- a/tests/integration/test_vulnerability_detector/test_providers/data/test_cases/cases_disabled.yaml +++ b/tests/integration/test_vulnerability_detector/test_providers/data/test_cases/cases_disabled.yaml @@ -16,17 +16,17 @@ metadata: provider_name: Amazon Linux 2 -- name: 'Amazon Linux 2022' - description: 'Test disabled Amazon Linux 2022' +- name: Amazon Linux 2022 + description: Test disabled Amazon Linux 2022 configuration_parameters: ENABLED: 'no' - PROVIDER: 'alas' - OS: 'amazon-linux-2022' + PROVIDER: alas + OS: amazon-linux-2022 metadata: - provider_name: 'Amazon Linux 2022' + provider_name: Amazon Linux 2022 -- name: 'Ubuntu Focal' - description: 'Test disabled Ubuntu Focal' +- name: Ubuntu Focal + description: Test disabled Ubuntu Focal configuration_parameters: ENABLED: 'no' PROVIDER: canonical diff --git a/tests/integration/test_vulnerability_detector/test_providers/data/test_cases/cases_enabled.yaml b/tests/integration/test_vulnerability_detector/test_providers/data/test_cases/cases_enabled.yaml index 50df10b52b..612d7c8a96 100644 --- a/tests/integration/test_vulnerability_detector/test_providers/data/test_cases/cases_enabled.yaml +++ b/tests/integration/test_vulnerability_detector/test_providers/data/test_cases/cases_enabled.yaml @@ -16,17 +16,17 @@ metadata: provider_name: Amazon Linux 2 -- name: 'Amazon Linux 2022' - description: 'Test enabled Amazon Linux 2022' +- name: Amazon Linux 2022 + description: Test enabled Amazon Linux 2022 configuration_parameters: ENABLED: 'yes' - PROVIDER: 'alas' - OS: 'amazon-linux-2022' + PROVIDER: alas + OS: amazon-linux-2022 metadata: - provider_name: 'Amazon Linux 2022' + provider_name: Amazon Linux 2022 -- name: 'Ubuntu Focal' - description: 'Test enabled Ubuntu Focal' +- name: Ubuntu Focal + description: Test enabled Ubuntu Focal configuration_parameters: ENABLED: 'yes' PROVIDER: canonical diff --git a/tests/integration/test_vulnerability_detector/test_providers/data/test_cases/cases_missing_os.yaml b/tests/integration/test_vulnerability_detector/test_providers/data/test_cases/cases_missing_os.yaml index 8bf3c8ee14..2b4ceb8b9f 100644 --- a/tests/integration/test_vulnerability_detector/test_providers/data/test_cases/cases_missing_os.yaml +++ b/tests/integration/test_vulnerability_detector/test_providers/data/test_cases/cases_missing_os.yaml @@ -1,71 +1,84 @@ -- name: 'Amazon Linux' - description: 'Amazon Linux provider' +- name: Amazon Linux + description: Amazon Linux provider configuration_parameters: - PROVIDER: 'alas' + PROVIDER: alas metadata: - provider_name: 'Amazon Linux' - os: [''] + provider_name: Amazon Linux + os: + - '' -- name: 'Canonical' - description: 'Canonical provider' +- name: Canonical + description: Canonical provider configuration_parameters: - PROVIDER: 'canonical' + PROVIDER: canonical metadata: - provider_name: 'Ubuntu' - os: [''] + provider_name: Ubuntu + os: + - '' -- name: 'Debian' - description: 'Debian provider' +- name: Debian + description: Debian provider configuration_parameters: - PROVIDER: 'debian' + PROVIDER: debian metadata: - provider_name: 'Debian' - os: [''] + provider_name: Debian + os: + - '' -- name: 'Red Hat Enterprise Linux' - description: 'Red Hat Enterprise Linux provider' +- name: Red Hat Enterprise Linux + description: Red Hat Enterprise Linux provider configuration_parameters: - PROVIDER: 'redhat' + PROVIDER: redhat metadata: - provider_name: 'Red Hat Enterprise Linux' - os: ['5', '6', '7', '8', ''] + provider_name: Red Hat Enterprise Linux + os: + - '5' + - '6' + - '7' + - '8' + - '' -- name: 'National Vulnerability Database' - description: 'National Vulnerability Database provider' +- name: National Vulnerability Database + description: National Vulnerability Database provider configuration_parameters: - PROVIDER: 'nvd' + PROVIDER: nvd metadata: - provider_name: 'National Vulnerability Database' - os: [''] + provider_name: National Vulnerability Database + os: + - '' -- name: 'Microsoft Security Update' - description: 'Microsoft Security Update provider' +- name: Microsoft Security Update + description: Microsoft Security Update provider configuration_parameters: - PROVIDER: 'msu' + PROVIDER: msu metadata: - provider_name: 'Microsoft Security Update' - os: [''] + provider_name: Microsoft Security Update + os: + - '' -- name: 'Arch Linux' - description: 'Arch Linux provider' +- name: Arch Linux + description: Arch Linux provider configuration_parameters: - PROVIDER: 'arch' + PROVIDER: arch metadata: - provider_name: 'Arch Linux' - os: [''] + provider_name: Arch Linux + os: + - '' -- name: 'SUSE Linux Enterprise' - description: 'SUSE Linux Enterprise provider' +- name: SUSE Linux Enterprise + description: SUSE Linux Enterprise provider configuration_parameters: - PROVIDER: 'suse' + PROVIDER: suse metadata: - provider_name: 'SUSE Linux Enterprise' - os: [''] + provider_name: SUSE Linux Enterprise + os: + - '' -- name: 'ALMALINUX' - description: 'ALMALINUX' +- name: ALMALINUX + description: ALMALINUX configuration_parameters: - PROVIDER: 'almalinux' + PROVIDER: almalinux metadata: - provider_name: 'AlmaLinux' - os: [''] + provider_name: AlmaLinux + os: + - '' diff --git a/tests/integration/test_vulnerability_detector/test_providers/data/test_cases/cases_multiple_provider_feeds.yaml b/tests/integration/test_vulnerability_detector/test_providers/data/test_cases/cases_multiple_provider_feeds.yaml index 340d19fcf9..d52d7e3bb7 100644 --- a/tests/integration/test_vulnerability_detector/test_providers/data/test_cases/cases_multiple_provider_feeds.yaml +++ b/tests/integration/test_vulnerability_detector/test_providers/data/test_cases/cases_multiple_provider_feeds.yaml @@ -1,34 +1,34 @@ -- name: 'RedHat 8' - description: 'Insert RHEL 8 OVAL and JSON feed from local path' +- name: RedHat 8 + description: Insert RHEL 8 OVAL and JSON feed from local path configuration_parameters: - PROVIDER: 'redhat' + PROVIDER: redhat OS: '8' OS_PATH: CUSTOM_REDHAT_OVAL_FEED_PATH PATH: CUSTOM_REDHAT_JSON_FEED_PATH metadata: - provider_name: 'Red Hat Enterprise Linux 8' - provider_json_name: 'JSON Red Hat Enterprise Linux' + provider_name: Red Hat Enterprise Linux 8 + provider_json_name: JSON Red Hat Enterprise Linux oval_feed_path: CUSTOM_REDHAT_OVAL_FEED_PATH json_feed_path: CUSTOM_REDHAT_JSON_FEED_PATH -- name: 'Debian Buster' - description: 'Insert Debian Buster OVAL and JSON feed from local path' +- name: Debian Buster + description: Insert Debian Buster OVAL and JSON feed from local path configuration_parameters: - PROVIDER: 'debian' - OS: 'bullseye' + PROVIDER: debian + OS: bullseye OS_PATH: CUSTOM_DEBIAN_OVAL_FEED_PATH PATH: CUSTOM_DEBIAN_JSON_FEED_PATH metadata: - provider_name: 'Debian Bullseye' + provider_name: Debian Bullseye oval_feed_path: CUSTOM_DEBIAN_OVAL_FEED_PATH json_feed_path: CUSTOM_DEBIAN_JSON_FEED_PATH -- name: 'ALMALINUX' - description: 'Insert ALMALINUX OVAL feed from local path' +- name: ALMALINUX + description: Insert ALMALINUX OVAL feed from local path configuration_parameters: - PROVIDER: 'almalinux' + PROVIDER: almalinux OS: '8' OS_PATH: CUSTOM_ALMA_OVAL_FEED_PATH metadata: - provider_name: 'AlmaLinux 8' + provider_name: AlmaLinux 8 oval_feed_path: CUSTOM_ALMA_OVAL_FEED_PATH diff --git a/tests/integration/test_vulnerability_detector/test_providers/data/test_cases/cases_os.yaml b/tests/integration/test_vulnerability_detector/test_providers/data/test_cases/cases_os.yaml index 17acc4fa0c..29ffd4142d 100644 --- a/tests/integration/test_vulnerability_detector/test_providers/data/test_cases/cases_os.yaml +++ b/tests/integration/test_vulnerability_detector/test_providers/data/test_cases/cases_os.yaml @@ -16,17 +16,17 @@ provider_name: Amazon Linux 2 os: amazon-linux-2 -- name: 'Amazon Linux 2022' - description: 'Amazon Linux 2022 provider' +- name: Amazon Linux 2022 + description: Amazon Linux 2022 provider configuration_parameters: - PROVIDER: 'alas' - OS: 'amazon-linux-2022' + PROVIDER: alas + OS: amazon-linux-2022 metadata: - provider_name: 'Amazon Linux 2022' - os: 'amazon-linux-2022' + provider_name: Amazon Linux 2022 + os: amazon-linux-2022 -- name: 'Ubuntu Trusty' - description: 'Ubuntu Trusty provider' +- name: Ubuntu Trusty + description: Ubuntu Trusty provider configuration_parameters: PROVIDER: canonical OS: trusty diff --git a/tests/integration/test_vulnerability_detector/test_providers/data/test_cases/cases_update_from_year.yaml b/tests/integration/test_vulnerability_detector/test_providers/data/test_cases/cases_update_from_year.yaml index 3b4b1d01e2..bfc4ecc054 100644 --- a/tests/integration/test_vulnerability_detector/test_providers/data/test_cases/cases_update_from_year.yaml +++ b/tests/integration/test_vulnerability_detector/test_providers/data/test_cases/cases_update_from_year.yaml @@ -1,62 +1,62 @@ -- name: 'RedHat' - description: 'Test update from current year RedHat' +- name: RedHat + description: Test update from current year RedHat configuration_parameters: - PROVIDER: 'redhat' + PROVIDER: redhat OS: 8 UPDATE_FROM_YEAR: YEAR metadata: - provider: 'redhat' + provider: redhat -- name: 'Canonical' - description: 'Test update from current year Canonical' +- name: Canonical + description: Test update from current year Canonical configuration_parameters: - PROVIDER: 'canonical' + PROVIDER: canonical OS: 20 UPDATE_FROM_YEAR: YEAR metadata: - provider: 'canonical' + provider: canonical -- name: 'Debian' - description: 'Test update from current year Debian' +- name: Debian + description: Test update from current year Debian configuration_parameters: - PROVIDER: 'debian' + PROVIDER: debian OS: 10 UPDATE_FROM_YEAR: YEAR metadata: - provider: 'debian' + provider: debian -- name: 'NVD' - description: 'Test update from current year NVD' +- name: NVD + description: Test update from current year NVD configuration_parameters: - PROVIDER: 'nvd' + PROVIDER: nvd UPDATE_FROM_YEAR: YEAR metadata: - provider: 'nvd' - provider_name: 'National Vulnerability Database' + provider: nvd + provider_name: National Vulnerability Database -- name: 'MSU' - description: 'Test update from current year MSU' +- name: MSU + description: Test update from current year MSU configuration_parameters: - PROVIDER: 'msu' + PROVIDER: msu UPDATE_FROM_YEAR: YEAR metadata: - provider: 'msu' + provider: msu -- name: 'SUSE' - description: 'SUSE Linux Enterprise' +- name: SUSE + description: SUSE Linux Enterprise configuration_parameters: - PROVIDER: 'suse' + PROVIDER: suse OS: 15-desktop UPDATE_FROM_YEAR: YEAR metadata: - provider: 'suse' - provider_name: 'SUSE Linux Enterprise Desktop 15' + provider: suse + provider_name: SUSE Linux Enterprise Desktop 15 -- name: 'ALMALINUX' - description: 'Test update from current year AlmaLinux' +- name: ALMALINUX + description: Test update from current year AlmaLinux configuration_parameters: - PROVIDER: 'almalinux' + PROVIDER: almalinux OS: '8' UPDATE_FROM_YEAR: YEAR metadata: - provider: 'almalinux' + provider: almalinux 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 397bad93d7..cd7a978dc9 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 @@ -1,79 +1,79 @@ -- name: 'Amazon Linux 2022' - description: 'Test update interval 5s Amazon Linux 2022' +- name: Amazon Linux 2022 + description: Test update interval 5s Amazon Linux 2022 configuration_parameters: - PROVIDER: 'alas' + PROVIDER: alas OS: amazon-linux-2022 - UPDATE_INTERVAL: '5s' + UPDATE_INTERVAL: 5s metadata: - provider_name: 'Amazon Linux 2022' - update_interval: '5s' + provider_name: Amazon Linux 2022 + update_interval: 5s -- name: 'RedHat' - description: 'Test update interval 5s RedHat' +- name: RedHat + description: Test update interval 5s RedHat configuration_parameters: - PROVIDER: 'redhat' + PROVIDER: redhat OS: 8 - UPDATE_INTERVAL: '5s' + UPDATE_INTERVAL: 5s metadata: - provider_name: 'Red Hat Enterprise Linux 8' - update_interval: '5s' + provider_name: Red Hat Enterprise Linux 8 + update_interval: 5s -- name: 'Ubuntu Jammy' - description: 'Test update interval 5s Ubuntu Jammy' +- name: Ubuntu Jammy + description: Test update interval 5s Ubuntu Jammy configuration_parameters: - PROVIDER: 'canonical' - OS: 'jammy' - UPDATE_INTERVAL: '5s' + PROVIDER: canonical + OS: jammy + UPDATE_INTERVAL: 5s metadata: - provider_name: 'Ubuntu Jammy' - update_interval: '5s' + provider_name: Ubuntu Jammy + update_interval: 5s -- name: 'Debian' - description: 'Test update interval 5s Debian' +- name: Debian + description: Test update interval 5s Debian configuration_parameters: - PROVIDER: 'debian' - OS: 'buster' - UPDATE_INTERVAL: '5s' + PROVIDER: debian + OS: buster + UPDATE_INTERVAL: 5s metadata: - provider_name: 'Debian Buster' - update_interval: '5s' + provider_name: Debian Buster + update_interval: 5s -- name: 'NVD' - description: 'Test update interval 5s NVD' +- name: NVD + description: Test update interval 5s NVD configuration_parameters: - PROVIDER: 'nvd' + PROVIDER: nvd OS: '' - UPDATE_INTERVAL: '5s' + UPDATE_INTERVAL: 5s metadata: - provider_name: 'National Vulnerability Database' - update_interval: '5s' + provider_name: National Vulnerability Database + update_interval: 5s -- name: 'Arch_Linux' - description: 'Test update interval 5s Arch Linux' +- name: Arch_Linux + description: Test update interval 5s Arch Linux configuration_parameters: - PROVIDER: 'arch' + PROVIDER: arch OS: '' - UPDATE_INTERVAL: '5s' + UPDATE_INTERVAL: 5s metadata: - provider_name: 'Arch Linux' - update_interval: '5s' + provider_name: Arch Linux + update_interval: 5s -- name: 'SUSE' - description: 'Test update interval 5s SUSE' +- name: SUSE + description: Test update interval 5s SUSE configuration_parameters: - PROVIDER: 'suse' - OS: '15-server' - UPDATE_INTERVAL: '5s' + PROVIDER: suse + OS: 15-server + UPDATE_INTERVAL: 5s metadata: - provider_name: 'SUSE Linux Enterprise Server 15' - update_interval: '5s' + provider_name: SUSE Linux Enterprise Server 15 + update_interval: 5s -- name: 'ALMALINUX' - description: 'Test update interval 5s AlmaLinux' +- name: ALMALINUX + description: Test update interval 5s AlmaLinux configuration_parameters: - PROVIDER: 'almalinux' + PROVIDER: almalinux OS: '8' - UPDATE_INTERVAL: '5s' + UPDATE_INTERVAL: 5s metadata: - provider_name: 'AlmaLinux 8' - update_interval: '5s' + provider_name: AlmaLinux 8 + update_interval: 5s diff --git a/tests/integration/test_vulnerability_detector/test_scan_results/data/configuration_template/configuration_scan_nvd_vulnerabilities.yaml b/tests/integration/test_vulnerability_detector/test_scan_results/data/configuration_template/configuration_scan_nvd_vulnerabilities.yaml index c05e57379c..175437db82 100644 --- a/tests/integration/test_vulnerability_detector/test_scan_results/data/configuration_template/configuration_scan_nvd_vulnerabilities.yaml +++ b/tests/integration/test_vulnerability_detector/test_scan_results/data/configuration_template/configuration_scan_nvd_vulnerabilities.yaml @@ -7,49 +7,49 @@ value: 'yes' - provider: attributes: - - name: 'redhat' + - name: redhat elements: - enabled: value: 'no' - provider: attributes: - - name: 'canonical' + - name: canonical elements: - enabled: value: 'no' - provider: attributes: - - name: 'debian' + - name: debian elements: - enabled: value: 'no' - provider: attributes: - - name: 'msu' + - name: msu elements: - enabled: value: 'no' - provider: attributes: - - name: 'alas' + - name: alas elements: - enabled: value: 'no' - provider: attributes: - - name: 'arch' + - name: arch elements: - enabled: value: 'no' - provider: attributes: - - name: 'almalinux' + - name: almalinux elements: - enabled: value: 'no' - provider: attributes: - - name: 'nvd' + - name: nvd elements: - enabled: value: 'yes' @@ -73,7 +73,7 @@ - section: wodle attributes: - - name: 'syscollector' + - name: syscollector elements: - disabled: value: 'yes' 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 050c66b1fa..38acbd857f 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 @@ -8,7 +8,7 @@ value: 'yes' - provider: attributes: - - name: 'redhat' + - name: redhat elements: - enabled: value: 'yes' @@ -20,7 +20,7 @@ value: CUSTOM_REDHAT_JSON_FEED - provider: attributes: - - name: 'nvd' + - name: nvd elements: - enabled: value: 'yes' @@ -44,7 +44,7 @@ - section: wodle attributes: - - name: 'syscollector' + - name: syscollector elements: - disabled: value: 'yes' @@ -59,19 +59,19 @@ value: 'yes' - provider: attributes: - - name: 'debian' + - name: debian elements: - enabled: value: 'yes' - os: attributes: - path: CUSTOM_DEBIAN_OVAL_FEED - value: 'bullseye' + value: bullseye - path: value: CUSTOM_DEBIAN_JSON_FEED - provider: attributes: - - name: 'nvd' + - name: nvd elements: - enabled: value: 'yes' @@ -95,7 +95,7 @@ - section: wodle attributes: - - name: 'syscollector' + - name: syscollector elements: - disabled: value: 'yes' @@ -110,17 +110,17 @@ value: 'yes' - provider: attributes: - - name: 'canonical' + - name: canonical elements: - enabled: value: 'yes' - os: attributes: - path: CUSTOM_CANONICAL_OVAL_FEED - value: 'jammy' + value: jammy - provider: attributes: - - name: 'nvd' + - name: nvd elements: - enabled: value: 'yes' @@ -144,7 +144,7 @@ - section: wodle attributes: - - name: 'syscollector' + - name: syscollector elements: - disabled: value: 'yes' @@ -159,17 +159,17 @@ value: 'yes' - provider: attributes: - - name: 'alas' + - name: alas elements: - enabled: value: 'yes' - os: attributes: - path: CUSTOM_ALAS_2022_JSON_FEED - value: 'amazon-linux-2022' + value: amazon-linux-2022 - provider: attributes: - - name: 'nvd' + - name: nvd elements: - enabled: value: 'yes' @@ -193,7 +193,7 @@ - section: wodle attributes: - - name: 'syscollector' + - name: syscollector elements: - disabled: value: 'yes' @@ -208,7 +208,7 @@ value: 'yes' - provider: attributes: - - name: 'arch' + - name: arch elements: - enabled: value: 'yes' @@ -216,7 +216,7 @@ value: CUSTOM_ARCH_JSON_FEED - provider: attributes: - - name: 'nvd' + - name: nvd elements: - enabled: value: 'yes' @@ -240,12 +240,11 @@ - section: wodle attributes: - - name: 'syscollector' + - name: syscollector elements: - disabled: value: 'yes' - # SUSE configuration - sections: - section: vulnerability-detector @@ -256,17 +255,17 @@ value: 'yes' - provider: attributes: - - name: 'suse' + - name: suse elements: - enabled: value: 'yes' - os: attributes: - path: CUSTOM_SUSE_OVAL_FEED - value: '15-server' + value: 15-server - provider: attributes: - - name: 'nvd' + - name: nvd elements: - enabled: value: 'yes' @@ -283,7 +282,7 @@ value: 'yes' - provider: attributes: - - name: 'almalinux' + - name: almalinux elements: - enabled: value: 'yes' @@ -293,7 +292,7 @@ value: '8' - provider: attributes: - - name: 'nvd' + - name: nvd elements: - enabled: value: 'yes' 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 54e33dbc60..38acbd857f 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 @@ -8,7 +8,7 @@ value: 'yes' - provider: attributes: - - name: 'redhat' + - name: redhat elements: - enabled: value: 'yes' @@ -20,7 +20,7 @@ value: CUSTOM_REDHAT_JSON_FEED - provider: attributes: - - name: 'nvd' + - name: nvd elements: - enabled: value: 'yes' @@ -44,7 +44,7 @@ - section: wodle attributes: - - name: 'syscollector' + - name: syscollector elements: - disabled: value: 'yes' @@ -59,19 +59,19 @@ value: 'yes' - provider: attributes: - - name: 'debian' + - name: debian elements: - enabled: value: 'yes' - os: attributes: - path: CUSTOM_DEBIAN_OVAL_FEED - value: 'bullseye' + value: bullseye - path: value: CUSTOM_DEBIAN_JSON_FEED - provider: attributes: - - name: 'nvd' + - name: nvd elements: - enabled: value: 'yes' @@ -95,7 +95,7 @@ - section: wodle attributes: - - name: 'syscollector' + - name: syscollector elements: - disabled: value: 'yes' @@ -110,17 +110,17 @@ value: 'yes' - provider: attributes: - - name: 'canonical' + - name: canonical elements: - enabled: value: 'yes' - os: attributes: - path: CUSTOM_CANONICAL_OVAL_FEED - value: 'jammy' + value: jammy - provider: attributes: - - name: 'nvd' + - name: nvd elements: - enabled: value: 'yes' @@ -144,7 +144,7 @@ - section: wodle attributes: - - name: 'syscollector' + - name: syscollector elements: - disabled: value: 'yes' @@ -159,17 +159,17 @@ value: 'yes' - provider: attributes: - - name: 'alas' + - name: alas elements: - enabled: value: 'yes' - os: attributes: - path: CUSTOM_ALAS_2022_JSON_FEED - value: 'amazon-linux-2022' + value: amazon-linux-2022 - provider: attributes: - - name: 'nvd' + - name: nvd elements: - enabled: value: 'yes' @@ -193,7 +193,7 @@ - section: wodle attributes: - - name: 'syscollector' + - name: syscollector elements: - disabled: value: 'yes' @@ -208,7 +208,7 @@ value: 'yes' - provider: attributes: - - name: 'arch' + - name: arch elements: - enabled: value: 'yes' @@ -216,7 +216,7 @@ value: CUSTOM_ARCH_JSON_FEED - provider: attributes: - - name: 'nvd' + - name: nvd elements: - enabled: value: 'yes' @@ -240,7 +240,7 @@ - section: wodle attributes: - - name: 'syscollector' + - name: syscollector elements: - disabled: value: 'yes' @@ -255,17 +255,17 @@ value: 'yes' - provider: attributes: - - name: 'suse' + - name: suse elements: - enabled: value: 'yes' - os: attributes: - path: CUSTOM_SUSE_OVAL_FEED - value: '15-server' + value: 15-server - provider: attributes: - - name: 'nvd' + - name: nvd elements: - enabled: value: 'yes' @@ -282,7 +282,7 @@ value: 'yes' - provider: attributes: - - name: 'almalinux' + - name: almalinux elements: - enabled: value: 'yes' @@ -292,7 +292,7 @@ value: '8' - provider: attributes: - - name: 'nvd' + - name: nvd elements: - enabled: value: 'yes' 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 49020bb05c..d16c0c1ef7 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 @@ -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: @@ -24,33 +24,33 @@ value: CUSTOM_REDHAT_JSON_FEED - 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' @@ -67,50 +67,50 @@ - enabled: value: 'yes' - interval: - value: '5s' + value: 5s - min_full_scan_interval: - value: '5s' + value: 5s - run_on_start: value: 'yes' - provider: attributes: - - name: 'alas' + - name: alas elements: - enabled: value: 'yes' - os: attributes: - path: CUSTOM_ALAS_2022_JSON_FEED - value: 'amazon-linux-2022' + value: amazon-linux-2022 - 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' @@ -127,49 +127,49 @@ - enabled: value: 'yes' - interval: - value: '5s' + value: 5s - min_full_scan_interval: - value: '5s' + value: 5s - run_on_start: value: 'yes' - provider: attributes: - - name: 'suse' + - name: suse elements: - enabled: value: 'yes' - os: attributes: - path: CUSTOM_SUSE_OVAL_FEED - value: '15-server' + value: 15-server - 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' @@ -186,14 +186,14 @@ - enabled: value: 'yes' - interval: - value: '5s' + value: 5s - min_full_scan_interval: - value: '5s' + value: 5s - run_on_start: value: 'yes' - provider: attributes: - - name: 'almalinux' + - name: almalinux elements: - enabled: value: 'yes' @@ -203,14 +203,14 @@ value: '8' - 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: @@ -228,7 +228,7 @@ - section: wodle attributes: - - name: 'syscollector' + - name: syscollector elements: - disabled: value: 'yes' diff --git a/tests/integration/test_vulnerability_detector/test_scan_results/data/test_cases/cases_no_agent_data.yaml b/tests/integration/test_vulnerability_detector/test_scan_results/data/test_cases/cases_no_agent_data.yaml index 8a7db2e9c1..533dc3e249 100644 --- a/tests/integration/test_vulnerability_detector/test_scan_results/data/test_cases/cases_no_agent_data.yaml +++ b/tests/integration/test_vulnerability_detector/test_scan_results/data/test_cases/cases_no_agent_data.yaml @@ -1,82 +1,82 @@ -- name: 'RHEL' - description: 'Scan RHEL vulnerabilities using only the NVD feed' +- name: RHEL + description: Scan RHEL vulnerabilities using only the NVD feed configuration_parameters: NVD_JSON_PATH: CUSTOM_NVD_JSON_PATH metadata: system: RHEL8 -- name: 'UBUNTU' - description: 'Scan UBUNTU vulnerabilities using only the NVD feed' +- name: UBUNTU + description: Scan UBUNTU vulnerabilities using only the NVD feed configuration_parameters: NVD_JSON_PATH: CUSTOM_NVD_JSON_PATH metadata: system: BIONIC -- name: 'DEBIAN' - description: 'Scan DEBIAN vulnerabilities using only the NVD feed' +- name: DEBIAN + description: Scan DEBIAN vulnerabilities using only the NVD feed configuration_parameters: NVD_JSON_PATH: CUSTOM_NVD_JSON_PATH metadata: system: BULLSEYE -- name: 'ARCH' - description: 'Scan ARCH vulnerabilities using only the NVD feed' +- name: ARCH + description: Scan ARCH vulnerabilities using only the NVD feed configuration_parameters: NVD_JSON_PATH: CUSTOM_NVD_JSON_PATH metadata: system: ARCH -- name: 'ALAS' - description: 'Scan ALAS vulnerabilities using only the NVD feed' +- name: ALAS + description: Scan ALAS vulnerabilities using only the NVD feed configuration_parameters: NVD_JSON_PATH: CUSTOM_NVD_JSON_PATH metadata: system: ALAS2 -- name: 'SLED11' - description: 'Scan SLED11 vulnerabilities using only the NVD feed' +- name: SLED11 + description: Scan SLED11 vulnerabilities using only the NVD feed configuration_parameters: NVD_JSON_PATH: CUSTOM_NVD_JSON_PATH metadata: system: SLED11 -- name: 'SLED12' - description: 'Scan SLED12 vulnerabilities using only the NVD feed' +- name: SLED12 + description: Scan SLED12 vulnerabilities using only the NVD feed configuration_parameters: NVD_JSON_PATH: CUSTOM_NVD_JSON_PATH metadata: system: SLED12 -- name: 'SLED15' - description: 'Scan SLED15 vulnerabilities using only the NVD feed' +- name: SLED15 + description: Scan SLED15 vulnerabilities using only the NVD feed configuration_parameters: NVD_JSON_PATH: CUSTOM_NVD_JSON_PATH metadata: system: SLED15 -- name: 'SLES11' - description: 'Scan SLES11 vulnerabilities using only the NVD feed' +- name: SLES11 + description: Scan SLES11 vulnerabilities using only the NVD feed configuration_parameters: NVD_JSON_PATH: CUSTOM_NVD_JSON_PATH metadata: system: SLES11 -- name: 'SLES12' - description: 'Scan SLES12 vulnerabilities using only the NVD feed' +- name: SLES12 + description: Scan SLES12 vulnerabilities using only the NVD feed configuration_parameters: NVD_JSON_PATH: CUSTOM_NVD_JSON_PATH metadata: system: SLES12 -- name: 'SLES15' - description: 'Scan SLES15 vulnerabilities using only the NVD feed' +- name: SLES15 + description: Scan SLES15 vulnerabilities using only the NVD feed configuration_parameters: NVD_JSON_PATH: CUSTOM_NVD_JSON_PATH metadata: system: SLES15 -- name: 'ALMALINUX' - description: 'Scan ALMALINUX vulnerabilities using only the NVD feed' +- name: ALMALINUX + description: Scan ALMALINUX vulnerabilities using only the NVD feed configuration_parameters: NVD_JSON_PATH: CUSTOM_NVD_JSON_PATH metadata: diff --git a/tests/integration/test_vulnerability_detector/test_scan_results/data/test_cases/cases_scan_provider_and_nvd_vulnerabilities.yaml b/tests/integration/test_vulnerability_detector/test_scan_results/data/test_cases/cases_scan_provider_and_nvd_vulnerabilities.yaml index 21ec40c469..989a5e5e23 100644 --- a/tests/integration/test_vulnerability_detector/test_scan_results/data/test_cases/cases_scan_provider_and_nvd_vulnerabilities.yaml +++ b/tests/integration/test_vulnerability_detector/test_scan_results/data/test_cases/cases_scan_provider_and_nvd_vulnerabilities.yaml @@ -1,85 +1,85 @@ -- name: 'RHEL' - description: 'Scan RHEL vulnerabilities using provider and NVD feed' +- name: RHEL + description: Scan RHEL vulnerabilities using provider and NVD feed configuration_parameters: null metadata: - provider_name: 'redhat' - system: 'RHEL8' - json_feed: 'custom_redhat_json_feed.json' - oval_feed: 'custom_redhat_oval_feed.xml' - nvd_feed: 'custom_nvd_feed.json' + provider_name: redhat + system: RHEL8 + json_feed: custom_redhat_json_feed.json + oval_feed: custom_redhat_oval_feed.xml + nvd_feed: custom_nvd_feed.json oval_feed_tag: CUSTOM_REDHAT_OVAL_FEED json_feed_tag: CUSTOM_REDHAT_JSON_FEED nvd_feed_tag: CUSTOM_NVD_JSON_FEED -- name: 'Debian' - description: 'Scan Debian vulnerabilities using provider and NVD feed' +- name: Debian + description: Scan Debian vulnerabilities using provider and NVD feed configuration_parameters: null metadata: - provider_name: 'debian' - system: 'BULLSEYE' - json_feed: 'custom_debian_json_feed.json' - oval_feed: 'custom_debian_oval_feed.xml' - nvd_feed: 'custom_nvd_feed.json' + provider_name: debian + system: BULLSEYE + json_feed: custom_debian_json_feed.json + oval_feed: custom_debian_oval_feed.xml + nvd_feed: custom_nvd_feed.json oval_feed_tag: CUSTOM_DEBIAN_OVAL_FEED json_feed_tag: CUSTOM_DEBIAN_JSON_FEED nvd_feed_tag: CUSTOM_NVD_JSON_FEED -- name: 'Canonical' - description: 'Scan Canonical vulnerabilities using provider and NVD feed' +- name: Canonical + description: Scan Canonical vulnerabilities using provider and NVD feed configuration_parameters: null metadata: - provider_name: 'canonical' - system: 'JAMMY' + provider_name: canonical + system: JAMMY json_feed: null - oval_feed: 'custom_canonical_oval_feed.xml' - nvd_feed: 'custom_nvd_feed.json' + oval_feed: custom_canonical_oval_feed.xml + nvd_feed: custom_nvd_feed.json oval_feed_tag: CUSTOM_CANONICAL_OVAL_FEED nvd_feed_tag: CUSTOM_NVD_JSON_FEED -- name: 'ALAS' - description: 'Scan ALAS vulnerabilities using provider and NVD feed' +- name: ALAS + description: Scan ALAS vulnerabilities using provider and NVD feed configuration_parameters: null metadata: - provider_name: 'alas' - system: 'ALAS_2022' - json_feed: 'custom_alas_2022_feed.json' + provider_name: alas + system: ALAS_2022 + json_feed: custom_alas_2022_feed.json oval_feed: null - nvd_feed: 'custom_nvd_feed.json' + nvd_feed: custom_nvd_feed.json json_feed_tag: CUSTOM_ALAS_2022_JSON_FEED nvd_feed_tag: CUSTOM_NVD_JSON_FEED -- name: 'Arch' - description: 'Scan Arch vulnerabilities using provider and NVD feed' +- name: Arch + description: Scan Arch vulnerabilities using provider and NVD feed configuration_parameters: null metadata: - provider_name: 'arch' - system: 'ARCH' - json_feed: 'custom_archlinux_feed.json' + provider_name: arch + system: ARCH + json_feed: custom_archlinux_feed.json oval_feed: null - nvd_feed: 'custom_nvd_feed.json' + nvd_feed: custom_nvd_feed.json json_feed_tag: CUSTOM_ARCH_JSON_FEED nvd_feed_tag: CUSTOM_NVD_JSON_FEED -- name: 'SUSE' - description: 'Scan SLES vulnerabilities using provider and NVD feed' +- name: SUSE + description: Scan SLES vulnerabilities using provider and NVD feed configuration_parameters: null metadata: - provider_name: 'suse' - system: 'SLES15' + provider_name: suse + system: SLES15 json_feed: null - oval_feed: 'custom_suse_oval_feed.xml' - nvd_feed: 'custom_nvd_feed.json' + oval_feed: custom_suse_oval_feed.xml + nvd_feed: custom_nvd_feed.json oval_feed_tag: CUSTOM_SUSE_OVAL_FEED nvd_feed_tag: CUSTOM_NVD_JSON_FEED -- name: 'ALMALINUX' - description: 'Scan ALMALINUX vulnerabilities using provider and NVD feed' +- name: ALMALINUX + description: Scan ALMALINUX vulnerabilities using provider and NVD feed configuration_parameters: null metadata: - provider_name: 'almalinux' - system: 'AlmaLinux-8' + provider_name: almalinux + system: AlmaLinux-8 json_feed: null - oval_feed: 'custom_alsa8_oval_feed.xml' - nvd_feed: 'custom_nvd_feed.json' + oval_feed: custom_alsa8_oval_feed.xml + nvd_feed: custom_nvd_feed.json oval_feed_tag: CUSTOM_ALMA_OVAL_FEED nvd_feed_tag: CUSTOM_NVD_JSON_FEED diff --git a/tests/integration/test_vulnerability_detector/test_scan_results/data/test_cases/cases_scan_provider_vulnerabilities.yaml b/tests/integration/test_vulnerability_detector/test_scan_results/data/test_cases/cases_scan_provider_vulnerabilities.yaml index 50acbc2529..31221b6fdb 100644 --- a/tests/integration/test_vulnerability_detector/test_scan_results/data/test_cases/cases_scan_provider_vulnerabilities.yaml +++ b/tests/integration/test_vulnerability_detector/test_scan_results/data/test_cases/cases_scan_provider_vulnerabilities.yaml @@ -1,85 +1,85 @@ -- name: 'RHEL' - description: 'Scan RHEL vulnerabilities using provider and NVD feed' +- name: RHEL + description: Scan RHEL vulnerabilities using provider and NVD feed configuration_parameters: null metadata: - provider_name: 'redhat' - system: 'RHEL8' - json_feed: 'custom_redhat_json_feed.json' - oval_feed: 'custom_redhat_oval_feed.xml' - nvd_feed: 'custom_nvd_alternative_feed.json' + provider_name: redhat + system: RHEL8 + json_feed: custom_redhat_json_feed.json + oval_feed: custom_redhat_oval_feed.xml + nvd_feed: custom_nvd_alternative_feed.json oval_feed_tag: CUSTOM_REDHAT_OVAL_FEED json_feed_tag: CUSTOM_REDHAT_JSON_FEED nvd_feed_tag: CUSTOM_NVD_JSON_FEED -- name: 'Debian' - description: 'Scan Debian vulnerabilities using provider and NVD feed' +- name: Debian + description: Scan Debian vulnerabilities using provider and NVD feed configuration_parameters: null metadata: - provider_name: 'debian' - system: 'BULLSEYE' - json_feed: 'custom_debian_json_feed.json' - oval_feed: 'custom_debian_oval_feed.xml' - nvd_feed: 'custom_nvd_alternative_feed.json' + provider_name: debian + system: BULLSEYE + json_feed: custom_debian_json_feed.json + oval_feed: custom_debian_oval_feed.xml + nvd_feed: custom_nvd_alternative_feed.json oval_feed_tag: CUSTOM_DEBIAN_OVAL_FEED json_feed_tag: CUSTOM_DEBIAN_JSON_FEED nvd_feed_tag: CUSTOM_NVD_JSON_FEED -- name: 'Canonical' - description: 'Scan Canonical vulnerabilities using provider and NVD feed' +- name: Canonical + description: Scan Canonical vulnerabilities using provider and NVD feed configuration_parameters: null metadata: - provider_name: 'canonical' - system: 'JAMMY' + provider_name: canonical + system: JAMMY json_feed: null - oval_feed: 'custom_canonical_oval_feed.xml' - nvd_feed: 'custom_nvd_alternative_feed.json' + oval_feed: custom_canonical_oval_feed.xml + nvd_feed: custom_nvd_alternative_feed.json oval_feed_tag: CUSTOM_CANONICAL_OVAL_FEED nvd_feed_tag: CUSTOM_NVD_JSON_FEED -- name: 'ALAS' - description: 'Scan ALAS vulnerabilities using provider and NVD feed' +- name: ALAS + description: Scan ALAS vulnerabilities using provider and NVD feed configuration_parameters: null metadata: - provider_name: 'alas' - system: 'ALAS_2022' - json_feed: 'custom_alas_2022_feed.json' + provider_name: alas + system: ALAS_2022 + json_feed: custom_alas_2022_feed.json oval_feed: null - nvd_feed: 'custom_nvd_alternative_feed.json' + nvd_feed: custom_nvd_alternative_feed.json json_feed_tag: CUSTOM_ALAS_2022_JSON_FEED nvd_feed_tag: CUSTOM_NVD_JSON_FEED -- name: 'Arch' - description: 'Scan Arch vulnerabilities using provider and NVD feed' +- name: Arch + description: Scan Arch vulnerabilities using provider and NVD feed configuration_parameters: null metadata: - provider_name: 'arch' - system: 'ARCH' - json_feed: 'custom_archlinux_feed.json' + provider_name: arch + system: ARCH + json_feed: custom_archlinux_feed.json oval_feed: null - nvd_feed: 'custom_nvd_alternative_feed.json' + nvd_feed: custom_nvd_alternative_feed.json json_feed_tag: CUSTOM_ARCH_JSON_FEED nvd_feed_tag: CUSTOM_NVD_JSON_FEED -- name: 'SUSE' - description: 'Scan SLES vulnerabilities using provider and NVD feed' +- name: SUSE + description: Scan SLES vulnerabilities using provider and NVD feed configuration_parameters: null metadata: - provider_name: 'suse' - system: 'SLES15' + provider_name: suse + system: SLES15 json_feed: null - oval_feed: 'custom_suse_oval_feed.xml' - nvd_feed: 'custom_nvd_alternative_feed.json' + oval_feed: custom_suse_oval_feed.xml + nvd_feed: custom_nvd_alternative_feed.json oval_feed_tag: CUSTOM_SUSE_OVAL_FEED nvd_feed_tag: CUSTOM_NVD_JSON_FEED -- name: 'ALMALINUX' - description: 'Scan ALMALINUX vulnerabilities using provider and NVD feed' +- name: ALMALINUX + description: Scan ALMALINUX vulnerabilities using provider and NVD feed configuration_parameters: null metadata: - provider_name: 'almalinux' - system: 'AlmaLinux-8' + provider_name: almalinux + system: AlmaLinux-8 json_feed: null - oval_feed: 'custom_alsa8_oval_feed.xml' - nvd_feed: 'custom_nvd_alternative_feed.json' + oval_feed: custom_alsa8_oval_feed.xml + nvd_feed: custom_nvd_alternative_feed.json oval_feed_tag: CUSTOM_ALMA_OVAL_FEED nvd_feed_tag: CUSTOM_NVD_JSON_FEED 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 ec389f7a31..9efd3d7482 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 @@ -1,75 +1,75 @@ -- name: 'Alert vulnerability removal' - description: 'Alert when a package is removed from the database' +- name: Alert vulnerability removal + description: Alert when a package is removed from the database configuration_parameters: null metadata: - provider_name: 'redhat' - system: 'RHEL8' - json_feed: 'custom_redhat_json_feed.json' - oval_feed: 'custom_redhat_oval_feed.xml' - nvd_feed: 'custom_nvd_feed.json' + provider_name: redhat + system: RHEL8 + json_feed: custom_redhat_json_feed.json + oval_feed: custom_redhat_oval_feed.xml + nvd_feed: custom_nvd_feed.json oval_feed_tag: CUSTOM_REDHAT_OVAL_FEED json_feed_tag: CUSTOM_REDHAT_JSON_FEED nvd_feed_tag: CUSTOM_NVD_JSON_FEED - test_package_version: '1.0.0' - test_package_version_not_vulnerable: '2.1.0' - test_package_0_name: 'custom-package-0' - test_package_1_name: 'custom-package-1' - test_package_0_cve: 'CVE-000' - test_package_1_cve: 'CVE-001' + test_package_version: 1.0.0 + test_package_version_not_vulnerable: 2.1.0 + test_package_0_name: custom-package-0 + test_package_1_name: custom-package-1 + test_package_0_cve: CVE-000 + test_package_1_cve: CVE-001 -- name: 'Alert vulnerability removal - ALAS 2022' - description: 'Alert when a package is removed from the database' +- name: Alert vulnerability removal - ALAS 2022 + description: Alert when a package is removed from the database configuration_parameters: null metadata: - provider_name: 'alas' - system: 'ALAS_2022' - json_feed: 'custom_alas_2022_feed.json' + provider_name: alas + system: ALAS_2022 + json_feed: custom_alas_2022_feed.json oval_feed: null - nvd_feed: 'custom_nvd_feed.json' + nvd_feed: custom_nvd_feed.json json_feed_tag: CUSTOM_ALAS_2022_JSON_FEED nvd_feed_tag: CUSTOM_NVD_JSON_FEED - test_package_vendor: 'WazuhIntegrationTests' - test_package_version: '1.0.0' - test_package_version_not_vulnerable: '2.1.0' - test_package_0_name: 'custom-package-0' - test_package_1_name: 'custom-package-1' - test_package_0_cve: 'CVE-000' - test_package_1_cve: 'CVE-001' + test_package_vendor: WazuhIntegrationTests + test_package_version: 1.0.0 + test_package_version_not_vulnerable: 2.1.0 + test_package_0_name: custom-package-0 + test_package_1_name: custom-package-1 + test_package_0_cve: CVE-000 + test_package_1_cve: CVE-001 -- name: 'Alert vulnerability removal - SUSE' - description: 'Alert when a package is removed from the database' +- name: Alert vulnerability removal - SUSE + description: Alert when a package is removed from the database configuration_parameters: null metadata: - provider_name: 'suse' - system: 'SLES15' + provider_name: suse + system: SLES15 json_feed: null - oval_feed: 'custom_suse_oval_feed.xml' - nvd_feed: 'custom_nvd_feed.json' + oval_feed: custom_suse_oval_feed.xml + nvd_feed: custom_nvd_feed.json oval_feed_tag: CUSTOM_SUSE_OVAL_FEED nvd_feed_tag: CUSTOM_NVD_JSON_FEED - test_package_vendor: 'SUSE LLC ' - test_package_version: '1.0.0' - test_package_version_not_vulnerable: '2.1.0' - test_package_0_name: 'custom-package-0' - test_package_1_name: 'custom-package-1' - test_package_0_cve: 'CVE-000' - test_package_1_cve: 'CVE-001' + test_package_vendor: SUSE LLC + test_package_version: 1.0.0 + test_package_version_not_vulnerable: 2.1.0 + test_package_0_name: custom-package-0 + test_package_1_name: custom-package-1 + test_package_0_cve: CVE-000 + test_package_1_cve: CVE-001 -- name: 'Alert vulnerability removal - ALMALINUX' - description: 'Alert when a package is removed from the database' +- name: Alert vulnerability removal - ALMALINUX + description: Alert when a package is removed from the database configuration_parameters: null metadata: - provider_name: 'almalinux' - system: 'AlmaLinux-8' + provider_name: almalinux + system: AlmaLinux-8 json_feed: null - oval_feed: 'custom_alsa8_oval_feed.xml' - nvd_feed: 'custom_nvd_feed.json' + oval_feed: custom_alsa8_oval_feed.xml + nvd_feed: custom_nvd_feed.json oval_feed_tag: CUSTOM_ALMA_OVAL_FEED nvd_feed_tag: CUSTOM_NVD_JSON_FEED - test_package_vendor: 'WazuhIntegrationTests' - test_package_version: '1.0.0' - test_package_version_not_vulnerable: '2.1.0' - test_package_0_name: 'custom-package-0' - test_package_1_name: 'custom-package-1' - test_package_0_cve: 'CVE-000' - test_package_1_cve: 'CVE-001' + test_package_vendor: WazuhIntegrationTests + test_package_version: 1.0.0 + test_package_version_not_vulnerable: 2.1.0 + test_package_0_name: custom-package-0 + test_package_1_name: custom-package-1 + test_package_0_cve: CVE-000 + test_package_1_cve: CVE-001 From 48815bba43e174909aa45ba70f45b3f3043beb76 Mon Sep 17 00:00:00 2001 From: Matias Pereyra Date: Wed, 2 Aug 2023 23:55:28 +0000 Subject: [PATCH 9/9] style(#3723): Fixing formatting for AlmaLinux .yaml config file --- .../configuration_scan_vulnerability_removal.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 d16c0c1ef7..6e3671b9b7 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 @@ -214,17 +214,17 @@ - section: sca elements: - enabled: - value: 'no' + value: 'no' - section: rootcheck elements: - disabled: - value: 'yes' + value: 'yes' - section: syscheck elements: - disabled: - value: 'yes' + value: 'yes' - section: wodle attributes: