|
8 | 8 |
|
9 | 9 | class Severityfilter(): |
10 | 10 | def __init__(self): |
11 | | - self.severity_mapping = {'Normal': 'Info', |
| 11 | + self.severity_mapping = {'Very Low': 'Info', |
12 | 12 | 'Low': 'Low', |
13 | | - 'Medium': 'Medium', |
| 13 | + 'Normal': 'Medium', |
14 | 14 | 'High': 'High', |
15 | 15 | 'Very High': 'Critical' |
16 | 16 | } |
@@ -46,19 +46,22 @@ def __init__(self, filename, test): |
46 | 46 | severityfilter.eval_column(row['Priority']) |
47 | 47 | findingdict['severity'] = severityfilter.severity |
48 | 48 | findingdict['title'] = row['Rule'] |
49 | | - findingdict['description'] = "**Source file** : " + row['Source file'] + "\n\n" + \ |
50 | | - "**Vulnerability type** : " + row['Vulnerability type'] + "\n\n" + \ |
51 | | - "**Status** : " + row['Status'] + "\n\n" + \ |
| 49 | + findingdict['file'] = row['File'] |
| 50 | + findingdict['line_number'] = row['Line number'] |
| 51 | + findingdict['description'] = "**Vulnerability type** : " + row['Vulnerability type'] + "\n\n" + \ |
52 | 52 | "**CWE Scope** : " + row['CWE Scope'] + "\n\n" + \ |
53 | | - "**Line text** : " + row['Line text'] + "\n\n" + \ |
54 | | - "**Normative** : " + row['Normative'] + "\n\n" + \ |
55 | 53 | "**Line number** : " + row['Line number'] + "\n\n" + \ |
| 54 | + "**Code at line number** : " + row['Line text'] + "\n\n" + \ |
| 55 | + "**Normative** : " + row['Normative'] + "\n\n" + \ |
56 | 56 | "**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 | + "**Status** : " + row['Status'] + "\n\n" + \ |
| 58 | + "**Source file** : " + row['Source file'] + "\n\n" + \ |
| 59 | + "**Source line number** : " + row['Source line number'] + "\n\n" + \ |
| 60 | + "**Code at sorce line number** : " + row['Source line text'] + "\n" |
60 | 61 |
|
61 | 62 | finding.title = findingdict['title'] |
| 63 | + finding.file_path = findingdict['file'] |
| 64 | + finding.line = findingdict['line_number'] |
62 | 65 | finding.description = findingdict['description'] |
63 | 66 | finding.references = "Not provided!" |
64 | 67 | finding.mitigation = "Not provided!" |
|
0 commit comments