-
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
Tests to check cpe_helper.json file #3731
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rebits
requested changes
Jan 9, 2023
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.
GJ. Some changes are required
deps/wazuh_testing/wazuh_testing/modules/vulnerability_detector/event_monitor.py
Outdated
Show resolved
Hide resolved
deps/wazuh_testing/wazuh_testing/modules/vulnerability_detector/event_monitor.py
Outdated
Show resolved
Hide resolved
deps/wazuh_testing/wazuh_testing/modules/vulnerability_detector/event_monitor.py
Outdated
Show resolved
Hide resolved
deps/wazuh_testing/wazuh_testing/modules/vulnerability_detector/event_monitor.py
Outdated
Show resolved
Hide resolved
...r/test_cpe_helper/data/configuration_template/configuration_cpe_indexing_missing_fields.yaml
Outdated
Show resolved
Hide resolved
...ector/test_cpe_helper/data/configuration_template/configuration_cpe_indexing_wrong_tags.yaml
Outdated
Show resolved
Hide resolved
...tor/test_cpe_helper/data/configuration_template/configuration_cpe_indexing_wrong_values.yaml
Outdated
Show resolved
Hide resolved
...r/test_cpe_helper/data/configuration_template/configuration_cpe_indexing_missing_fields.yaml
Outdated
Show resolved
Hide resolved
tests/integration/test_vulnerability_detector/test_cpe_helper/test_cpe_helper_missing_fields.py
Outdated
Show resolved
Hide resolved
tests/integration/test_vulnerability_detector/test_cpe_helper/test_cpe_helper_fields.py
Outdated
Show resolved
Hide resolved
jmv74211
suggested changes
Jan 25, 2023
...integration/test_vulnerability_detector/data/feeds/cpe_helper/custom_generic_cpe_helper.json
Outdated
Show resolved
Hide resolved
tests/integration/test_vulnerability_detector/test_cpe_helper/test_cpe_helper.py
Outdated
Show resolved
Hide resolved
tests/integration/test_vulnerability_detector/test_cpe_helper/test_cpe_helper.py
Outdated
Show resolved
Hide resolved
tests/integration/test_vulnerability_detector/test_cpe_helper/test_cpe_helper.py
Outdated
Show resolved
Hide resolved
fedepacher
force-pushed
the
796-test-cpe-helper
branch
from
January 25, 2023 12:15
7f6e187
to
51f16fd
Compare
jmv74211
approved these changes
Jan 25, 2023
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.
test_vulnerability_detector/test_cpe_helper/test_cpe_helper.py::test_cpe_indexing_wrong_tags[Indexing CPE helper with wrong source vendor fields] PASSED [ 5%]
test_vulnerability_detector/test_cpe_helper/test_cpe_helper.py::test_cpe_indexing_wrong_tags[Indexing CPE helper with wrong translation product fields] PASSED [ 10%]
test_vulnerability_detector/test_cpe_helper/test_cpe_helper.py::test_cpe_indexing_wrong_tags[Indexing CPE helper with wrong version field] PASSED [ 15%]
test_vulnerability_detector/test_cpe_helper/test_cpe_helper.py::test_cpe_indexing_wrong_tags[Indexing CPE helper with wrong format_version fields] PASSED [ 20%]
test_vulnerability_detector/test_cpe_helper/test_cpe_helper.py::test_cpe_indexing_wrong_tags[Indexing CPE helper with wrong update_date fields] PASSED [ 25%]
test_vulnerability_detector/test_cpe_helper/test_cpe_helper.py::test_cpe_indexing_wrong_tags[Indexing CPE helper with wrong target field] PASSED [ 30%]
test_vulnerability_detector/test_cpe_helper/test_cpe_helper.py::test_cpe_indexing_wrong_values[Indexing CPE helper with wrong version value] PASSED [ 35%]
test_vulnerability_detector/test_cpe_helper/test_cpe_helper.py::test_cpe_indexing_wrong_values[Indexing CPE helper with wrong update_date value] PASSED [ 40%]
test_vulnerability_detector/test_cpe_helper/test_cpe_helper.py::test_cpe_indexing_wrong_values[Indexing CPE helper with wrong target value] PASSED [ 45%]
test_vulnerability_detector/test_cpe_helper/test_cpe_helper.py::test_cpe_indexing_wrong_values[Indexing CPE helper with wrong format_version value] PASSED [ 50%]
test_vulnerability_detector/test_cpe_helper/test_cpe_helper.py::test_cpe_indexing_wrong_values[Indexing CPE helper with wrong source vendor value] PASSED [ 55%]
test_vulnerability_detector/test_cpe_helper/test_cpe_helper.py::test_cpe_indexing_wrong_values[Indexing CPE helper with wrong source product value] PASSED [ 60%]
test_vulnerability_detector/test_cpe_helper/test_cpe_helper.py::test_cpe_indexing_wrong_values[Indexing CPE helper with wrong action value] PASSED [ 65%]
test_vulnerability_detector/test_cpe_helper/test_cpe_helper.py::test_cpe_indexing_missing_field[Indexing CPE helper with missing version field] PASSED [ 70%]
test_vulnerability_detector/test_cpe_helper/test_cpe_helper.py::test_cpe_indexing_missing_field[Indexing CPE helper with missing format_version field] PASSED [ 75%]
test_vulnerability_detector/test_cpe_helper/test_cpe_helper.py::test_cpe_indexing_missing_field[Indexing CPE helper with missing update_date field] PASSED [ 80%]
test_vulnerability_detector/test_cpe_helper/test_cpe_helper.py::test_cpe_indexing_missing_field[Indexing CPE helper with missing target field] PASSED [ 85%]
test_vulnerability_detector/test_cpe_helper/test_cpe_helper.py::test_cpe_indexing_missing_field[Indexing CPE helper with missing action field] PASSED [ 90%]
test_vulnerability_detector/test_cpe_helper/test_cpe_helper.py::test_cpe_indexing_missing_field[Indexing CPE helper with missing vendor field] PASSED [ 95%]
test_vulnerability_detector/test_cpe_helper/test_cpe_helper.py::test_cpe_indexing_missing_field[Indexing CPE helper with missing product field] PASSED [100%]
========================================================================================= 20 passed in 727.09s (0:12:07
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR aims to add tests to check if
cpe_helper.json
dictionary works correctly with the different options.The tests that have been added test wrong tags and values in the
cpe_helper.json
file. The respective test that check for right tags and values istest_cpe_indexing.py
that already exist in the repository under thetest_vulnerability_detector/test_feed
folder.Added
Testing performed