-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merge(#1915): '4.5' into 'dev branch'
- Loading branch information
Showing
12 changed files
with
608 additions
and
38 deletions.
There are no files selected for viewing
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
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
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
38 changes: 38 additions & 0 deletions
38
...t_vulnerability_detector/data/feeds/cpe_helper/custom_generic_cpe_helper_one_package.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"VERSION_TAG": "VERSION_VALUE", | ||
"FORMAT_TAG": "FORMAT_VALUE", | ||
"UPDATE_TAG": "UPDATE_VALUE", | ||
"DICTIONARY_TAG": [ | ||
{ | ||
"TARGET_TAG": "TARGET_VALUE", | ||
"SOURCE_TAG": { | ||
"VENDOR_S_TAG": [ | ||
"VENDOR_S_VALUE" | ||
], | ||
"PRODUCT_S_TAG": [ | ||
"PRODUCT_S_VALUE_0" | ||
], | ||
"VERSION_S_TAG": ["VERSION_S_VALUE"] | ||
}, | ||
"TRANSLATION_TAG": { | ||
"VENDOR_T_TAG": [ | ||
"VENDOR_T_VALUE" | ||
], | ||
"PRODUCT_T_TAG": [ | ||
"PRODUCT_T_VALUE_0" | ||
], | ||
"VERSION_T_TAG": ["VERSION_T_VALUE"] | ||
}, | ||
"ACTION_TAG": [ | ||
"ACTION_VALUE_0", | ||
"ACTION_VALUE_1" | ||
] | ||
} | ||
], | ||
"LICENSE_TAG": { | ||
"TITLE_TAG": "TITLE_VALUE", | ||
"COPYRIGHT_TAG": "COPYRIGHT_VALUE", | ||
"DATE_TAG": "DATE_VALUE", | ||
"TYPE_TAG" : "TYPE_VALUE" | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
...t_vulnerability_detector/data/vulnerable_packages/custom_vulnerable_pkg_empty_vendor.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[ | ||
{ | ||
"scan": { | ||
"id": 0, | ||
"time": "2021-11-20T12:41:27Z" | ||
}, | ||
"architecture": "x86_64", | ||
"format": "win", | ||
"name": "custom-package-0 1.0.0", | ||
"size": 0, | ||
"vendor": "NULL", | ||
"cveid": "CVE-000" | ||
} | ||
] |
15 changes: 15 additions & 0 deletions
15
...ability_detector/data/vulnerable_packages/custom_vulnerable_pkg_empty_vendor_version.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[ | ||
{ | ||
"scan": { | ||
"id": 0, | ||
"time": "2021-11-20T12:41:27Z" | ||
}, | ||
"architecture": "x86_64", | ||
"format": "win", | ||
"name": "custom-package-0 1.0.0", | ||
"size": 0, | ||
"vendor": "NULL", | ||
"cveid": "CVE-000", | ||
"version": "NULL" | ||
} | ||
] |
229 changes: 229 additions & 0 deletions
229
...lnerability_detector/test_cpe_helper/data/test_cases/cases_cpe_indexing_empty_fields.yaml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,229 @@ | ||
- name: Missing vendor field | ||
description: Indexing CPE helper with missing vendor field | ||
configuration_parameters: | ||
NVD_JSON_PATH: CUSTOM_NVD_JSON_PATH | ||
metadata: | ||
system: WINDOWS_10 | ||
wrong_field: null | ||
missing_field: [] | ||
tags: | ||
VERSION_TAG: version | ||
FORMAT_TAG: format_version | ||
UPDATE_TAG: update_date | ||
DICTIONARY_TAG: dictionary | ||
TARGET_TAG: target | ||
SOURCE_TAG: source | ||
VENDOR_S_TAG: vendor | ||
PRODUCT_S_TAG: product | ||
VERSION_S_TAG: version | ||
TRANSLATION_TAG: translation | ||
VENDOR_T_TAG: vendor | ||
PRODUCT_T_TAG: product | ||
VERSION_T_TAG: version | ||
ACTION_TAG: action | ||
LICENSE_TAG: license | ||
TITLE_TAG: title | ||
COPYRIGHT_TAG: copyright | ||
DATE_TAG: date | ||
TYPE_TAG: type | ||
values: | ||
VERSION_VALUE: "1.0" | ||
FORMAT_VALUE: "1.0" | ||
UPDATE_VALUE: 2050-10-02T10:56Z | ||
TARGET_VALUE: windows | ||
VENDOR_S_VALUE: "" | ||
PRODUCT_S_VALUE_0: ^custom-package-0.* | ||
VERSION_S_VALUE: ^custom-package-0 ([0-9]+\\.*[0-9]*\\.*[0-9]*-*[0-9]*) | ||
VENDOR_T_VALUE: wazuh-mocking | ||
PRODUCT_T_VALUE_0: custom-package-0 | ||
VERSION_T_VALUE: "" | ||
ACTION_VALUE_0: replace_product | ||
ACTION_VALUE_1: set_version_if_product_matches | ||
TITLE_VALUE: Dictionary of CPEs to analyze system vulnerabilities. | ||
COPYRIGHT_VALUE: Copyright (C) 2015-2019, Wazuh Inc. | ||
DATE_VALUE: March 6, 2019. | ||
TYPE_VALUE: GPLv2 | ||
|
||
- name: Missing vendor and version fields | ||
description: Indexing CPE helper with missing vendor and version fields | ||
configuration_parameters: | ||
NVD_JSON_PATH: CUSTOM_NVD_JSON_PATH | ||
metadata: | ||
system: WINDOWS_10 | ||
wrong_field: null | ||
missing_field: [] | ||
tags: | ||
VERSION_TAG: version | ||
FORMAT_TAG: format_version | ||
UPDATE_TAG: update_date | ||
DICTIONARY_TAG: dictionary | ||
TARGET_TAG: target | ||
SOURCE_TAG: source | ||
VENDOR_S_TAG: vendor | ||
PRODUCT_S_TAG: product | ||
VERSION_S_TAG: version | ||
TRANSLATION_TAG: translation | ||
VENDOR_T_TAG: vendor | ||
PRODUCT_T_TAG: product | ||
VERSION_T_TAG: version | ||
ACTION_TAG: action | ||
LICENSE_TAG: license | ||
TITLE_TAG: title | ||
COPYRIGHT_TAG: copyright | ||
DATE_TAG: date | ||
TYPE_TAG: type | ||
values: | ||
VERSION_VALUE: "1.0" | ||
FORMAT_VALUE: "1.0" | ||
UPDATE_VALUE: 2050-10-02T10:56Z | ||
TARGET_VALUE: windows | ||
VENDOR_S_VALUE: "" | ||
PRODUCT_S_VALUE_0: ^custom-package-0.* | ||
VERSION_S_VALUE: "" | ||
VENDOR_T_VALUE: wazuh-mocking | ||
PRODUCT_T_VALUE_0: custom-package-0 | ||
VERSION_T_VALUE: ^custom-package-0 ([0-9]+\\.*[0-9]*\\.*[0-9]*-*[0-9]*) | ||
ACTION_VALUE_0: replace_product | ||
ACTION_VALUE_1: set_version_if_product_matches | ||
TITLE_VALUE: Dictionary of CPEs to analyze system vulnerabilities. | ||
COPYRIGHT_VALUE: Copyright (C) 2015-2019, Wazuh Inc. | ||
DATE_VALUE: March 6, 2019. | ||
TYPE_VALUE: GPLv2 | ||
|
||
- name: Missing set_version_if_product_matches action field | ||
description: Indexing CPE helper with missing set_version_if_product_matches action field | ||
configuration_parameters: | ||
NVD_JSON_PATH: CUSTOM_NVD_JSON_PATH | ||
metadata: | ||
system: WINDOWS_10 | ||
wrong_field: null | ||
missing_field: [] | ||
tags: | ||
VERSION_TAG: version | ||
FORMAT_TAG: format_version | ||
UPDATE_TAG: update_date | ||
DICTIONARY_TAG: dictionary | ||
TARGET_TAG: target | ||
SOURCE_TAG: source | ||
VENDOR_S_TAG: vendor | ||
PRODUCT_S_TAG: product | ||
VERSION_S_TAG: version | ||
TRANSLATION_TAG: translation | ||
VENDOR_T_TAG: vendor | ||
PRODUCT_T_TAG: product | ||
VERSION_T_TAG: version | ||
ACTION_TAG: action | ||
LICENSE_TAG: license | ||
TITLE_TAG: title | ||
COPYRIGHT_TAG: copyright | ||
DATE_TAG: date | ||
TYPE_TAG: type | ||
values: | ||
VERSION_VALUE: "1.0" | ||
FORMAT_VALUE: "1.0" | ||
UPDATE_VALUE: 2050-10-02T10:56Z | ||
TARGET_VALUE: windows | ||
VENDOR_S_VALUE: "" | ||
PRODUCT_S_VALUE_0: ^custom-package-0.* | ||
VERSION_S_VALUE: "" | ||
VENDOR_T_VALUE: wazuh-mocking | ||
PRODUCT_T_VALUE_0: custom-package-0 | ||
VERSION_T_VALUE: ^custom-package-0 ([0-9]+\\.*[0-9]*\\.*[0-9]*-*[0-9]*) | ||
ACTION_VALUE_0: replace_product | ||
ACTION_VALUE_1: "" | ||
TITLE_VALUE: Dictionary of CPEs to analyze system vulnerabilities. | ||
COPYRIGHT_VALUE: Copyright (C) 2015-2019, Wazuh Inc. | ||
DATE_VALUE: March 6, 2019. | ||
TYPE_VALUE: GPLv2 | ||
|
||
- name: Replace_vendor instead of set_version_if_product_matches action fields | ||
description: Indexing CPE helper with replace_vendor instead of set_version_if_product_matches action fields | ||
configuration_parameters: | ||
NVD_JSON_PATH: CUSTOM_NVD_JSON_PATH | ||
metadata: | ||
system: WINDOWS_10 | ||
wrong_field: null | ||
missing_field: [] | ||
tags: | ||
VERSION_TAG: version | ||
FORMAT_TAG: format_version | ||
UPDATE_TAG: update_date | ||
DICTIONARY_TAG: dictionary | ||
TARGET_TAG: target | ||
SOURCE_TAG: source | ||
VENDOR_S_TAG: vendor | ||
PRODUCT_S_TAG: product | ||
VERSION_S_TAG: version | ||
TRANSLATION_TAG: translation | ||
VENDOR_T_TAG: vendor | ||
PRODUCT_T_TAG: product | ||
VERSION_T_TAG: version | ||
ACTION_TAG: action | ||
LICENSE_TAG: license | ||
TITLE_TAG: title | ||
COPYRIGHT_TAG: copyright | ||
DATE_TAG: date | ||
TYPE_TAG: type | ||
values: | ||
VERSION_VALUE: "1.0" | ||
FORMAT_VALUE: "1.0" | ||
UPDATE_VALUE: 2050-10-02T10:56Z | ||
TARGET_VALUE: windows | ||
VENDOR_S_VALUE: "" | ||
PRODUCT_S_VALUE_0: ^custom-package-0.* | ||
VERSION_S_VALUE: "" | ||
VENDOR_T_VALUE: wazuh-mocking | ||
PRODUCT_T_VALUE_0: custom-package-0 | ||
VERSION_T_VALUE: ^custom-package-0 ([0-9]+\\.*[0-9]*\\.*[0-9]*-*[0-9]*) | ||
ACTION_VALUE_0: replace_product | ||
ACTION_VALUE_1: replace_vendor | ||
TITLE_VALUE: Dictionary of CPEs to analyze system vulnerabilities. | ||
COPYRIGHT_VALUE: Copyright (C) 2015-2019, Wazuh Inc. | ||
DATE_VALUE: March 6, 2019. | ||
TYPE_VALUE: GPLv2 | ||
|
||
- name: Missing all source fields | ||
description: Indexing CPE helper with missing all source fields | ||
configuration_parameters: | ||
NVD_JSON_PATH: CUSTOM_NVD_JSON_PATH | ||
metadata: | ||
system: WINDOWS_10 | ||
wrong_field: null | ||
missing_field: [] | ||
tags: | ||
VERSION_TAG: version | ||
FORMAT_TAG: format_version | ||
UPDATE_TAG: update_date | ||
DICTIONARY_TAG: dictionary | ||
TARGET_TAG: target | ||
SOURCE_TAG: source | ||
VENDOR_S_TAG: vendor | ||
PRODUCT_S_TAG: product | ||
VERSION_S_TAG: version | ||
TRANSLATION_TAG: translation | ||
VENDOR_T_TAG: vendor | ||
PRODUCT_T_TAG: product | ||
VERSION_T_TAG: version | ||
ACTION_TAG: action | ||
LICENSE_TAG: license | ||
TITLE_TAG: title | ||
COPYRIGHT_TAG: copyright | ||
DATE_TAG: date | ||
TYPE_TAG: type | ||
values: | ||
VERSION_VALUE: "1.0" | ||
FORMAT_VALUE: "1.0" | ||
UPDATE_VALUE: 2050-10-02T10:56Z | ||
TARGET_VALUE: windows | ||
VENDOR_S_VALUE: "" | ||
PRODUCT_S_VALUE_0: "" | ||
VERSION_S_VALUE: "" | ||
VENDOR_T_VALUE: wazuh-mocking | ||
PRODUCT_T_VALUE_0: custom-package-0 | ||
VERSION_T_VALUE: ^custom-package-0 ([0-9]+\\.*[0-9]*\\.*[0-9]*-*[0-9]*) | ||
ACTION_VALUE_0: replace_product | ||
ACTION_VALUE_1: replace_vendor | ||
TITLE_VALUE: Dictionary of CPEs to analyze system vulnerabilities. | ||
COPYRIGHT_VALUE: Copyright (C) 2015-2019, Wazuh Inc. | ||
DATE_VALUE: March 6, 2019. | ||
TYPE_VALUE: GPLv2 |
45 changes: 45 additions & 0 deletions
45
...ity_detector/test_cpe_helper/data/test_cases/cases_cpe_indexing_empty_vendor_version.yaml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
- name: Missing all the source fields and version translation field | ||
description: Indexing CPE helper with missing all the source fields and version translation field | ||
configuration_parameters: | ||
NVD_JSON_PATH: CUSTOM_NVD_JSON_PATH | ||
metadata: | ||
system: WINDOWS_10 | ||
wrong_field: null | ||
missing_field: [] | ||
tags: | ||
VERSION_TAG: version | ||
FORMAT_TAG: format_version | ||
UPDATE_TAG: update_date | ||
DICTIONARY_TAG: dictionary | ||
TARGET_TAG: target | ||
SOURCE_TAG: source | ||
VENDOR_S_TAG: vendor | ||
PRODUCT_S_TAG: product | ||
VERSION_S_TAG: version | ||
TRANSLATION_TAG: translation | ||
VENDOR_T_TAG: vendor | ||
PRODUCT_T_TAG: product | ||
VERSION_T_TAG: version | ||
ACTION_TAG: action | ||
LICENSE_TAG: license | ||
TITLE_TAG: title | ||
COPYRIGHT_TAG: copyright | ||
DATE_TAG: date | ||
TYPE_TAG: type | ||
values: | ||
VERSION_VALUE: "1.0" | ||
FORMAT_VALUE: "1.0" | ||
UPDATE_VALUE: 2050-10-02T10:56Z | ||
TARGET_VALUE: windows | ||
VENDOR_S_VALUE: "" | ||
PRODUCT_S_VALUE_0: "" | ||
VERSION_S_VALUE: "" | ||
VENDOR_T_VALUE: wazuh-mocking | ||
PRODUCT_T_VALUE_0: custom-package-0 | ||
VERSION_T_VALUE: "" | ||
ACTION_VALUE_0: replace_product | ||
ACTION_VALUE_1: replace_vendor | ||
TITLE_VALUE: Dictionary of CPEs to analyze system vulnerabilities. | ||
COPYRIGHT_VALUE: Copyright (C) 2015-2019, Wazuh Inc. | ||
DATE_VALUE: March 6, 2019. | ||
TYPE_VALUE: GPLv2 |
Oops, something went wrong.