Skip to content

Commit

Permalink
RustyHog: improve description and file_path
Browse files Browse the repository at this point in the history
  • Loading branch information
valentijnscholten committed Dec 17, 2024
1 parent d839ec0 commit 4101de6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions dojo/tools/rusty_hog/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def __getitem(self, vulnerabilities, scanner):
found_secret_string = ""
cwe = 200
for vulnerability in vulnerabilities:
description =""
description = ""
if vulnerability.get("reason") is not None:
description += "\n**Reason:** {}".format(
vulnerability.get("reason"),
Expand All @@ -85,7 +85,7 @@ def __getitem(self, vulnerabilities, scanner):
break
if scanner == "Choctaw Hog":
"""Choctaw Hog"""
found_secret_string = str(vulnerability.get("stringsFound") or '')
found_secret_string = str(vulnerability.get("stringsFound") or "")
description += f"**This string was found:** {found_secret_string}"
if vulnerability.get("commit") is not None:
description += "\n**Commit message:** {}".format(
Expand Down Expand Up @@ -121,7 +121,7 @@ def __getitem(self, vulnerabilities, scanner):
)
elif scanner == "Duroc Hog":
"""Duroc Hog"""
found_secret_string = str(vulnerability.get("stringsFound") or '')
found_secret_string = str(vulnerability.get("stringsFound") or "")
description += f"**This string was found:** {found_secret_string}"
if vulnerability.get("path") is not None:
description += "\n**Path of Issue:** {}".format(
Expand All @@ -137,7 +137,7 @@ def __getitem(self, vulnerabilities, scanner):
)
elif scanner == "Gottingen Hog":
"""Gottingen Hog"""
found_secret_string = str(vulnerability.get("stringsFound") or '')
found_secret_string = str(vulnerability.get("stringsFound") or "")
description += f"**This string was found:** {found_secret_string}"
if vulnerability.get("issue_id") is not None:
description += "\n**JIRA Issue ID:** {}".format(
Expand All @@ -152,7 +152,7 @@ def __getitem(self, vulnerabilities, scanner):
vulnerability.get("url"), vulnerability.get("url"),
)
elif scanner == "Essex Hog":
found_secret_string = str(vulnerability.get("stringsFound") or '')
found_secret_string = str(vulnerability.get("stringsFound") or "")
description += f"**This string was found:** {found_secret_string}"
if vulnerability.get("page_id") is not None:
description += "\n**Confluence URL:** [{}]({})".format(
Expand Down

0 comments on commit 4101de6

Please sign in to comment.