Skip to content

Commit 19acd40

Browse files
committed
update
1 parent a5720f0 commit 19acd40

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

dojo/tools/rusty_hog/parser.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def __getitem(self, vulnerabilities, scanner):
8484
if scanner == "Choctaw Hog":
8585
"""Choctaw Hog"""
8686
if vulnerability.get("commitHash") is None:
87-
raise ValueError("You chose the wrong scan type: " + scanner)
87+
raise ValueError("You chose the wrong scan type: " + scanner + ". A commitHash is expected.")
8888
found_secret_string = str(vulnerability.get("stringsFound") or "")
8989
description += f"\n**This string was found:** {found_secret_string}"
9090
if vulnerability.get("commit") is not None:
@@ -122,7 +122,7 @@ def __getitem(self, vulnerabilities, scanner):
122122
elif scanner == "Duroc Hog":
123123
"""Duroc Hog"""
124124
if vulnerability.get("linenum") is None:
125-
raise ValueError("You chose the wrong scan type: " + scanner)
125+
raise ValueError("You chose the wrong scan type: " + scanner + ". A linenum is expected.")
126126
found_secret_string = str(vulnerability.get("stringsFound") or "")
127127
description += f"\n**This string was found:** {found_secret_string}"
128128
if vulnerability.get("path") is not None:
@@ -140,7 +140,7 @@ def __getitem(self, vulnerabilities, scanner):
140140
elif scanner == "Gottingen Hog":
141141
"""Gottingen Hog"""
142142
if vulnerability.get("issue_id") is None:
143-
raise ValueError("You chose the wrong scan type: " + scanner)
143+
raise ValueError("You chose the wrong scan type: " + scanner + ". An issue_id is expected.")
144144
found_secret_string = str(vulnerability.get("stringsFound") or "")
145145
description += f"\n**This string was found:** {found_secret_string}"
146146
if vulnerability.get("issue_id"):
@@ -157,7 +157,7 @@ def __getitem(self, vulnerabilities, scanner):
157157
)
158158
elif scanner == "Essex Hog":
159159
if vulnerability.get("page_id") is None:
160-
raise ValueError("You chose the wrong scan type: " + scanner)
160+
raise ValueError("You chose the wrong scan type: " + scanner + ". A page_id is expected.")
161161
found_secret_string = str(vulnerability.get("stringsFound") or "")
162162
description += f"\n**This string was found:** {found_secret_string}"
163163
if vulnerability.get("page_id"):

0 commit comments

Comments
 (0)