arango-cve-processor 1.4.14__tar.gz → 1.4.15__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/PKG-INFO +2 -2
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/arango_cve_processor/managers/cpe_match.py +14 -5
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/pyproject.toml +1 -1
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/requirements.txt +1 -1
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/tests/unit/managers/test_cpematch.py +73 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/.env.example +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/.env.markdown +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/.github/workflows/create-release.yml +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/.github/workflows/run-tests.yml +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/.gitignore +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/LICENSE +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/README.md +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/arango_cve_processor/__init__.py +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/arango_cve_processor/__main__.py +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/arango_cve_processor/config.py +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/arango_cve_processor/managers/__init__.py +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/arango_cve_processor/managers/base_manager.py +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/arango_cve_processor/managers/cve_attack.py +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/arango_cve_processor/managers/cve_capec.py +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/arango_cve_processor/managers/cve_cwe.py +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/arango_cve_processor/managers/cve_kev.py +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/arango_cve_processor/managers/cve_kev_vulncheck.py +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/arango_cve_processor/tools/__init__.py +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/arango_cve_processor/tools/cpe.py +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/arango_cve_processor/tools/cpe_db.py +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/arango_cve_processor/tools/nvd.py +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/arango_cve_processor/tools/retriever.py +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/arango_cve_processor/tools/utils.py +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/arango_cve_processor.py +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/docs/README.md +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/docs/arango_cve_processor-structure.jpg +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/docs/arango_cve_processor.png +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/docs/cpematch.md +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/docs/cve-attack.md +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/docs/cve-capec.md +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/docs/cve-cwe.md +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/docs/cve-epss.md +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/docs/cve-kev.md +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/docs/cve-vulncheck-kev.md +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/docs/vulmatch.png +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/tests/NOTES.md +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/tests/README.md +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/tests/__init__.py +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/tests/files/attack-enterprise-objects.json +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/tests/files/base_cves.json +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/tests/files/base_cves_update_1.json +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/tests/files/base_cves_update_2.json +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/tests/files/capec-objects.json +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/tests/files/cves.json +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/tests/files/cwe-objects.json +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/tests/requirements.txt +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/tests/tests.env +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/tests/unit/cli/test_main.py +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/tests/unit/conftest.py +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/tests/unit/managers/test_base.py +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/tests/unit/managers/test_cve_attack.py +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/tests/unit/managers/test_cve_capec.py +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/tests/unit/managers/test_cve_cwe.py +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/tests/unit/managers/test_cve_kev_cisa.py +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/tests/unit/managers/test_cve_kev_vulncheck.py +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/tests/unit/tools/test_cpe.py +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/tests/unit/tools/test_nvd.py +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/tests/unit/tools/test_utils.py +0 -0
- {arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/tests/unit/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
2
|
Name: arango_cve_processor
|
|
3
|
-
Version: 1.4.
|
|
3
|
+
Version: 1.4.15
|
|
4
4
|
Summary: A small python script that enriches Vulnerability STIX Objects with other intel
|
|
5
5
|
Project-URL: Homepage, https://github.com/muchdogesec/arango_cve_processor
|
|
6
6
|
Project-URL: Issues, https://github.com/muchdogesec/arango_cve_processor/issues
|
|
@@ -81,13 +81,22 @@ class CpeMatchUpdateManager(STIXRelationManager, relationship_note="cpematch"):
|
|
|
81
81
|
retval = []
|
|
82
82
|
for x_cpe_item in itertools.chain(*indicator['x_cpes'].values()):
|
|
83
83
|
if match_data := self.groupings.get(x_cpe_item['matchCriteriaId']):
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
84
|
+
try:
|
|
85
|
+
objects = cpe.parse_objects_for_criteria(match_data)
|
|
86
|
+
grouping_object = objects[0]
|
|
87
|
+
relationships = cpe.relate_indicator(grouping_object, indicator)
|
|
88
|
+
deprecations = cpe.parse_deprecations(objects[1:])
|
|
89
|
+
except ValueError as exc:
|
|
90
|
+
logging.error(
|
|
91
|
+
"skipping unresolvable CPE match %s for %s: %s",
|
|
92
|
+
x_cpe_item["matchCriteriaId"],
|
|
93
|
+
indicator["name"],
|
|
94
|
+
exc,
|
|
95
|
+
)
|
|
96
|
+
continue
|
|
88
97
|
for r in relationships:
|
|
89
98
|
r['_from'] = indicator['_id']
|
|
90
99
|
retval.extend(objects)
|
|
91
100
|
retval.extend(relationships)
|
|
92
101
|
retval.extend(deprecations)
|
|
93
|
-
return stix2python(retval)
|
|
102
|
+
return stix2python(retval)
|
{arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/tests/unit/managers/test_cpematch.py
RENAMED
|
@@ -188,6 +188,79 @@ def test_relate_single(cpematch_manager):
|
|
|
188
188
|
}
|
|
189
189
|
|
|
190
190
|
|
|
191
|
+
def test_relate_single_skips_one_unresolvable_match(cpematch_manager, caplog):
|
|
192
|
+
indicator = {
|
|
193
|
+
"_id": "nvd_cve_vertex_collection/indicator--broken+2025-09-12T11:25:34.563706Z",
|
|
194
|
+
"created": "2025-01-02T15:15:18.650Z",
|
|
195
|
+
"external_references": [
|
|
196
|
+
{
|
|
197
|
+
"source_name": "cve",
|
|
198
|
+
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-45830",
|
|
199
|
+
"external_id": "CVE-2022-45830",
|
|
200
|
+
}
|
|
201
|
+
],
|
|
202
|
+
"id": "indicator--broken",
|
|
203
|
+
"modified": "2025-06-05T21:01:15.860Z",
|
|
204
|
+
"name": "CVE-2022-45830",
|
|
205
|
+
"x_cpes": {
|
|
206
|
+
"not_vulnerable": [],
|
|
207
|
+
"vulnerable": [
|
|
208
|
+
{
|
|
209
|
+
"criteria": "cpe:2.3:a:broken:broken:*:*:*:*:*:*:*:*",
|
|
210
|
+
"matchCriteriaId": "BROKEN-SWID",
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"criteria": "cpe:2.3:a:good:good:*:*:*:*:*:*:*:*",
|
|
214
|
+
"matchCriteriaId": "GOOD-SWID",
|
|
215
|
+
},
|
|
216
|
+
],
|
|
217
|
+
},
|
|
218
|
+
}
|
|
219
|
+
cpematch_manager.groupings = {
|
|
220
|
+
"BROKEN-SWID": {"matchCriteriaId": "BROKEN-SWID"},
|
|
221
|
+
"GOOD-SWID": {"matchCriteriaId": "GOOD-SWID"},
|
|
222
|
+
}
|
|
223
|
+
grouping = {
|
|
224
|
+
"id": "grouping--good",
|
|
225
|
+
"name": "good",
|
|
226
|
+
"external_references": [{"external_id": "GOOD-SWID"}],
|
|
227
|
+
}
|
|
228
|
+
software = {"id": "software--good"}
|
|
229
|
+
|
|
230
|
+
with (
|
|
231
|
+
patch(
|
|
232
|
+
"arango_cve_processor.managers.cpe_match.cpe.parse_objects_for_criteria",
|
|
233
|
+
side_effect=[ValueError("SWID missing from NVD"), [grouping, software]],
|
|
234
|
+
),
|
|
235
|
+
patch(
|
|
236
|
+
"arango_cve_processor.managers.cpe_match.cpe.relate_indicator",
|
|
237
|
+
return_value=[{"type": "relationship", "id": "relationship--good"}],
|
|
238
|
+
),
|
|
239
|
+
patch(
|
|
240
|
+
"arango_cve_processor.managers.cpe_match.cpe.parse_deprecations",
|
|
241
|
+
return_value=[{"type": "relationship", "id": "relationship--deprecation"}],
|
|
242
|
+
),
|
|
243
|
+
patch(
|
|
244
|
+
"arango_cve_processor.managers.cpe_match.stix2python",
|
|
245
|
+
side_effect=lambda objects: objects,
|
|
246
|
+
),
|
|
247
|
+
):
|
|
248
|
+
objects = cpematch_manager.relate_single(indicator)
|
|
249
|
+
|
|
250
|
+
assert objects == [
|
|
251
|
+
grouping,
|
|
252
|
+
software,
|
|
253
|
+
{
|
|
254
|
+
"type": "relationship",
|
|
255
|
+
"id": "relationship--good",
|
|
256
|
+
"_from": indicator["_id"],
|
|
257
|
+
},
|
|
258
|
+
{"type": "relationship", "id": "relationship--deprecation"},
|
|
259
|
+
]
|
|
260
|
+
assert "skipping unresolvable CPE match BROKEN-SWID" in caplog.text
|
|
261
|
+
assert indicator["name"] in caplog.text
|
|
262
|
+
|
|
263
|
+
|
|
191
264
|
@pytest.fixture
|
|
192
265
|
def mocked_updates():
|
|
193
266
|
c1 = {
|
|
File without changes
|
|
File without changes
|
{arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/.github/workflows/create-release.yml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/arango_cve_processor/__init__.py
RENAMED
|
File without changes
|
{arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/arango_cve_processor/__main__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/arango_cve_processor/managers/cve_cwe.py
RENAMED
|
File without changes
|
{arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/arango_cve_processor/managers/cve_kev.py
RENAMED
|
File without changes
|
|
File without changes
|
{arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/arango_cve_processor/tools/__init__.py
RENAMED
|
File without changes
|
{arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/arango_cve_processor/tools/cpe.py
RENAMED
|
File without changes
|
{arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/arango_cve_processor/tools/cpe_db.py
RENAMED
|
File without changes
|
{arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/arango_cve_processor/tools/nvd.py
RENAMED
|
File without changes
|
{arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/arango_cve_processor/tools/retriever.py
RENAMED
|
File without changes
|
{arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/arango_cve_processor/tools/utils.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/docs/arango_cve_processor-structure.jpg
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/tests/files/base_cves_update_1.json
RENAMED
|
File without changes
|
{arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/tests/files/base_cves_update_2.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/tests/unit/managers/test_base.py
RENAMED
|
File without changes
|
{arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/tests/unit/managers/test_cve_attack.py
RENAMED
|
File without changes
|
{arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/tests/unit/managers/test_cve_capec.py
RENAMED
|
File without changes
|
{arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/tests/unit/managers/test_cve_cwe.py
RENAMED
|
File without changes
|
{arango_cve_processor-1.4.14 → arango_cve_processor-1.4.15}/tests/unit/managers/test_cve_kev_cisa.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|