-
Notifications
You must be signed in to change notification settings - Fork 32
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
CVEs alerts inventory for Vulnerability Detector - VDT and WDB Integration Tests implementation #1243
Conversation
Jenkins execution |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is needed to change the quotes in the yaml and the test following the next format:
x = f"{var}string"
x = 'raw string'
x = "this is my raw 'string' with single quotation marks"
Some of them were requested, but there are more.
After talking with @snaow we have considered that new development or changes into existing tests should follow new repository standards about Wazuh daemons. For now, it is required to use fixtures to start only required daemons, and turn them off when the test is over. That means, that the default status of Wazuh would be off and each test should be responsible for daemons handling. The reasons for this change are: Faster testing Also, we need to implement the common fixtures for auto-configure local internal options and file monitoring. |
ab1a940
to
62f66b3
Compare
ValidationAfter implementing the changes, the proper tests were run.
|
46c2a25
to
e093ae5
Compare
ValidationWe run three times the Vulnerability Detector tests in tier 0.
We run three times the Vulnerability Detector tests in tier 1.
Notes:
ossec_database_locked_test_general_settings_min_full_scan_interval_120m.py.zip
|
ValidationThe Wazuh-DB tests were run three times
|
ValidationSuccessful execution of the tests in Jenkins (contains skipped tests) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will need to improve these tests in the future moving the callbacks to common libraries, using common fixtures, and fixing the style of strings or imports. However, it is important to fix test_wazuh_db.py
.
the different feeds (Redhat, Canonical, Debian, Amazon Linux and NVD), import them, and check if the confirmation message appears | ||
in the logs. | ||
- **[test_download_feeds](test_feeds/test_download_feed.md)**: The tests download | ||
the different feeds (Redhat, Canonical, Debian, and NVD), import them, and check if the confirmation message appears |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazon Linux was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in commit 0ba0725
mkdocs.yml
Outdated
- Test baseline scan type: tests/integration/test_vulnerability_detector/test_scan_types/test_baseline_scan_type.md | ||
- Test partial scan type: tests/integration/test_vulnerability_detector/test_scan_types/test_partial_scan_type.md |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to add Test full scan type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in commit 0ba0725
If we stop wazuh-db, we can't connect to the socket
15/11/2021We have removed the skip from the next tests to execute them locally, but they will be merged skipped:
Package
Testingtests/integration/test_vulnerability_detector --tier 0
tests/integration/test_vulnerability_detector --tier 1
tests/integration/test_wazuh_db
|
50aae5a
to
5cf18aa
Compare
8f5fbbe
to
5cf18aa
Compare
Description
This pull request includes all the necessary test cases to cover the new Wazuh DB commands and Vulnerability Detector alerting mechanisms created as part of the epic wazuh/wazuh#7749. For details, check the description of the issue #1242 and #1261.
Vulnerability Detector:
Wazuh DB:
Dod
test_scan_types
test_general_settings
test_scan_results
test_windows
tests_wazuh_db
Tests
pycodestyle --max-line-length=120 --show-source --show-pep8 file.py
.