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

Add support for Amazon Linux in vulnerability detector #1473

Merged
merged 69 commits into from
Nov 2, 2021

Conversation

juliamagan
Copy link
Member

@juliamagan juliamagan commented Jun 18, 2021

Related issue
Closes #1248

Description

This PR adds vulnerability detector tests for Amazon Linux 1 and 2.

Test results

Linux manager (Jenkins, CentOS 7), Wazuh version 4.3.0-0.commitb3643d0

test_windows (build)

======================== 28 passed in 260.72s (0:04:20) ========================

test_scan_results (build)

======================== 62 passed in 981.00s (0:16:21) ========================

test_providers (build)

======================= 92 passed in 1855.92s (0:30:55) ========================

test_general_settings (build)

================== 19 passed, 2 skipped in 180.02s (0:03:00) ===================

test_feeds (build)

================ 2312 passed, 47 xfailed in 23185.17s (6:26:25) ================

Tests

  • Proven that tests pass when they have to pass.
  • Proven that tests fail when they have to fail.
  • Python codebase satisfies PEP-8 style style guide. pycodestyle --max-line-length=120 --show-source --show-pep8 file.py.
  • Python codebase is documented following the Google Style for Python docstrings.
  • The test is documented in wazuh-qa/docs.
  • provision_documentation.sh generate the docs without errors.

@juliamagan juliamagan self-assigned this Jun 18, 2021
@mdengra mdengra requested review from damarisg and removed request for spothound and mdengra June 23, 2021 14:59
@mdengra mdengra changed the title 1248 amazon linux vuln Add support for Amazon Linux in vulnerability detector Jun 23, 2021
@juliamagan
Copy link
Member Author

juliamagan commented Sep 22, 2021

Before proceeding with the following changes, we have verified that test_vulnerability_detector/test_feeds/alas works correctly.

R1 R2 R3
Centos 8 Manager 🟢 🟢 🟢

of test execution.

This fixture is needed because when `test_feeds/alas` are finished,
Wazuh is stopped, but the following tests, need Wazuh to be started.
@juliamagan
Copy link
Member Author

juliamagan commented Sep 24, 2021

We had to add a conftest.py file in test_feeds/alas that should be deleted in the future, when refactor of Vulnerability Detector is done.

Tests results

We are going to test Vulnerability Detector, in order to check we keep the full green. We have created the branch temp-testing-vd in which the changes of the branch 1733-full-green-vuln-det have been merged.

R1 R2 R3
Centos 8 Manager 🟢 🔴 🔴

Just one test case failed, we need to check if the environment needs to be cleaned or if it could be another error.

@juliamagan
Copy link
Member Author

We solved the problem with the RedHat test by using temporal files. However, when we launched every test in vulnerability detector, it failed again and new failures appeared.

Report

@Rebits
Copy link
Member

Rebits commented Oct 19, 2021

27/10/2021

Package

Version Revision Link
4.3.0 40301 https://packages-dev.wazuh.com/warehouse/test/4.3/rpm/var/wazuh-manager-4.3.0-qa.vr.1473.x86_64.rpm

Testing

tests/integration/test_vulnerability_detector -k alas

OS Local Jenkins Notes
PS1 🔵 🔴
PS2 🔵 🔴
PS3 🔵 🔴

  • 🟢: All pass
  • 🟡: Some warnings
  • 🔴: Some errors/fails
  • 🔵: In progress

@Rebits
Copy link
Member

Rebits commented Oct 27, 2021

27/10/2021

It seems that test_cpe_indexing is consistently failing when all the VD suite is launched. This is maybe produced by the mock_agent fixture. In order to avoid possible errors motivated by an unclean environment, this fixture is going to be replaced for this test for a new one with module scope 4a3cdb0.

28/10/2021

It seems that this new fixture does not solve this issue, talking with @damarisg, it seems that this test was configured to skip in 4.2 version, but in master after 4.2 merges, it seems it is active.
The reason because this test is skipped in 4.2 is the blocked database error (#1565 (comment)). However, it seems that errors obtained in Jenkins build seem not to be related to this issue. Further research is needed, and a clean fixture has been added in order to ensure the environment is correctly set at test run time .

New builds:

@juliamagan
Copy link
Member Author

juliamagan commented Oct 29, 2021

29/10/2021

Package

Version Revision Link
4.3.0 40301 https://packages-dev.wazuh.com/warehouse/test/4.3/rpm/var/wazuh-manager-4.3.0-qa.vr.1473.x86_64.rpm

Testing

tests/integration/test_vulnerability_detector

OS Local Jenkins Notes
PS1 🔴 🟡
PS2 🔴 🟡
PS3 🔴 🟡

tests/integration/test_vulnerability_detector -k alas

OS Local Jenkins Notes
PS1 🟡 🟡
PS2 🟢 🟡
PS3 🟢 🟡

  • 🟢: All pass
  • 🟡: Some warnings
  • 🔴: Some errors/fails
  • 🔵: In progress

@snaow snaow merged commit 3c363e8 into master Nov 2, 2021
@snaow snaow deleted the 1248-amazon-linux-vuln branch November 2, 2021 15:16
@snaow snaow mentioned this pull request Jan 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integration tests for Vulnerability Detector: Amazon Linux support
7 participants