We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 999832d commit 68f4596Copy full SHA for 68f4596
dojo/unittests/scans/generic/generic_report1.csv
@@ -0,0 +1,6 @@
1
+Date,Title,CweId,Url,Severity,Description,Mitigation,Impact,References,Active,Verified,FalsePositive,Duplicate
2
+28/02/2021,ASDF,1,https://vulnerable.endpoint.com/resource1/asdf,Low,Some description,Some mitigation advice,Some Impact,,TRUE,TRUE,FALSE,FALSE
3
+28/02/2021,ASDF,2,https://vulnerable.endpoint.com/resource2/qwerty,Low,Some description,Some mitigation advice,Some Impact,,TRUE,TRUE,FALSE,FALSE
4
+28/02/2021,ASDF,3,https://vulnerable.endpoint.com/resource3/asdf,Low,Some description,Some mitigation advice,Some Impact,,TRUE,TRUE,FALSE,FALSE
5
+28/02/2021,ASDF,4,https://vulnerable.endpoint.com/resource4/asdf,Low,Some description,Some mitigation advice,Some Impact,,TRUE,TRUE,FALSE,FALSE
6
+28/02/2021,ASDF,5,https://vulnerable.endpoint.com/resource5/asdf,Low,Some description,Some mitigation advice,Some Impact,,TRUE,TRUE,FALSE,FALSE
dojo/unittests/tools/test_generic_parser.py
@@ -23,6 +23,21 @@ def setUp(self):
23
product=self.product)
24
self.test = Test(engagement=self.engagement)
25
26
+ def test_parse_report1(self):
27
+ file = open("dojo/unittests/scans/generic/generic_report1.csv")
28
+ parser = GenericParser()
29
+ findings = parser.get_findings(file, self.test, True, True)
30
+ self.assertEqual(1, len(findings))
31
+ finding = findings[0]
32
+ self.assertEqual(5, len(finding.unsaved_endpoints))
33
+ endpoint = finding.unsaved_endpoints[0]
34
+ self.assertEqual("vulnerable.endpoint.com:443", endpoint.host)
35
+ self.assertEqual("resource1/asdf", endpoint.path)
36
+ endpoint = finding.unsaved_endpoints[1]
37
38
+ self.assertEqual("resource2/qwerty", endpoint.path)
39
+ self.assertEqual("https", endpoint.protocol)
40
+
41
def test_parse_no_csv_content_no_findings(self):
42
findings = ""
43
file = TestFile("findings.csv", findings)
0 commit comments