Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/4.8.2' into enhancement/339-remo…
Browse files Browse the repository at this point in the history
…ve-kibana-references
  • Loading branch information
MARCOSD4 committed Apr 4, 2024
2 parents faec511 + 386fa8c commit 74c9ac3
Show file tree
Hide file tree
Showing 81 changed files with 7,275 additions and 846 deletions.
47 changes: 46 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,18 @@ All notable changes to this project will be documented in this file.
- Removed configobj library from requirements.txt ([#4803](https://github.com/wazuh/wazuh-qa/pull/4803)) \- (Framework)
- Updated integration tests README ([#4742](https://github.com/wazuh/wazuh-qa/pull/4742)) \- (Framework)

### Fixed

- Fix manager_agent system tests environment ([#4808](https://github.com/wazuh/wazuh-qa/pull/4808)) \- (Framework)

## [4.8.0] - TBD

### Added

- Add documentation about markers for system tests ([#5080](https://github.com/wazuh/wazuh-qa/pull/5080)) \- (Documentation)
- Add AWS Custom Buckets Integration tests ([#4675](https://github.com/wazuh/wazuh-qa/pull/4675)) \- (Framework + Tests)
- Add Vulnerability Detector end to end tests ([#4878](https://github.com/wazuh/wazuh-qa/pull/4878)) \- (Framework + Tests)
- Agent Simulator: Syscollector message generation refactoring ([#4868](https://github.com/wazuh/wazuh-qa/pull/4868)) \- (Framework)
- Migrate Wazuh Ansibles Roles. ([#4642](https://github.com/wazuh/wazuh-qa/pull/4642)) \- (Framework)
- Add scans environment setup documentation. ([#4444](https://github.com/wazuh/wazuh-qa/pull/4444)) \- (Tests)
- Add system test for global group hash ([#4015](https://github.com/wazuh/wazuh-qa/pull/4015)) \- (Tests)
Expand All @@ -26,6 +34,13 @@ All notable changes to this project will be documented in this file.

### Changed

- Refactor initial scan Vulnerability E2E tests ([#5081](https://github.com/wazuh/wazuh-qa/pull/5081)) \- (Framework + Tests)
- Update Packages in TestScanSyscollectorCases ([#4997](https://github.com/wazuh/wazuh-qa/pull/4997)) \- (Framework + Tests)
- Reduced test_shutdown_message runtime ([#4986](https://github.com/wazuh/wazuh-qa/pull/4986)) \- (Tests)
- Change e2e vd configuration keystore ([#4952](https://github.com/wazuh/wazuh-qa/pull/4952)) \- (Framework)
- Updating tests after removing references to the legacy vulnerability detector module ([#4872](https://github.com/wazuh/wazuh-qa/pull/4872)) \- (Tests)
- Fix wazuhdb API statistics parsing ([#5007](https://github.com/wazuh/wazuh-qa/pull/5007)) \- (Framework)
- Enhance StatisticMonitor with API support ([#4970](https://github.com/wazuh/wazuh-qa/pull/4970)) \- (Framework)
- Deactivate tests and update vulnerability-detector configuration ([#4784](https://github.com/wazuh/wazuh-qa/pull/4784)) \- (Framework + Tests)
- Fix body format for get_api_token ([#4797](https://github.com/wazuh/wazuh-qa/pull/4797)) \- (Framework)
- Fix one_manager_agent_env pytest marker for System Tests ([#4782](https://github.com/wazuh/wazuh-qa/pull/4782)) \- (Tests)
Expand All @@ -41,15 +56,44 @@ All notable changes to this project will be documented in this file.
- Update the JSON schema with the required fields for the output content of the migration tool ([#4375](https://github.com/wazuh/wazuh-qa/pull/4375)) \- (Tests)
- Update framework known flaws file ([#4443](https://github.com/wazuh/wazuh-qa/pull/4443)) \- (Tests)
- Align migration tool system tests to the tool's new output directory structure ([#4561](https://github.com/wazuh/wazuh-qa/pull/4561)) \- (Tests)
- Update file descriptors threshold values used in cluster performance tests ([#5073](https://github.com/wazuh/wazuh-qa/pull/5073)) \- (Tests)

### Fixed

- Fix `test_synchronization` system test ([#5089](https://github.com/wazuh/wazuh-qa/pull/5089)) \- (Framework + Tests)
- Fix number of files and their size for `test_zip_size_limit` ([#5133](https://github.com/wazuh/wazuh-qa/pull/5133)) \- (Tests)
- Fix test_shutdown_message system test ([#5087](https://github.com/wazuh/wazuh-qa/pull/5087)) \- (Tests)
- Include timeout to test_authd system tests ([#5083](https://github.com/wazuh/wazuh-qa/pull/5083)) \- (Tests)
- Fix Vulnerability Detection mismatch in scans ([#5053](https://github.com/wazuh/wazuh-qa/pull/5053)) \- (Tests)
- Fix agent groups tests for enrollment_cluster environment ([#5086](https://github.com/wazuh/wazuh-qa/pull/5086)) \- (Framework + Tests)
- Fix initial scans tests ([5032](https://github.com/wazuh/wazuh-qa/pull/5032)) \- (Framework + Tests)
- Handle VDT data missing in wazuh-db API ([5014](https://github.com/wazuh/wazuh-qa/pull/5014)) \- (Framework + Tests)
- Fixed x-axis labels in data-visualizer script ([#4987 ](https://github.com/wazuh/wazuh-qa/pull/4987)) \- (Framework)
- Fix monitoring module for e2e tests ([#4959](https://github.com/wazuh/wazuh-qa/pull/4959)) \- (Framework)
- Fix get_host_variables for system tests ([#4958](https://github.com/wazuh/wazuh-qa/pull/4958)) \- (Framework)
- Fix install package HostManager method ([#4954](https://github.com/wazuh/wazuh-qa/pull/4954)) \- (Framework)
- Fix Modify file method in system module ([#4953](https://github.com/wazuh/wazuh-qa/pull/4953)) \- (Framework)
- Fix timeout and performance issues in E2E Vulnerability Detector tests ([#5003](https://github.com/wazuh/wazuh-qa/pull/5003)) \- (Framework)
- Fixed Filebeat provisioning role with pre-release and staging URLs ([#4950](https://github.com/wazuh/wazuh-qa/pull/4950)) \- (Framework)
- Fix macOS Vulnerability Detection handler provision in E2E tests ([#4948](https://github.com/wazuh/wazuh-qa/pull/4948)) \- (Framework)
- Migrate Vulnerability Detection timeouts variables to the waiters module ([#4949](https://github.com/wazuh/wazuh-qa/pull/4949)) \- (Framework)
- Migrate HostMonitor to system_monitoring to avoid Windows import of ansible module ([#4917](https://github.com/wazuh/wazuh-qa/pull/4917/)) \- (Framework)
- Fixed ansible_runner import conditional to avoid errors on Windows and python 3.6 ([#4916](https://github.com/wazuh/wazuh-qa/pull/4916)) \- (Framework)
- Fixed IT control_service Windows loop ([#4765](https://github.com/wazuh/wazuh-qa/pull/4765)) \- (Framework)
- Fix macOS agents provision to enable registration and connection with managers. ([#4770](https://github.com/wazuh/wazuh-qa/pull/4770/)) \- (Framework)
- Fix hardcoded python interpreter in qa_framework role. ([#4658](https://github.com/wazuh/wazuh-qa/pull/4658)) \- (Framework)
- Fix duplicated jq dependency ([#4678](https://github.com/wazuh/wazuh-qa/pull/4678)) \- (Framework)
- Fix test_file_checker in check_mtime case ([#4873](https://github.com/wazuh/wazuh-qa/pull/4873)) \- (Tests)
- Fix test cluster performance. ([#4780](https://github.com/wazuh/wazuh-qa/pull/4780)) \- (Framework)
- Fixed the graphic generation for the logcollectord statistics files. ([#5021](https://github.com/wazuh/wazuh-qa/pull/5021)) \- (Framework)

## [4.7.3] - 04/03/2024

### Changed

- Upgrade wazuh-db agent database version. ([#4992](https://github.com/wazuh/wazuh-qa/pull/4992)) \- (Tests)

## [4.7.2] - TBD
## [4.7.2] - 10/01/2024

### Fixed

Expand Down Expand Up @@ -115,6 +159,7 @@ All notable changes to this project will be documented in this file.

### Changed

- Change expected database version ([#5111](https://github.com/wazuh/wazuh-qa/pull/5111)) \- (Tests)
- `Agentless_cluster` system tests timeout changed in order to reduce EC2 requirements ([#4534](https://github.com/wazuh/wazuh-qa/pull/4534)) \- (Tests)
- Skip `test_authd_ssl_options` cases that use TLS 1.1 causing errors on several OpenSSL versions. ([#4229](https://github.com/wazuh/wazuh-qa/pull/4229)) \- (Tests)
- Update database version ([#4467](https://github.com/wazuh/wazuh-qa/pull/4467)) \- (Tests)
Expand Down
2 changes: 2 additions & 0 deletions deps/wazuh_testing/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@
'qa_ctl/provisioning/wazuh_deployment/templates/preloaded_vars.conf.j2',
'data/qactl_conf_validator_schema.json',
'data/all_disabled_ossec.conf',
'data/syscollector_parsed_packages.json',
'tools/migration_tool/delta_schema.json',
'end_to_end/vulnerability_detector_packages/vuln_packages.json',
'tools/migration_tool/CVE_JSON_5.0_bundled.json'
]

Expand Down
167 changes: 159 additions & 8 deletions deps/wazuh_testing/wazuh_testing/data/syscollector.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
SYSCOLLECTOR_HEADER = '{"type":"<syscollector_type>",' \
# Legacy Syscollector Templates

LEGACY_SYSCOLLECTOR_HEADER = '{"type":"<syscollector_type>",' \
'"ID":<random_int>,"timestamp":"<timestamp>"'

SYSCOLLECTOR_OS_EVENT_TEMPLATE = ',"inventory":{"os_name":"<random_string>",' \
LEGACY_SYSCOLLECTOR_OS_EVENT_TEMPLATE = ',"inventory":{"os_name":"<random_string>",' \
'"os_major":"8","os_minor":"3","os_version":"8.3",' \
'"os_platform":"centos","sysname":"Linux",' \
'"hostname":"centos3","release":"4.18.0-240.1.1.el8_3.x86_64",' \
'"version":"#1 SMP Thu Nov 19 17:20:08 UTC 2020","architecture":"x86_64"}}'

SYSCOLLECTOR_HARDWARE_EVENT_TEMPLATE = ',"inventory":{"board_serial":"0",' \
LEGACY_SYSCOLLECTOR_HARDWARE_EVENT_TEMPLATE = ',"inventory":{"board_serial":"0",' \
'"cpu_name":"AMD Ryzen 7 3750H with Radeon Vega Mobile Gfx",' \
'"cpu_cores":<random_int>,"cpu_MHz":2295.686,"ram_total":828084,' \
'"ram_free":60488,"ram_usage":93}}'

SYSCOLLECTOR_PACKAGES_EVENT_TEMPLATE = ',"program":{"format":"rpm","name":"<random_string>",' \
LEGACY_SYSCOLLECTOR_PACKAGES_EVENT_TEMPLATE = ',"program":{"format":"rpm","name":"<random_string>",' \
'"description":"JSON::XS compatible pure-Perl module",' \
'"size":126,"vendor":"CentOS","group":"Unspecified",' \
'"architecture":"noarch","source":"perl-JSON-PP-2.97.001-3.el8.src.rpm",' \
'"install_time":"2021/03/12 12:23:17"' \
',"version":"1:2.97.001-3.el8"}}'

SYSCOLLECTOR_PROCESS_EVENT_TEMPLATE = ',"process":{"pid":3150,"name":"<random_string>","state":"R",' \
LEGACY_SYSCOLLECTOR_PROCESS_EVENT_TEMPLATE = ',"process":{"pid":3150,"name":"<random_string>","state":"R",' \
'"ppid":2965,"utime":58,' \
'"stime":2,"cmd":"rpm","argvs":["-qa","xorg-x11*"],' \
'"euser":"root","ruser":"root","suser":"root","egroup":"ossec",' \
Expand All @@ -31,7 +33,7 @@
'"session":3150,"nlwp":1,' \
'"tgid":3150,"tty":0,"processor":0}}'

SYSCOLLECTOR_NETWORK_EVENT_TEMPLATE = ',"iface":{"name":"<random_string>","type":"ethernet","state":"up",' \
LEGACY_SYSCOLLECTOR_NETWORK_EVENT_TEMPLATE = ',"iface":{"name":"<random_string>","type":"ethernet","state":"up",' \
'"MAC":"08:00:27:be:ce:3a","tx_packets":2135,' \
'"rx_packets":9091,"tx_bytes":210748,' \
'"rx_bytes":10134272,"tx_errors":0,' \
Expand All @@ -40,9 +42,158 @@
'"netmask":["255.255.255.0"],"broadcast":["10.0.2.255"],' \
'"metric":100,"gateway":"10.0.2.2","DHCP":"enabled"}}}'

SYSCOLLECTOR_PORT_EVENT_TEMPLATE = ',"port":{"protocol":"tcp","local_ip":"0.0.0.0",' \
LEGACY_SYSCOLLECTOR_PORTS_EVENT_TEMPLATE = ',"port":{"protocol":"tcp","local_ip":"0.0.0.0",' \
'"local_port":<random_int>,"remote_ip":"0.0.0.0",' \
'"remote_port":0,"tx_queue":0,' \
'"rx_queue":0,"inode":22273,"state":"listening"}}'

SYSCOLLECTOR_HOTFIX_EVENT_TEMPLATE = ',"hotfix":"<random_string>"}'
LEGACY_SYSCOLLECTOR_HOTFIX_EVENT_TEMPLATE = ',"hotfix":"<random_string>"}'


# Delta Templates

SYSCOLLECTOR_PACKAGE_DELTA_DATA_TEMPLATE = {
"architecture": "<package_architecture>",
"checksum": "<random_string>",
"description": "<package_description>",
"format": "<package_format>",
"groups": "editors",
"install_time": "<timestamp>",
"item_id": "<package_item_id>",
"location": " ",
"multiarch": "null",
"name": "<package_name>",
"priority": "optional",
"scan_time": "2023/12/19 15:32:25",
"size": "<random_int>",
"source": "<package_source>",
"vendor": "<package_vendor>",
"version": "<package_version>"
}

SYSCOLLECTOR_HOTFIX_DELTA_DATA_TEMPLATE = {
"checksum": "<random_string>",
"hotfix": "<random_string>",
"scan_time": "<timestamp>"
}

SYSCOLLECTOR_OSINFO_DELTA_EVENT_TEMPLATE = {
"checksum": "1634140017886803554",
"architecture": "x86_64",
"hostname": "<agent_name>",
"os_codename": "focal",
"os_major": "20",
"os_minor": "04",
"os_name": "Ubuntu",
"os_platform": "ubuntu",
"os_patch": "6",
"os_release": "sp1",
"os_version": "20.04.6 LTS (Focal Fossa)",
"os_build": "4.18.0-305.12.1.el8_4.x86_64",
"release": "6.2.6-76060206-generic",
"scan_time": "2023/12/20 11:24:58",
"sysname": "Linux",
"version": "#202303130630~1689015125~22.04~ab2190e SMP PREEMPT_DYNAMIC"
}

SYSCOLLECTOR_PROCESSSES_DELTA_EVENT_TEMPLATE = {
"argvs": "<random_int",
"checksum": "<random_string>",
"euser": "<random_string>",
"fgroup": "<random_string>",
"name": "<random_string>",
"nice": "<random_int>",
"nlwp": "<random_int>",
"pgrp": "<random_int>",
"ppid": "<random_int>",
"priority": "<random_int>",
"processor": "<random_int>",
"resident": "<random_int>",
"rgroup": "<random_string>",
"scan_time": "<timestamp>",
"session": "<random_int>",
"sgroup": "<random_string>",
"share": "<random_int>",
"size": "<random_int>",
"start_time": "<random_int>",
"state": "S",
"stime": "<random_int>",
"suser": "<random_string>",
"tgid": "<random_int>",
"tty": "<random_int>",
"utime": "<random_int>",
"vm_size": "<random_int>",
"cmd": "",
"egroup": "<random_string>",
"ruser": "<random_string>"
}

SYSCOLLECTOR_PORTS_DELTA_EVENT_TEMPLATE = {
"checksum": "<random_string>",
"item_id": "<random_string>",
"local_ip": "0.0.0.0",
"local_port": "<random_int>",
"pid": "<random_int>",
"process": "NULL",
"protocol": "tcp",
"remote_ip": "0.0.0.0",
"remote_port": "<random_int>",
"rx_queue": "<random_int>",
"scan_time": "<timestamp>",
"state": "listening",
"tx_queue": "<random_int>"
}

SYSCOLLECTOR_HWINFO_DELTA_EVENT_TEMPLATE = {
"scan_time": "<timestamp>",
"board_serial": "<random_string>",
"checksum": "<random_string>",
"cpu_mhz": "<random_int>",
"cpu_cores": "<random_int>",
"cpu_name": "<random_string>",
"ram_free": "<random_int>",
"ram_total": "<random_int>",
"ram_usage": "<random_int>"
}

SYSCOLLECTOR_NETWORK_IFACE_DELTA_EVENT_TEMPLATE = {
"adapter": None,
"checksum": "<random_int>",
"item_id": "<random_int>",
"mac": "<random_int>",
"mtu": "<random_int>",
"name": "<random_int>",
"rx_bytes": "<random_int>",
"rx_dropped": "<random_int>",
"rx_errors": "<random_int>",
"rx_packets": "<random_int>",
"scan_time": "<timestamp>",
"state": "<random_int>",
"tx_bytes": "<random_int>",
"tx_dropped": "<random_int>",
"tx_errors": "<random_int>",
"tx_packets": "<random_int>",
"type": "<random_int>"
}

SYSCOLLECTOR_NETWORK_NETADDR_DELTA_EVENT_TEMPLATE = {
"id": "<random_int>",
"scan_id": "<random_int>",
"proto": "<random_string>",
"address": "192.168.1.87",
"netmask": "255.255.255.0",
"broadcast": "192.168.1.255",
"checksum": "<random_string",
"item_id": "<random_string>"
}

SYSCOLLECTOR_NETWORK_NETPRO_DELTA_EVENT_TEMPLATE = {
"id": "<random_int>",
"scan_id": "<random_int>",
"iface": "eth0",
"type": "ipv4",
"gateway": "192.168.1.1",
"dhcp": "enabled",
"checksum": "<random_int>",
"item_id": "<random_int>"
}
Loading

0 comments on commit 74c9ac3

Please sign in to comment.