Skip to content

Commit

Permalink
t
Browse files Browse the repository at this point in the history
  • Loading branch information
pna-nca committed May 6, 2024
1 parent 585c59b commit 80dbcea
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions dojo/tools/neuvector_compliance/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,19 +135,20 @@ def get_item(node, test):


def get_asset_item(comp_issue, test):
name = comp_issue.get("name", "unknown")
test_description = comp_issue.get("description").rstrip()
test_name = comp_issue.get("name", "unknown")

test_severity = comp_issue.get("level")
test_description = comp_issue.get("description", "").rstrip()

test_severity = comp_issue.get("level", "unknown")

mitigation = comp_issue.get("remediation", "").rstrip()

category = comp_issue.get("category")
category = comp_issue.get("category", "unknown")

test_profile = comp_issue.get("profile", "profile unknown")
test_profile = comp_issue.get("profile", "unknown")

full_description = "<p>{} ({}), {}:</p>".format(
name, category, test_profile
test_name, category, test_profile
)
full_description += "<p>{}</p>".format(test_description)
full_description += "<p>Audit: {}</p>".format(test_severity)
Expand All @@ -167,12 +168,12 @@ def get_asset_item(comp_issue, test):
full_description += "<p> {}</p>".format(str(m).rstrip())

finding = Finding(
title="{name} - {desc}".format(name, desc=test_description),
title="{name} - {desc}".format(name=test_name, desc=test_description),
test=test,
description=full_description,
severity=convert_severity(test_severity),
mitigation=mitigation,
vuln_id_from_tool="{category}_{name}".format(category, name),
vuln_id_from_tool="{category}_{name}".format(category=category, name=test_name),
impact="",
static_finding=True,
dynamic_finding=False,
Expand Down

0 comments on commit 80dbcea

Please sign in to comment.