Skip to content

Commit 147392b

Browse files
authored
Do not set attack_complexity and user_interaction from cvss 4 data (#202)
* Do not set attack_complexity and user_interaction from cvss 4 data Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com> --------- Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>
1 parent 35f9e88 commit 147392b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "appthreat-vulnerability-db"
3-
version = "6.2.2"
3+
version = "6.2.3"
44
description = "AppThreat's vulnerability database and package search library with a built-in sqlite based storage. OSV, CVE, GitHub, npm are the primary sources of vulnerabilities."
55
authors = [
66
{name = "Team AppThreat", email = "cloud@appthreat.com"},

vdb/lib/osv.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,8 @@ def to_vuln(cve_data):
208208
severity = cvss4_obj.get("baseSeverity")
209209
exploitability_score = score
210210
attack_complexity = cvss4_obj.get("attackComplexity")
211-
user_interaction = cvss4_obj.get("userInteraction")
211+
# CVSS 3.1 only supports NONE or REQUIRED for userInteraction
212+
user_interaction = "REQUIRED" if cvss4_obj.get("userInteraction", "") != "NONE" else "NONE"
212213
if vector_string:
213214
cvss3_obj = get_cvss3_from_vector(vector_string)
214215
# Fallback to CVSS 3.1 only if CVSS 4 is absent

0 commit comments

Comments
 (0)