Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge 4.8.2 into master #4924

Merged
merged 195 commits into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
195 commits
Select commit Hold shift + click to select a range
0efe5c6
feat: first vd tests scan structure
Rebits Oct 26, 2023
ae6729c
Merge branch 'fix/jq-requirement' into enhacement/4590-vd-basic-test-…
Rebits Nov 6, 2023
5b787f0
feat: create generate check alert function
Rebits Nov 6, 2023
e8992cc
feat: created test_vulnerability_detector basic tests structure
Rebits Nov 7, 2023
baddbd4
refac: improve tests readability
Rebits Nov 8, 2023
21176da
feat: include extra steps to Vulns verifications E2E
Rebits Nov 14, 2023
b9f1101
feat: create modules for E2E Vuln operations
Rebits Nov 15, 2023
8c52410
fix: minnor errors in E2E VD tests
Rebits Nov 20, 2023
b6406e1
refac: improve configuration module for E2E
Rebits Nov 20, 2023
e0b6bd7
refact: improve indexer_api module
Rebits Nov 20, 2023
f3b4617
docs: include docstrings to logs E2E module
Rebits Nov 20, 2023
152baf3
docs: include docstrings for monitoring module
Rebits Nov 20, 2023
2c7ea3f
fix: replace docstring placeholders
Rebits Nov 20, 2023
0ea1237
feat: remove non-basic VD tests
Rebits Nov 20, 2023
1ebf9d6
refac: remove non-used fixtures
Rebits Nov 20, 2023
2031f47
refact: remove testing inventory
Rebits Nov 20, 2023
07b9c97
refact: remove non-used vuln-packages module
Rebits Nov 20, 2023
98734a2
docs: include test docstrings
Rebits Nov 21, 2023
ea79262
refac: logs path variable
Rebits Nov 21, 2023
be7a936
refac: e2e modules and restore IT monitoring
Rebits Nov 21, 2023
63b87c4
docs: improve indexer api documentation
Rebits Nov 21, 2023
69642ab
feat: include control environment in the host manager class
Rebits Nov 21, 2023
a3cdad7
refac: remove unnused Debian ansible indexer task
Rebits Nov 21, 2023
3dafc39
docs: include docstring for some HostManager methods
Rebits Nov 21, 2023
086706d
docs: improve docstring of some host manager methods
Rebits Nov 21, 2023
a1a76b5
docs: standarize module docstrings
Rebits Nov 21, 2023
0219de0
feat: include logger for VD E2E tests
Rebits Nov 21, 2023
b1f7304
fix: syscollector end regex
Rebits Nov 21, 2023
63be1bc
Merge branch '4.8.0' into enhacement/4590-vd-basic-test-cases-syscoll…
Rebits Nov 21, 2023
afc6f49
feat: include armv agents into VD E2E tests
Rebits Nov 21, 2023
87a36a8
fix: e2e vd environment dictionary
Rebits Nov 21, 2023
1d31d7d
fix: replace filebeat version to 2
Rebits Nov 21, 2023
e53b116
feat: include enrollment name as hostname by default
Rebits Nov 22, 2023
c192df4
fix: angent name provision names
Rebits Nov 22, 2023
126c845
fix: increased timeout for Finished scan waiter
Rebits Nov 23, 2023
753e58a
feat: rename test_scans to test_vd
Rebits Nov 23, 2023
1d25dce
fix: VD E2E environment
Rebits Nov 23, 2023
0606ce8
fix: error in environments dict
Rebits Nov 23, 2023
c6d57ae
fix: errors in remove_operations handlers and HostManager class
Rebits Nov 24, 2023
bcf316d
style: remove raw string from base_path
Rebits Nov 24, 2023
4e4e379
style: pep8 e2e monitoring module
Rebits Nov 24, 2023
0fcfb6d
style: rename restore backup conf function
Rebits Nov 24, 2023
e4f5036
refac: make configure_host more readable
Rebits Nov 24, 2023
aa9a96a
docs: remove Elasticsearch references
Rebits Nov 27, 2023
2f1f35f
docs: remove Elasticsearch from functions docstrings
Rebits Nov 27, 2023
a8c21e3
style: fix PEP8 style errors
Rebits Nov 27, 2023
8b456ef
style: fix pep8 in monitoring module
Rebits Nov 27, 2023
300dbcc
refac: remove monitoring_events_host_monitoring function
Rebits Nov 27, 2023
fba8d16
feat: include interval parameters to monitoring function
Rebits Nov 27, 2023
e14ce41
style: fix pep8 style errors in regex module
Rebits Nov 27, 2023
d746846
style: include typing for get_regex function
Rebits Nov 27, 2023
33f6ff8
style: pep8 for test vulnerability E2E
Rebits Nov 27, 2023
9aa7fa5
style: rename manager to host_manager
Rebits Nov 27, 2023
d50fda8
refac: remove unnused yaml regex file
Rebits Nov 27, 2023
a6cc0e5
style: renamed some macos configuration tasks
Rebits Nov 27, 2023
063334f
style: added final empty line to ansible playbook
Rebits Nov 27, 2023
310437f
style: fix pep8 style errors of remote handler module
Rebits Nov 27, 2023
b8212e3
fix: renamed todo function to check vd consistency
Rebits Nov 27, 2023
64909e7
refac: rename basic cases e2e environment name
Rebits Nov 27, 2023
cbb9a7a
style: fix imports in VD tests
Rebits Nov 27, 2023
4141f0e
style: remove extra white space in ansible task
Rebits Nov 27, 2023
e0a7933
refac: logs E2E module
Rebits Nov 27, 2023
feb1646
fix: truncate logs after VD tests module
Rebits Nov 27, 2023
ff3c337
refac: include TIMEOUT_SYSCOLLECTOR to syscollector module
Rebits Nov 27, 2023
505cd9d
refac: unnused environment file
Rebits Nov 27, 2023
372138c
fix: add break in get master ip
Rebits Nov 27, 2023
cce910b
refac: install package from system module
Rebits Nov 27, 2023
5aac515
refac: move file host manager
Rebits Nov 27, 2023
f213e5b
fix: move_file preserve by defaul the permissions
Rebits Nov 27, 2023
9fa5a67
refac: remove unnused var
Rebits Nov 27, 2023
5e4f1ab
refac: imports in waiters module
Rebits Nov 27, 2023
853015c
Merge branch 'enhacement/4590-vd-basic-test-cases-syscollector-scan' …
Rebits Nov 27, 2023
dfa6071
fix: remove VD from template
Rebits Nov 28, 2023
50e2274
fix: change configuration to match refactor VD
Rebits Nov 28, 2023
05b92a9
fix: VD E2E configuration load function
Rebits Nov 28, 2023
33078ba
fix: addapt VD to refactor
Rebits Nov 28, 2023
556ac82
feat: include support for check indices and fix indexer api method
Rebits Nov 29, 2023
3b835aa
feat: include packages for VD E2E testing
Rebits Dec 5, 2023
46059a9
Merge branch '4.8.0' into enhacement/4591-vd-vuln-cases
Rebits Dec 13, 2023
54937f0
fix: imports errors
Rebits Dec 28, 2023
ed0f26d
fix: centos vuln package
Rebits Jan 4, 2024
61831e0
feat: support new syscollector format
Rebits Jan 8, 2024
c0323df
fix: syscollector messages structure AS
Rebits Jan 9, 2024
bf0eb17
refac: GeneratorSyscollector
Rebits Jan 10, 2024
c6cf331
refac: remove debugging messages
Rebits Jan 10, 2024
081be17
style: remove extra whitespaces in syscollector module
Rebits Jan 10, 2024
06b8de3
feat: include debug option in simulate_agents
Rebits Jan 10, 2024
90d09c4
docs: include available syscollector types
Rebits Jan 10, 2024
591958f
style: fix imports in agent simulator
Rebits Jan 10, 2024
9ac2457
Merge branch '4.8.0' into enhacement/4591-vd-vuln-cases
Rebits Jan 11, 2024
d92aff2
style: sort simulate agents imports
Rebits Jan 11, 2024
a5fdbb8
style: refactor agent creation
Rebits Jan 11, 2024
52b70be
feat: improve logging and reports in VD E2E tests
Rebits Jan 12, 2024
059cf52
Merge pull request #4831 from wazuh/enhanchement/4783-syscollector-fo…
Rebits Jan 12, 2024
574ce1e
feat: include delete package operations in AG Syscollector messages
Rebits Jan 16, 2024
fb82a3b
fix: remove debug messages
Rebits Jan 16, 2024
53dc3aa
feat: include content snapshot parsing script
Rebits Jan 17, 2024
542c492
feat: increase default packages to 10
Rebits Jan 17, 2024
be408be
style: remove nonused default package list
Rebits Jan 17, 2024
b1a3c22
refac: remove intermediate var
Rebits Jan 17, 2024
c79b414
fix: unmatched package index
Rebits Jan 17, 2024
8558f93
Merge pull request #4842 from wazuh/enhanchement/4794-include-syscoll…
Rebits Jan 17, 2024
f5c96e2
fix: stabilize E2E Vulnerability tests
Rebits Jan 17, 2024
cbc4053
refactor: Removing references to the legacy vuln-det module
pereyra-m Jan 18, 2024
089b117
docs: include 4868 changelog
Rebits Jan 18, 2024
2544fbb
feat: include parameter to allow custom packages to simulate agent
Rebits Jan 18, 2024
6de68b4
fix: added a sleep in the mtime case for test_file_checker.
jotacarma90 Jan 18, 2024
940fb60
refac: remote operations in install/remote/update package functions
Rebits Jan 23, 2024
a74db5e
style: fix minor style errors in soem E2E libraries
Rebits Jan 23, 2024
e696a54
fix: macOS provisioning
Rebits Jan 23, 2024
531e1fc
style: improve typing in monitoring and configuration
Rebits Jan 23, 2024
80a0574
fix: macos provisioning restart task
Rebits Jan 23, 2024
16d485f
Merge pull request #4873 from wazuh/4839-check-mtime-false-negative
MarcelKemp Jan 24, 2024
8df2ac4
Merge pull request #4868 from wazuh/enhanchement/4781-adapt-syscollec…
davidjiglesias Jan 24, 2024
07c1a0e
Merge pull request #4872 from wazuh/enhancement/21303-vuln-det-refere…
Dwordcito Jan 30, 2024
2c7b088
style: fix pep8 indexer_api
Rebits Jan 31, 2024
1c55cfb
refac: monitoring module
Rebits Jan 31, 2024
748eb81
fix: errors in remote operations functions
Rebits Jan 31, 2024
2156714
feat: include evidence gathering logic
Rebits Jan 31, 2024
bfd14d6
fix: bug in indexer alert gathering
Rebits Jan 31, 2024
f9f9649
feat: include all cases of VD E2E
Rebits Jan 31, 2024
5b200a1
feat: include host manager utilities
Rebits Jan 31, 2024
140b9c1
feat: complete tests cases for VD
Rebits Jan 31, 2024
c31a963
refac: vd e2e tests
Rebits Jan 31, 2024
7551cc2
feat: include remove vlc software playbook
Rebits Jan 31, 2024
ebd738a
docs: improve configuraiton docstrings
Rebits Jan 31, 2024
120de9d
docs: improve logs and indexer docstrings and typing
Rebits Jan 31, 2024
bb11bb1
feat: include logging to configuration and logs modules
Rebits Jan 31, 2024
8aabf2b
refac: removing duplicate function
Rebits Jan 31, 2024
7f352af
feat: include logging to regex module
Rebits Jan 31, 2024
001e44d
docs: improve regex module docstrings
Rebits Jan 31, 2024
99cf24d
style: format manager and agent configurations
Rebits Jan 31, 2024
e0e24b7
style: remove extra whitespaces
Rebits Jan 31, 2024
c12db5a
fix: packages lists JSON format
Rebits Jan 31, 2024
de57b63
style: remove extra whitespaces
Rebits Jan 31, 2024
3c79ee5
style: remove extra white space
Rebits Jan 31, 2024
6ed6337
refac: removed unnused function
Rebits Jan 31, 2024
2a3aebb
style: fix remove_package debugging messages
Rebits Jan 31, 2024
135a120
fix: replace grafana-enterprise by grafana package name
Rebits Jan 31, 2024
b244c6a
refac: replace monitoring data function in VD waiter
Rebits Jan 31, 2024
77d7484
refac: remove unnecessary commentaries in VLC remove package playbook
Rebits Jan 31, 2024
506b2c0
refac: rename VLC removal playbook name
Rebits Jan 31, 2024
6b85c98
style: remmove unnecessary commentaries in waiters module
Rebits Jan 31, 2024
825deaf
style: improve VD E2E conftest readability
Rebits Jan 31, 2024
296dc40
style: format yaml VD cases
Rebits Jan 31, 2024
8b50ed3
style: fix pep8 wazuh api
Rebits Jan 31, 2024
b3bd818
fix: error in indexer validation values for update tasks
Rebits Jan 31, 2024
aaf636b
fix: include gathering evidences in test vd E2E
Rebits Jan 31, 2024
b36f5a8
fix: monitoring module
Rebits Feb 1, 2024
e1aa385
fix: remote operations handler module
Rebits Feb 1, 2024
4592611
feat: increase syscollector scan timeout
Rebits Feb 1, 2024
d850cc0
fix: minor errors in test VD E2E
Rebits Feb 1, 2024
fd2ac3e
fix: include setup fixture to Test VD E2E
Rebits Feb 1, 2024
25764f6
fix: remove unnecesary prints
Rebits Feb 1, 2024
33d2cfb
fix: no key vulnerabilities
Rebits Feb 1, 2024
eff5d46
fix: bad formatted Packages info
Rebits Feb 1, 2024
382f42a
fix: wrong vd case
Rebits Feb 1, 2024
2aa05a2
fix: wrong pytest version in E2E tests and Vuln JSON included in setup
Rebits Feb 2, 2024
f58c810
fix: replace hardcoded 5 by scan interval
Rebits Feb 2, 2024
92d3c84
style: replace loggers level and migrate waiter
Rebits Feb 2, 2024
23f4531
fix: remove unnused host and update module docstring
Rebits Feb 2, 2024
cb04d16
refac: move wait_syscollector_and_vuln_scan to waiters
Rebits Feb 2, 2024
745718f
refac: move timeouts to VD module
Rebits Feb 2, 2024
40c7c56
style: pep8 to system module
Rebits Feb 2, 2024
a6a5a50
fix: hardcoded host to remove vlc playbook
Rebits Feb 2, 2024
e2b6f32
style: macos tasks name consistency
Rebits Feb 2, 2024
262994a
fix: duplicated agent/manager configuration
Rebits Feb 2, 2024
156d4a7
refac: remove unnused teardown
Rebits Feb 2, 2024
1c25b5c
fix: style errors and remove logs fixture
Rebits Feb 2, 2024
59fc28e
docs: remove outdated commentary
Rebits Feb 2, 2024
e7203df
style: fix capitalization of logging messages
Rebits Feb 2, 2024
0f983ae
fix: remove critical logging from monitoring
Rebits Feb 2, 2024
dd9a70a
fix: report generation E2E VD
Rebits Feb 2, 2024
f6f9b13
fix: setup stages for only one OS
Rebits Feb 2, 2024
1313024
fix: node vuln package in windows structure
Rebits Feb 2, 2024
34d967a
fix: update nonvuln package case
Rebits Feb 2, 2024
a0e7df6
Merge branch '4.8.0' into enhacement/4591-vd-vuln-cases
Rebits Feb 2, 2024
d8b9943
Merge pull request #4878 from wazuh/enhacement/4591-vd-vuln-cases
davidjiglesias Feb 2, 2024
ea56468
docs: update changelog
juliamagan Feb 5, 2024
076ab83
Merge pull request #4912 from wazuh/enhancement/4991-update-changelog
juliamagan Feb 5, 2024
f6c7b8c
refactor: bump revision
juliamagan Feb 5, 2024
f9fc25d
Merge pull request #4913 from wazuh/enhancement/4991-bump-revision
juliamagan Feb 5, 2024
e6632c9
Fix service tests to handle Python version-dependent issues by optimi…
Rebits Feb 5, 2024
7f4bddc
Add Ansible for Windows at requirements.txt
jnasselle Feb 5, 2024
b48fc7d
refac: move HostMonitor to a new module
Rebits Feb 6, 2024
7597036
docs: include 4917 to the current changelog
Rebits Feb 6, 2024
40a4658
docs: split 4917 and 4916 changelog lines
Rebits Feb 6, 2024
00515b2
Merge pull request #4917 from wazuh/fix/wj6238-add-ansible-for-win-at…
juliamagan Feb 6, 2024
df5de71
Merge branch '4.8.0' of github.com:wazuh/wazuh-qa into merge-4.8.0-in…
juliamagan Feb 7, 2024
f4da118
Merge pull request #4921 from wazuh/merge-4.8.0-into-4.8.1
juliamagan Feb 7, 2024
3435279
docs: update changelog
juliamagan Feb 7, 2024
8c1239a
Merge pull request #4922 from wazuh/enhancement/4920-update-changelog
juliamagan Feb 7, 2024
67bdfe4
Merge branch '4.8.1' of github.com:wazuh/wazuh-qa into merge-4.8.1-in…
juliamagan Feb 7, 2024
08be888
Merge pull request #4923 from wazuh/merge-4.8.1-into-4.8.2
juliamagan Feb 7, 2024
39de97d
Merge branch '4.8.2' of github.com:wazuh/wazuh-qa into merge-4.8.2-in…
juliamagan Feb 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,16 @@ 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 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 Down Expand Up @@ -60,12 +66,15 @@ All notable changes to this project will be documented in this file.

### Fixed

- 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)

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

### Fixed

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