Skip to content

Commit 9128bac

Browse files
committed
add cobalt importer
1 parent 1a2cc27 commit 9128bac

File tree

4 files changed

+14
-1
lines changed

4 files changed

+14
-1
lines changed

dojo/fixtures/test_type.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,5 +340,13 @@
340340
},
341341
"model": "dojo.test_type",
342342
"pk":56
343+
},
344+
{
345+
"fields": {
346+
"name": "Cobalt.io Scan"
347+
},
348+
"model": "dojo.test_type",
349+
"pk": 57
350+
343351
}
344352
]

dojo/forms.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,8 @@ class ImportScanForm(forms.Form):
297297
("Openscap Vulnerability Scan", "Openscap Vulnerability Scan"),
298298
("Wapiti Scan", "Wapiti Scan"),
299299
("Immuniweb Scan", "Immuniweb Scan"),
300-
("Sonatype Application Scan", "Sonatype Application Scan"))
300+
("Sonatype Application Scan", "Sonatype Application Scan"),
301+
("Cobalt.io Scan", "Cobalt.io Scan"))
301302

302303
SORTED_SCAN_TYPE_CHOICES = sorted(SCAN_TYPE_CHOICES, key=lambda x: x[1])
303304
scan_date = forms.DateTimeField(

dojo/templates/dojo/import_scan_results.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ <h3> Add Tests</h3>
4242
<li><b>Clair Klar Scan</b> - Import JSON reports of Docker image vulnerabilities from clair klar client.</li>
4343
<li><b>Contrast Scanner</b> - CSV Report</b></li>
4444
<li><b>Checkmarx Detailed XML Report</b></li>
45+
<li><b>Cobalt.io Scan</b> - CSV Report</b></li>
4546
<li><b>Crashtest Security JUnit XML Report</b></li>
4647
<li><b>DawnScanner</b> - Dawnscanner (-j) output file can be imported in JSON format.</li>
4748
<li><b>Dependency Check</b> - OWASP Dependency Check output can be imported in Xml format.</li>

dojo/tools/factory.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
from dojo.tools.openscap.parser import OpenscapXMLParser
5151
from dojo.tools.immuniweb.parser import ImmuniwebXMLParser
5252
from dojo.tools.wapiti.parser import WapitiXMLParser
53+
from dojo.tools.cobalt.parser import CobaltCSVParser
5354

5455
__author__ = 'Jay Paz'
5556

@@ -165,6 +166,8 @@ def import_parser_factory(file, test, active, verified, scan_type=None):
165166
parser = ImmuniwebXMLParser(file, test)
166167
elif scan_type == 'Wapiti Scan':
167168
parser = WapitiXMLParser(file, test)
169+
elif scan_type == 'Cobalt.io Scan':
170+
parser = CobaltCSVParser(file, test)
168171
else:
169172
raise ValueError('Unknown Test Type')
170173

0 commit comments

Comments
 (0)