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

CVEs alerts inventory for Vulnerability Detector - Vulnerability Detector Integration Tests implementation #1496

Merged
merged 92 commits into from
Nov 9, 2021

Conversation

MiguelazoDS
Copy link
Member

@MiguelazoDS MiguelazoDS commented Jun 24, 2021

Related issue
#1261

Description

This pull request implements the following set of test cases for Vulnerability Detector:

  • test_scan_results: Includes tests that check vulnerabilities insertion and removal in:
    • Log file
    • Alerts file
    • Vulnerabilities inventory database.
  • test_scan_types: Includes tests for Baseline, Partial and Full scans
  • test_general_settings: Includes new settings min_full_scan_interval and retry_interval

These tests cover the new vulnerability detector functionalities as part of the epic #7749.
For more details, check the description of the epic #1261

Dod

test_scan_types

types

test_general_settings

general_settings

test_scan_results

scan_results

test_windows

image

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.

from wazuh_testing.tools import file
from wazuh_testing.tools import agent_simulator as ag
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Due to new repository standards, the simulators tools (Authd, Remoted and Agent Simulators) will be deprecated. For this reason, every PRs that changed any test that uses then should be reconsidered as follows:

Perform this check without using any simulator.
If it is impossible for an integration test to check this case, a system test should be created. This will be noted as future work in a common issue for each module.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

deps/wazuh_testing/wazuh_testing/vulnerability_detector.py Outdated Show resolved Hide resolved
deps/wazuh_testing/wazuh_testing/wazuh_db.py Outdated Show resolved Hide resolved
@DProvinciani DProvinciani force-pushed the 1261-cve-alerts-inventory branch from a3dad16 to b625606 Compare October 25, 2021 21:10
@DProvinciani DProvinciani force-pushed the 1261-cve-alerts-inventory branch 2 times, most recently from ded1663 to 347b485 Compare November 9, 2021 14:50
@DProvinciani DProvinciani force-pushed the 1261-cve-alerts-inventory branch from 1c09205 to 88587c9 Compare November 9, 2021 17:58
@DProvinciani DProvinciani changed the base branch from master to dev-cves-alerts-inventory November 9, 2021 18:02
DProvinciani and others added 2 commits November 9, 2021 16:21
Co-authored-by: Julia Magán <80041853+juliamagan@users.noreply.github.com>
Co-authored-by: Julia Magán <80041853+juliamagan@users.noreply.github.com>
Copy link
Contributor

@DProvinciani DProvinciani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CVEs alerts inventory for Vulnerability Detector - Vulnerability Detector Integration Tests
7 participants