Codebase list faraday-plugins / ae05cba
Import upstream version 1.6.2 Kali Janitor 2 years ago
5 changed file(s) with 17 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
0 Now Appscan plugin saves line and highlight of the vulns in desc and data
0 Apr 4th, 2022
0 1.6.2 [Apr 4th, 2022]:
1 ---
2 * Now Appscan plugin saves line and highlight of the vulns in desc and data
3
04 1.6.1 [Mar 18th, 2022]:
15 ---
26 * Add references tu burp plugin
0 __version__ = '1.6.1'
0 __version__ = '1.6.2'
3434 try:
3535 tree = ET.fromstring(xml_output)
3636 except SyntaxError as err:
37 print('SyntaxError In xml: %s. %s' % (err, xml_output))
37 print(f'SyntaxError In xml: {err}. {xml_output}')
3838 return None
3939 return tree
4040
181181 sast_issues = []
182182 for item in tree:
183183 name = self.issue_types[item.find("issue-type/ref").text]
184 source_file = item.attrib["filename"].replace('\\','/')
184 source_file = item.attrib["filename"].replace('\\', '/')
185185 severity = 0 if item.find("severity-id") is None else int(item.find("severity-id").text)
186186 description = item.find("fix/item/general/text").text
187187 resolution = "" if item.find("variant-group/item/issue-information/fix-resolution-text") is None \
239239 data.append(f"Method: {item.find('variant-group/item/issue-information/method-signature').text}")
240240 if item.find("variant-group/item/issue-information/method-signature2") is not None:
241241 data.append(f"Location: {item.find('variant-group/item/issue-information/method-signature2').text}")
242 line = item.find("location")
243 highlight = item.find("variant-group/item/issue-information/call-trace/call-invocation/context/highlight")
244 if highlight is not None:
245 data.append(f" {highlight.text}")
246 issue_data["desc"] += "\n" + highlight.text
247 if line is not None and len(line.text.split(':')) > 1 and line.text.split(':')[-1].isdigit():
248 data.append(f"line {line.text.split(':')[-1]}")
249 issue_data["desc"] += f"line {line.text.split(':')[-1]}"
242250 issue_data['data'] = "\n".join(data)
243251 sast_issues.append(issue_data)
244252 return sast_issues