Skip to content

Commit

Permalink
Merge pull request #4578 from wazuh/merge-4.6.0-into-4.7.0
Browse files Browse the repository at this point in the history
Merge 4.6.0 into 4.7.0
  • Loading branch information
juliamagan authored Oct 6, 2023
2 parents b3084fb + 60b0500 commit e81906f
Show file tree
Hide file tree
Showing 23 changed files with 80 additions and 23 deletions.
9 changes: 6 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Release report: TBD
- Add IT tests FIM registry monitoring using wildcards. ([#4270](https://github.com/wazuh/wazuh-qa/pull/4270)) \- (Framework + Tests)
- Update schema database version ([#4128](https://github.com/wazuh/wazuh-qa/pull/4128)) \- (Tests)
- Update framework known flaws files ([#4380](https://github.com/wazuh/wazuh-qa/pull/4380)) \- (Tests)
- Add tests for Vulnerability Detector: Red Hat 9 support (https://github.com/wazuh/wazuh-qa/pull/4497) \- (Tests)

### Changed

Expand Down Expand Up @@ -79,6 +80,7 @@ Release report: TBD

### Fixed

- Fix Integration Test FIM tests skip marks changed ([#4569] (https://github.com/wazuh/wazuh-qa/pull/4569)) \- (Tests)
- Fix invalid AR conf in integration tests ([#4521](https://github.com/wazuh/wazuh-qa/pull/4521)) \- (Tests)
- Fix an error in AR library and test ([#4511](https://github.com/wazuh/wazuh-qa/pull/4511)) \- (Framework + Tests)
- Fix provisioned pytest failure fixed ([#4520](https://github.com/wazuh/wazuh-qa/pull/4520)) \- (Framework)
Expand All @@ -93,10 +95,10 @@ Release report: TBD
- Fix bug in the framework on migration tool ([#4027](https://github.com/wazuh/wazuh-qa/pull/4027)) \- (Framework)
- Fix test cluster / integrity sync system test and configuration to avoid flaky behavior ([#4406](https://github.com/wazuh/wazuh-qa/pull/4406)) \- (Tests)

## [4.5.3] - 28/09/2023
## [4.5.3] - 10/10/2023

Wazuh commit: https://github.com/wazuh/wazuh/commit/9087982b0c4ae0180bcdcd214a2b243e75cd8416 \
Release report: https://github.com/wazuh/wazuh/issues/19111
Wazuh commit: https://github.com/wazuh/wazuh/commit/388ce54b704d7b6aa2dda1b30258ad1642b26a2d \
Release report: https://github.com/wazuh/wazuh/issues/19446

### Changed

Expand All @@ -105,6 +107,7 @@ Release report: https://github.com/wazuh/wazuh/issues/19111

### Fixed

- Fix enrollment system tests ([#4562](https://github.com/wazuh/wazuh-qa/pull/4562/)) \- (Tests)
- Update the request method used to call the login API endpoint. ([#4492](https://github.com/wazuh/wazuh-qa/pull/4492)) \- (Tests)
- Enhancing the handling of authd and remoted simulators in case of restart failures ([#Wazuh-jenkins#3487](https://github.com/wazuh/wazuh-qa/pull/4205)) \- (Tests)
- Fix py dependency version to install for Windows after the change to Python 3.11([#4523](https://github.com/wazuh/wazuh-qa/pull/4523)) \- (Framework)
Expand Down
2 changes: 2 additions & 0 deletions deps/wazuh_testing/wazuh_testing/mocking/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@
'config_sum': '', 'merged_sum': '', 'manager_host': 'alas2023', 'node_name': 'node01',
'date_add': '1645538646', 'last_keepalive': '253402300799', 'sync_status': 'synced',
'connection_status': 'active'},
'RHEL9': {'os_name': 'CentOS Linux', 'os_major': '9', 'os_minor': '1', 'os_platform': 'centos',
'name': 'centos9', 'connection_status': 'active'},
'RHEL8': {'os_name': 'CentOS Linux', 'os_major': '8', 'os_minor': '1', 'os_platform': 'centos',
'name': 'centos8', 'connection_status': 'active'},
'RHEL7': {'os_name': 'CentOS Linux', 'os_major': '7', 'os_minor': '1', 'os_platform': 'centos', 'os_version': '7.0',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def get_configuration(request):


# test
@pytest.mark.skip(sys.platform=='win32', reason="Blocked by #4077.")
@pytest.mark.skipif(sys.platform == 'win32', reason="Blocked by #4077.")
@pytest.mark.parametrize('key, subkey, arch, value_list', [
(key, sub_key_1, KEY_WOW64_64KEY, ['value1', 'value2', 'value3']),
(key, sub_key_2, KEY_WOW64_32KEY, ['value1', 'value2', 'value3']),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def get_configuration(request):


# tests
@pytest.mark.skip(sys.platform=='win32', reason="Blocked by #4077.")
@pytest.mark.skipif(sys.platform == 'win32', reason="Blocked by #4077.")
@pytest.mark.parametrize('key_name', [':subkey1', 'subkey2:', ':subkey3:'])
@pytest.mark.parametrize('value_name', [':value1', 'value2:', ':value3:'])
def test_registry_sync_after_restart(key_name, value_name, configure_local_internal_options_module,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
- os:
attributes:
- url: CUSTOM_FEED_URL
value: '8'
value: '9'
- url:
value: CUSTOM_FEED_URL
- provider:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,18 @@
download_timeout: 150
update_treshold_weeks: 2

- name: RHEL9
description: Red Hat Enterprise Linux provider
configuration_parameters:
PROVIDER: redhat
OS: '9'
metadata:
provider_name: Red Hat Enterprise Linux 9
provider_json_name: JSON Red Hat Enterprise Linux
provider_os: RHEL9
download_timeout: 150
update_treshold_weeks: 2

- name: TRUSTY
description: Canonical provider
configuration_parameters:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
- name: RedHat
description: Insert RHEL 9 OVAL and JSON feed from local path
configuration_parameters:
PROVIDER: redhat
OS: '9'
OS_PATH: CUSTOM_REDHAT_OVAL_FEED_PATH
PATH: CUSTOM_REDHAT_JSON_FEED_PATH
metadata:
provider_name: Red Hat Enterprise Linux 9
provider_json_name: JSON Red Hat Enterprise Linux

- name: RedHat
description: Insert RHEL 8 OVAL and JSON feed from local path
configuration_parameters:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
target: redhat
custom_feed_url: https://s3.amazonaws.com/ci.wazuh.com/qa/testing_files/dummy_files/dummy.pdf
provider_feed_names:
- redhat 8
- redhat 9
- jredhat provider

- name: Debian - JPG
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,17 @@
decompressed_file: /tmp/rhel8.xml
url: https://www.redhat.com/security/data/oval/v2/RHEL8/rhel-8-including-unpatched.oval.xml.bz2

- name: Red Hat Enterprise Linux
description: Red Hat Enterprise Linux provider
configuration_parameters:
metadata:
provider_name: Red Hat Enterprise Linux 9
expected_format: application/x-bzip2
path: /tmp/rhel-9-including-unpatched.oval.xml.bz2
extension: bz2
decompressed_file: /tmp/rhel9.xml
url: https://www.redhat.com/security/data/oval/v2/RHEL9/rhel-9-including-unpatched.oval.xml.bz2

- name: Canonical Jammy
description: Canonical provider
configuration_parameters:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,15 @@
metadata:
provider_name: Ubuntu Jammy

- name: RHEL 9
description: Test disabled Red Hat Enterprise Linux 9
configuration_parameters:
ENABLED: 'no'
PROVIDER: redhat
OS: '9'
metadata:
provider_name: Red Hat Enterprise Linux 9

- name: RHEL 8
description: Test disabled Red Hat Enterprise Linux 8
configuration_parameters:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,15 @@
metadata:
provider_name: Ubuntu Jammy

- name: RHEL 9
description: Test enabled Red Hat Enterprise Linux 8
configuration_parameters:
ENABLED: 'yes'
PROVIDER: redhat
OS: '9'
metadata:
provider_name: Red Hat Enterprise Linux 9

- name: RHEL 8
description: Test enabled Red Hat Enterprise Linux 8
configuration_parameters:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
- name: RedHat 8
description: Insert RHEL 8 OVAL and JSON feed from local path
- name: RedHat 9
description: Insert RHEL 9 OVAL and JSON feed from local path
configuration_parameters:
PROVIDER: redhat
OS: '8'
OS: '9'
OS_PATH: CUSTOM_REDHAT_OVAL_FEED_PATH
PATH: CUSTOM_REDHAT_JSON_FEED_PATH
metadata:
provider_name: Red Hat Enterprise Linux 8
provider_name: Red Hat Enterprise Linux 9
provider_json_name: JSON Red Hat Enterprise Linux
oval_feed_path: CUSTOM_REDHAT_OVAL_FEED_PATH
json_feed_path: CUSTOM_REDHAT_JSON_FEED_PATH
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
- os:
attributes:
- path: CUSTOM_REDHAT_OVAL_FEED
value: '8'
value: '9'
- path:
value: CUSTOM_REDHAT_JSON_FEED
- provider:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
- os:
attributes:
- path: CUSTOM_REDHAT_OVAL_FEED
value: '8'
value: '9'
- path:
value: CUSTOM_REDHAT_JSON_FEED
- provider:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
- os:
attributes:
- path: CUSTOM_REDHAT_OVAL_FEED
value: '8'
value: '9'
- path:
value: CUSTOM_REDHAT_JSON_FEED
- provider:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
configuration_parameters:
NVD_JSON_PATH: CUSTOM_NVD_JSON_PATH
metadata:
system: RHEL8
system: RHEL9

- name: UBUNTU
description: Scan UBUNTU vulnerabilities using only the NVD feed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
configuration_parameters: null
metadata:
provider_name: redhat
system: RHEL8
system: RHEL9
json_feed: custom_redhat_json_feed.json
oval_feed: custom_redhat_oval_feed.xml
nvd_feed: custom_nvd_feed.json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
configuration_parameters: null
metadata:
provider_name: redhat
system: RHEL8
system: RHEL9
json_feed: custom_redhat_json_feed.json
oval_feed: custom_redhat_oval_feed.xml
nvd_feed: custom_nvd_alternative_feed.json
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
- name: RHEL
description: Check that after partial scan is launched triaged status changes from NULL to 1
configuration_parameters:
OS: '8'
OS: '9'
SCAN_INTERVAL: '5'
metadata:
system: RHEL8
system: RHEL9
triaged: ''
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
configuration_parameters: null
metadata:
provider_name: redhat
system: RHEL8
system: RHEL9
json_feed: custom_redhat_json_feed.json
oval_feed: custom_redhat_oval_feed.xml
nvd_feed: custom_nvd_feed.json
Expand Down
2 changes: 1 addition & 1 deletion tests/system/test_agent_auth/test_agent_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ def clean_environment():
host_manager.run_command('wazuh-manager', f"{WAZUH_PATH}/bin/manage_agents -r {agent_id}")
host_manager.clear_file(host='wazuh-manager', file_path=os.path.join(WAZUH_PATH, 'etc', 'client.keys'))
host_manager.clear_file(host='wazuh-agent1', file_path=os.path.join(WAZUH_PATH, 'etc', 'client.keys'))
host_manager.clear_file(host='wazuh-agent1', file_path=os.path.join(WAZUH_LOGS_PATH, 'ossec.log'))


# IPV6 fixtures
Expand Down Expand Up @@ -234,7 +235,6 @@ def test_agent_auth(test_case, get_ip_directions, configure_network, modify_ip_a
'''
# Clean ossec.log and cluster.log
host_manager.clear_file(host='wazuh-manager', file_path=os.path.join(WAZUH_LOGS_PATH, 'ossec.log'))
host_manager.clear_file(host='wazuh-agent1', file_path=os.path.join(WAZUH_LOGS_PATH, 'ossec.log'))
host_manager.control_service(host='wazuh-manager', service='wazuh', state="restarted")

# Start the agent enrollment process using agent-auth
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def clean_environment():
check=False)
host_manager.control_service(host='wazuh-agent1', service='wazuh', state="stopped")
host_manager.clear_file(host='wazuh-agent1', file_path=os.path.join(WAZUH_PATH, 'etc', 'client.keys'))
host_manager.clear_file(host='wazuh-agent1', file_path=os.path.join(WAZUH_LOGS_PATH, 'ossec.log'))


def test_agent_enrollment(clean_environment):
Expand All @@ -40,7 +41,6 @@ def test_agent_enrollment(clean_environment):
# Clean ossec.log and cluster.log
host_manager.clear_file(host='wazuh-master', file_path=os.path.join(WAZUH_LOGS_PATH, 'ossec.log'))
host_manager.clear_file(host='wazuh-worker1', file_path=os.path.join(WAZUH_LOGS_PATH, 'ossec.log'))
host_manager.clear_file(host='wazuh-agent1', file_path=os.path.join(WAZUH_LOGS_PATH, 'ossec.log'))
host_manager.clear_file(host='wazuh-master', file_path=os.path.join(WAZUH_LOGS_PATH, 'cluster.log'))
host_manager.clear_file(host='wazuh-worker1', file_path=os.path.join(WAZUH_LOGS_PATH, 'cluster.log'))

Expand Down
2 changes: 1 addition & 1 deletion tests/system/test_enrollment/test_enrollment.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ def clean_environment():

host_manager.clear_file(host='wazuh-manager', file_path=os.path.join(WAZUH_PATH, 'etc', 'client.keys'))
host_manager.clear_file(host='wazuh-agent1', file_path=os.path.join(WAZUH_PATH, 'etc', 'client.keys'))
host_manager.clear_file(host='wazuh-agent1', file_path=os.path.join(WAZUH_LOGS_PATH, 'ossec.log'))


# IPV6 fixtures
Expand Down Expand Up @@ -220,7 +221,6 @@ def test_agent_enrollment(test_case, get_ip_directions, configure_network, modif
'''
# Clean ossec.log and cluster.log
host_manager.clear_file(host='wazuh-manager', file_path=os.path.join(WAZUH_LOGS_PATH, 'ossec.log'))
host_manager.clear_file(host='wazuh-agent1', file_path=os.path.join(WAZUH_LOGS_PATH, 'ossec.log'))

# Start the agent enrollment process by restarting the wazuh-agent
host_manager.control_service(host='wazuh-manager', service='wazuh', state="restarted")
Expand Down

0 comments on commit e81906f

Please sign in to comment.