# HG changeset patch # User BenoƮt Allard # Date 1418743250 -3600 # Node ID cb8e8416a765a25c9761784692e0be7efc686b66 # Parent a94fd33db44a5b12933b8e90c48d1cb3ae6e1159 Add HTML export format. diff -r a94fd33db44a -r cb8e8416a765 farolluz/renderer.py --- a/farolluz/renderer.py Wed Nov 05 08:54:53 2014 +0100 +++ b/farolluz/renderer.py Tue Dec 16 16:20:50 2014 +0100 @@ -51,7 +51,7 @@ 'Red Hat Enterprise Linux AS (Advanced Server) version 2.1' : 'RHENT_2.1', } -def calculateRiskFactor(cvss_score, debug=0): +def calculateRiskFactor(cvss_score): """ Calculates and Return Risk Factor given CVSS Base Score """ diff -r a94fd33db44a -r cb8e8416a765 farolluz/templates/html.j2 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/farolluz/templates/html.j2 Tue Dec 16 16:20:50 2014 +0100 @@ -0,0 +1,87 @@ + + + + + + {{ cvrf._title }} + + + +
+
+

{{ cvrf._title }}

+

{{ cvrf._type }}

+
+ {%- for note in cvrf._notes %} +
+

{{ note._title if note._title else note._type }}

+

{{ note._description }}

+
+ {%- endfor %} + {%- for vuln in cvrf._vulnerabilities %}{% for note in vuln._notes %} +
+

{{ note._title if note._title else note._type }}

+

{{ note._note }}

+
+ {%- endfor %}{% endfor %} +
+

Affected

+
    + {%- for vuln in cvrf._vulnerabilities %} + {%- for status in vuln._productstatuses %} +
  • {{status._type}}: {% set comma = joiner(', ') %} + {%- for prodid in status._productids %} + {%- with product = cvrf.getProductForID(prodid) %} + {{- comma() }}{{ product._name }} + {%- endwith %} + {%- endfor -%} +
  • + {%- endfor %} + {%- endfor %} +
+
+ {%- with cvss = cvrf.getHighestCVSS() %}{% if cvss %} +
+

Severity

+

{{ cvss._vector }} ({{ cvss._basescore }} - {{ cvss._basescore | risk_factor }})

+

+ {%- endif %}{% endwith %} +
+

Resolution

+ {%- for vuln in cvrf._vulnerabilities %} + {%- for rem in vuln._remediations %} +
+

{{ rem._type }}

+

{{ rem._description }}

+
+ {%- endfor %} + {%- endfor %} +
+
+

References

+
    + {%- for ref in cvrf._references if not ref._type == 'Self' %} +
  • {{ ref }}
  • + {%- endfor %} + {%- for vuln in cvrf._vulnerabilities %} + {%- for ref in vuln._references if not ref._type == 'Self' %} +
  • {{ ref }}
  • + {%- endfor %} + {%- if vuln._cve %} +
  • {{ vuln._cve }}
  • + {%- endif %} + {%- endfor %} +
+
+
+

History

+
    + {%- for revision in cvrf._tracking._history %} +
  • {{ revision._date.strftime('%Y-%m-%d')}}: {{ revision._description }}
  • + {%- endfor %} +
+
+
+ + +