Open khalilgharbaoui opened 2 years ago
@khalilgharbaoui I play around with a fork of the project as I need a few changes. How should the markdown look? A table view is complex as the line breaks destroy the markdown table. I tested the following solution:
{% for vuln in vulnerabilities|sort(attribute='severity') -%}
# {{loop.index}} - {{vuln.severity}} - {{vuln.location.file}}
{% if vuln.message -%}
## Message
{{vuln.description}}
{% endif -%}
{% if vuln.description -%}
## Description
{{vuln.description}}
{% endif -%}
## Location
{{vuln.location.file}}{% if vuln.location.start_line %}:{{vuln.location.start_line}}{% if vuln.location.end_line and vuln.location.start_line < vuln.location.end_line %} - {{vuln.location.end_line}}{% endif %}{% endif %}
{% endfor -%}
Also, I am not sure about the plain text. How this should be structured? I don`t think that plain text would be useful.
Would be great if one could have a flag/option to output Markdown or Plain Text example:
sast-parser --html gl-sast-report.json
(default)sast-parser --markdown gl-sast-report.json
sast-parser --text gl-sast-report.json