more Qualys WAS mappings and transforms
This commit is contained in:
@ -286,19 +286,21 @@ class qualysScanReport:
|
|||||||
|
|
||||||
COLUMN_MAPPING = {
|
COLUMN_MAPPING = {
|
||||||
'DescriptionCatSev': 'category_description',
|
'DescriptionCatSev': 'category_description',
|
||||||
'DescriptionSeverity': 'severity_description',
|
'DescriptionSeverity': 'synopsis',
|
||||||
'Evidence #1': 'evidence',
|
'Evidence #1': 'evidence',
|
||||||
'Payload #1': 'payload',
|
'Payload #1': 'payload',
|
||||||
|
'QID': 'plugin_id',
|
||||||
'Request Headers #1': 'request_headers',
|
'Request Headers #1': 'request_headers',
|
||||||
'Request Method #1': 'request_method',
|
'Request Method #1': 'request_method',
|
||||||
'Request URL #1': 'request_url',
|
'Request URL #1': 'request_url',
|
||||||
'Response #1': 'response',
|
'Response #1': 'plugin_output',
|
||||||
'URL': 'url',
|
'Title': 'plugin_name',
|
||||||
'Url': 'uri',
|
'Url': 'uri',
|
||||||
'QID': 'plugin_id',
|
'URL': 'url',
|
||||||
|
'Vulnerability Category': 'type',
|
||||||
}
|
}
|
||||||
|
|
||||||
SEVERITY_MAPPING = {0: 'none', 1: 'low', 2: 'medium', 3: 'high',4: 'critical'}
|
SEVERITY_MAPPING = {0: 'none', 1: 'low', 2: 'medium', 3: 'high', 4: 'critical'}
|
||||||
|
|
||||||
# URL Vulnerability Information
|
# URL Vulnerability Information
|
||||||
WEB_SCAN_VULN_BLOCK = list(qualysReportFields.VULN_BLOCK)
|
WEB_SCAN_VULN_BLOCK = list(qualysReportFields.VULN_BLOCK)
|
||||||
@ -521,5 +523,9 @@ class qualysScanReport:
|
|||||||
df['risk_number'] = df['severity'].astype(int)-1
|
df['risk_number'] = df['severity'].astype(int)-1
|
||||||
df['risk'] = df['risk_number'].map(self.SEVERITY_MAPPING)
|
df['risk'] = df['risk_number'].map(self.SEVERITY_MAPPING)
|
||||||
|
|
||||||
|
# Extract dns field from URL
|
||||||
|
df['dns'] = df['url'].str.extract('https?://([^/]+)', expand=False)
|
||||||
|
df.loc[df['uri'] != '','dns'] = df.loc[df['uri'] != '','uri'].str.extract('https?://([^/]+)', expand=False)
|
||||||
|
|
||||||
df.fillna('', inplace=True)
|
df.fillna('', inplace=True)
|
||||||
return df
|
return df
|
||||||
|
Reference in New Issue
Block a user