Skip to content

Commit 105a8be

Browse files
add TODO for parsers to check/fix
1 parent 5125879 commit 105a8be

11 files changed

Lines changed: 13 additions & 12 deletions

File tree

dojo/fixtures/dojo_testdata.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1146,6 +1146,7 @@
11461146
"pk": 2,
11471147
"model": "dojo.finding",
11481148
"fields": {
1149+
"cvssv3": "happy little vector",
11491150
"last_reviewed_by": null,
11501151
"reviewers": [],
11511152
"static_finding": false,

dojo/tools/aqua/parser.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def get_item(self, resource, vuln, test):
170170
severity_justification += "\nAqua severity classification: {}".format(vuln.get("aqua_severity_classification"))
171171
severity_justification += "\nAqua scoring system: {}".format(vuln.get("aqua_scoring_system"))
172172
if "nvd_score_v3" in vuln:
173-
cvssv3 = vuln.get("nvd_vectors_v3")
173+
cvssv3 = vuln.get("nvd_vectors_v3") # TODO: VECTOR
174174
if "aqua_score" in vuln:
175175
if score is None:
176176
score = vuln.get("aqua_score")
@@ -193,7 +193,7 @@ def get_item(self, resource, vuln, test):
193193
)
194194
severity_justification += "\nNVD v3 vectors: {}".format(vuln.get("nvd_vectors_v3"))
195195
# Add the CVSS3 to Finding
196-
cvssv3 = vuln.get("nvd_vectors_v3")
196+
cvssv3 = vuln.get("nvd_vectors_v3") # TODO: VECTOR
197197
if "nvd_score" in vuln:
198198
if score is None:
199199
score = vuln.get("nvd_score")

dojo/tools/blackduck_binary_analysis/parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def ingest_findings(self, sorted_findings, test):
4343
cwe = 1357
4444
title = self.format_title(i)
4545
description = self.format_description(i)
46-
cvss_v3 = True
46+
cvss_v3 = True # TODO: VECTOR
4747
if str(i.cvss_vector_v3) != "":
4848
cvss_vectors = "{}{}".format(
4949
"CVSS:3.1/",

dojo/tools/cyberwatch_galeax/parser.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ def build_findings_for_cve(self, cve_code, c_data, test):
197197
description = c_data["description"]
198198
impact = c_data["impact"]
199199
references = c_data["references"]
200-
cvssv3 = c_data["cvssv3"]
200+
cvssv3 = c_data["cvssv3"] # TODO: VECTOR
201201
cvssv3_score = c_data["cvssv3_score"]
202202
products = c_data["products"]
203203

@@ -515,7 +515,7 @@ def parse_cvss(self, cvss_v3_vector, json_data):
515515
if cvss_v3_vector:
516516
vectors = cvss.parser.parse_cvss_from_text(cvss_v3_vector)
517517
if vectors and isinstance(vectors[0], CVSS3):
518-
cvssv3 = vectors[0].clean_vector()
518+
cvssv3 = vectors[0].clean_vector() # TODO: VECTOR
519519
cvssv3_score = vectors[0].scores()[0]
520520
severity = vectors[0].severities()[0]
521521
return cvssv3, cvssv3_score, severity

dojo/tools/jfrog_xray_unified/parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def get_item(vulnerability, test):
7575
vulnerability_id = worstCve["cve"]
7676
if "cvss_v3_vector" in worstCve:
7777
cvss_v3 = worstCve["cvss_v3_vector"]
78-
cvssv3 = cvss_v3
78+
cvssv3 = cvss_v3 # TODO: VECTOR
7979
if "cvss_v2_vector" in worstCve:
8080
cvss_v2 = worstCve["cvss_v2_vector"]
8181

dojo/tools/npm_audit_7_plus/parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ def get_item(item_node, tree, test):
166166
cwe = int(cwe.split("-")[1])
167167
dojo_finding.cwe = cwe
168168

169-
if (cvssv3 is not None) and (len(cvssv3) > 0):
169+
if (cvssv3 is not None) and (len(cvssv3) > 0): # TODO: VECTOR
170170
dojo_finding.cvssv3 = cvssv3
171171

172172
return dojo_finding

dojo/tools/qualys/csv_parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ def build_findings_from_dict(report_findings: [dict]) -> [Finding]:
202202
# Clean up the CVE data appropriately
203203
cve_list = _clean_cve_data(cve_data)
204204

205-
if "CVSS3 Base" in report_finding:
205+
if "CVSS3 Base" in report_finding: # TODO: VECTOR
206206
cvssv3 = _extract_cvss_vectors(
207207
report_finding["CVSS3 Base"], report_finding["CVSS3 Temporal"],
208208
)

dojo/tools/qualys/parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ def parse_finding(host, tree):
352352
finding.is_mitigated = temp["mitigated"]
353353
finding.active = temp["active"]
354354
if temp.get("CVSS_vector") is not None:
355-
finding.cvssv3 = temp.get("CVSS_vector")
355+
finding.cvssv3 = temp.get("CVSS_vector") # TODO: VECTOR
356356
if temp.get("CVSS_value") is not None:
357357
finding.cvssv3_score = temp.get("CVSS_value")
358358
finding.verified = True

dojo/tools/sonatype/parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def get_finding(security_issue, component, test):
6363
finding.cwe = security_issue["cwe"]
6464

6565
if "cvssVector" in security_issue:
66-
finding.cvssv3 = security_issue["cvssVector"]
66+
finding.cvssv3 = security_issue["cvssVector"] # TODO: VECTOR
6767

6868
if "pathnames" in component:
6969
finding.file_path = " ".join(component["pathnames"])[:1000]

dojo/tools/trivy/parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ def get_result_items(self, test, results, service_name=None, artifact_name=""):
171171
if cvssclass is not None:
172172
if cvssclass.get("V3Score") is not None:
173173
severity = self.convert_cvss_score(cvssclass.get("V3Score"))
174-
cvssv3 = dict(cvssclass).get("V3Vector")
174+
cvssv3 = dict(cvssclass).get("V3Vector") # TODO: VECTOR
175175
elif cvssclass.get("V2Score") is not None:
176176
severity = self.convert_cvss_score(cvssclass.get("V2Score"))
177177
else:

0 commit comments

Comments
 (0)