arango-cve-processor 1.4.12__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.12 → arango_cve_processor-1.4.15}/PKG-INFO +2 -2
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/arango_cve_processor/managers/cpe_match.py +14 -5
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/arango_cve_processor/tools/retriever.py +10 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/pyproject.toml +1 -1
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/requirements.txt +6 -6
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/tests/unit/managers/test_cpematch.py +73 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/.env.example +0 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/.env.markdown +0 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/.github/workflows/create-release.yml +0 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/.github/workflows/run-tests.yml +0 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/.gitignore +0 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/LICENSE +0 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/README.md +0 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/arango_cve_processor/__init__.py +0 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/arango_cve_processor/__main__.py +0 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/arango_cve_processor/config.py +0 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/arango_cve_processor/managers/__init__.py +0 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/arango_cve_processor/managers/base_manager.py +0 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/arango_cve_processor/managers/cve_attack.py +0 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/arango_cve_processor/managers/cve_capec.py +0 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/arango_cve_processor/managers/cve_cwe.py +0 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/arango_cve_processor/managers/cve_kev.py +0 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/arango_cve_processor/managers/cve_kev_vulncheck.py +0 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/arango_cve_processor/tools/__init__.py +0 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/arango_cve_processor/tools/cpe.py +0 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/arango_cve_processor/tools/cpe_db.py +0 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/arango_cve_processor/tools/nvd.py +0 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/arango_cve_processor/tools/utils.py +0 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/arango_cve_processor.py +0 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/docs/README.md +0 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/docs/arango_cve_processor-structure.jpg +0 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/docs/arango_cve_processor.png +0 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/docs/cpematch.md +0 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/docs/cve-attack.md +0 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/docs/cve-capec.md +0 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/docs/cve-cwe.md +0 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/docs/cve-epss.md +0 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/docs/cve-kev.md +0 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/docs/cve-vulncheck-kev.md +0 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/docs/vulmatch.png +0 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/tests/NOTES.md +0 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/tests/README.md +0 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/tests/__init__.py +0 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/tests/files/attack-enterprise-objects.json +0 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/tests/files/base_cves.json +0 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/tests/files/base_cves_update_1.json +0 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/tests/files/base_cves_update_2.json +0 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/tests/files/capec-objects.json +0 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/tests/files/cves.json +0 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/tests/files/cwe-objects.json +0 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/tests/requirements.txt +0 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/tests/tests.env +0 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/tests/unit/cli/test_main.py +0 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/tests/unit/conftest.py +0 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/tests/unit/managers/test_base.py +0 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/tests/unit/managers/test_cve_attack.py +0 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/tests/unit/managers/test_cve_capec.py +0 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/tests/unit/managers/test_cve_cwe.py +0 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/tests/unit/managers/test_cve_kev_cisa.py +0 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/tests/unit/managers/test_cve_kev_vulncheck.py +0 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/tests/unit/tools/test_cpe.py +0 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/tests/unit/tools/test_nvd.py +0 -0
- {arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/tests/unit/tools/test_utils.py +0 -0
- {arango_cve_processor-1.4.12 → 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.12 → arango_cve_processor-1.4.15}/arango_cve_processor/tools/retriever.py
RENAMED
|
@@ -2,6 +2,8 @@ import logging
|
|
|
2
2
|
from urllib.parse import urljoin
|
|
3
3
|
import os
|
|
4
4
|
import requests
|
|
5
|
+
from requests.adapters import HTTPAdapter
|
|
6
|
+
from urllib3.util import Retry
|
|
5
7
|
|
|
6
8
|
|
|
7
9
|
class STIXObjectRetriever:
|
|
@@ -44,6 +46,14 @@ class STIXObjectRetriever:
|
|
|
44
46
|
"API-KEY": self.api_key,
|
|
45
47
|
}
|
|
46
48
|
)
|
|
49
|
+
retries = Retry(
|
|
50
|
+
total=3,
|
|
51
|
+
backoff_factor=1,
|
|
52
|
+
status_forcelist=[500],
|
|
53
|
+
allowed_methods=["GET"],
|
|
54
|
+
)
|
|
55
|
+
s.mount("https://", HTTPAdapter(max_retries=retries))
|
|
56
|
+
s.mount("http://", HTTPAdapter(max_retries=retries))
|
|
47
57
|
data = []
|
|
48
58
|
page = 1
|
|
49
59
|
logging.info("fetching from: %s", endpoint)
|
|
@@ -8,7 +8,7 @@ aiofiles==25.1.0
|
|
|
8
8
|
# via pypdl
|
|
9
9
|
aiohappyeyeballs==2.6.2
|
|
10
10
|
# via aiohttp
|
|
11
|
-
aiohttp==3.14.
|
|
11
|
+
aiohttp==3.14.3
|
|
12
12
|
# via pypdl
|
|
13
13
|
aiosignal==1.4.0
|
|
14
14
|
# via aiohttp
|
|
@@ -31,7 +31,7 @@ frozenlist==1.8.0
|
|
|
31
31
|
# via
|
|
32
32
|
# aiohttp
|
|
33
33
|
# aiosignal
|
|
34
|
-
idna==3.
|
|
34
|
+
idna==3.15
|
|
35
35
|
# via
|
|
36
36
|
# requests
|
|
37
37
|
# yarl
|
|
@@ -58,7 +58,7 @@ pydantic==2.13.4
|
|
|
58
58
|
# via stix2extensions
|
|
59
59
|
pydantic-core==2.46.4
|
|
60
60
|
# via pydantic
|
|
61
|
-
pyjwt==2.
|
|
61
|
+
pyjwt==2.13.0
|
|
62
62
|
# via python-arango
|
|
63
63
|
pypdl==1.5.7
|
|
64
64
|
# via arango_cve_processor (pyproject.toml)
|
|
@@ -67,7 +67,7 @@ python-arango==8.3.3 ; python_version >= "3.8"
|
|
|
67
67
|
# arango-cve-processor
|
|
68
68
|
# arango_cve_processor (pyproject.toml)
|
|
69
69
|
# stix2arango
|
|
70
|
-
python-dotenv==1.
|
|
70
|
+
python-dotenv==1.2.2
|
|
71
71
|
# via stix2arango
|
|
72
72
|
pytz==2024.1
|
|
73
73
|
# via stix2
|
|
@@ -75,7 +75,7 @@ referencing==0.35.1
|
|
|
75
75
|
# via
|
|
76
76
|
# jsonschema
|
|
77
77
|
# jsonschema-specifications
|
|
78
|
-
requests==2.
|
|
78
|
+
requests==2.33.0 ; python_version >= "3.7"
|
|
79
79
|
# via
|
|
80
80
|
# arango-cve-processor
|
|
81
81
|
# arango_cve_processor (pyproject.toml)
|
|
@@ -122,7 +122,7 @@ typing-extensions==4.15.0
|
|
|
122
122
|
# typing-inspection
|
|
123
123
|
typing-inspection==0.4.2
|
|
124
124
|
# via pydantic
|
|
125
|
-
urllib3==2.
|
|
125
|
+
urllib3==2.7.0
|
|
126
126
|
# via
|
|
127
127
|
# python-arango
|
|
128
128
|
# requests
|
{arango_cve_processor-1.4.12 → 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.12 → 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.12 → arango_cve_processor-1.4.15}/arango_cve_processor/__init__.py
RENAMED
|
File without changes
|
{arango_cve_processor-1.4.12 → 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.12 → arango_cve_processor-1.4.15}/arango_cve_processor/managers/cve_cwe.py
RENAMED
|
File without changes
|
{arango_cve_processor-1.4.12 → 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.12 → arango_cve_processor-1.4.15}/arango_cve_processor/tools/__init__.py
RENAMED
|
File without changes
|
{arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/arango_cve_processor/tools/cpe.py
RENAMED
|
File without changes
|
{arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/arango_cve_processor/tools/cpe_db.py
RENAMED
|
File without changes
|
{arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/arango_cve_processor/tools/nvd.py
RENAMED
|
File without changes
|
{arango_cve_processor-1.4.12 → 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.12 → 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.12 → arango_cve_processor-1.4.15}/tests/files/base_cves_update_1.json
RENAMED
|
File without changes
|
{arango_cve_processor-1.4.12 → 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.12 → arango_cve_processor-1.4.15}/tests/unit/managers/test_base.py
RENAMED
|
File without changes
|
{arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/tests/unit/managers/test_cve_attack.py
RENAMED
|
File without changes
|
{arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/tests/unit/managers/test_cve_capec.py
RENAMED
|
File without changes
|
{arango_cve_processor-1.4.12 → arango_cve_processor-1.4.15}/tests/unit/managers/test_cve_cwe.py
RENAMED
|
File without changes
|
{arango_cve_processor-1.4.12 → 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
|