Skip to content

Commit faac95c

Browse files
committed
Updated severity mapping and kiuwan defect-finding fileds mapping
1 parent 4713b2a commit faac95c

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

dojo/tools/kiuwan/parser.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
class Severityfilter():
1010
def __init__(self):
11-
self.severity_mapping = {'Normal': 'Info',
11+
self.severity_mapping = {'Very Low': 'Info',
1212
'Low': 'Low',
13-
'Medium': 'Medium',
13+
'Normal': 'Medium',
1414
'High': 'High',
1515
'Very High': 'Critical'
1616
}
@@ -46,19 +46,21 @@ def __init__(self, filename, test):
4646
severityfilter.eval_column(row['Priority'])
4747
findingdict['severity'] = severityfilter.severity
4848
findingdict['title'] = row['Rule']
49-
findingdict['description'] = "**Source file** : " + row['Source file'] + "\n\n" + \
50-
"**Vulnerability type** : " + row['Vulnerability type'] + "\n\n" + \
49+
findingdict['file'] = row['File']
50+
findingdict['line_number'] = row['Line number']
51+
findingdict['description'] = "**Vulnerability type** : " + row['Vulnerability type'] + "\n\n" + \
5152
"**Status** : " + row['Status'] + "\n\n" + \
5253
"**CWE Scope** : " + row['CWE Scope'] + "\n\n" + \
5354
"**Line text** : " + row['Line text'] + "\n\n" + \
5455
"**Normative** : " + row['Normative'] + "\n\n" + \
55-
"**Line number** : " + row['Line number'] + "\n\n" + \
5656
"**Rule code** : " + row['Rule code'] + "\n\n" + \
57-
"**File** : " + row['File'] + "\n\n" + \
58-
"**Source line text** : " + row['Source line text'] + "\n\n" + \
59-
"**Source line number** : " + row['Source line number'] + "\n"
57+
"**Source file** : " + row['Source file'] + "\n\n" + \
58+
"**Source line number** : " + row['Source line number'] + "\n\n" + \
59+
"**Source line text** : " + row['Source line text'] + "\n"
6060

6161
finding.title = findingdict['title']
62+
finding.file_path = findingdict['file']
63+
finding.line_number = findingdict['line_number']
6264
finding.description = findingdict['description']
6365
finding.references = "Not provided!"
6466
finding.mitigation = "Not provided!"

0 commit comments

Comments
 (0)