# HG changeset patch # User BenoƮt Allard # Date 1418811185 -3600 # Node ID ba0eb65d413495f7c86594c9913bb9012e5934b1 # Parent cb8e8416a765a25c9761784692e0be7efc686b66 HTML: Make one article per Vulnerability diff -r cb8e8416a765 -r ba0eb65d4134 farolluz/templates/html.j2 --- a/farolluz/templates/html.j2 Tue Dec 16 16:20:50 2014 +0100 +++ b/farolluz/templates/html.j2 Wed Dec 17 11:13:05 2014 +0100 @@ -9,8 +9,10 @@
-

{{ cvrf._title }}

-

{{ cvrf._type }}

+
+

{{ cvrf._title }}

+

{{ cvrf._type }}

+
{%- for note in cvrf._notes %}
@@ -18,61 +20,59 @@

{{ 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 %} + {%- for vuln in cvrf._vulnerabilities %} +
    +
    + {%- if vuln._title %}

    {{ vuln._title }}

    {% endif %} + {%- if vuln._cve %}

    {{ vuln._cve }}

    {% endif %} +
    + {%- for note in vuln._notes %} +
    +

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

    +

    {{ note._note }}

    +
    {%- 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 }}

+

Affected

+
    + {%- 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 %} - {%- 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 }}
  • + {%- with cvss = vuln._cvss %}{% if cvss %} +
    +

    Severity

    +

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

    +

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

    Resolution

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

    {{ rem._type }}

    +

    {{ rem._description }}

    +
    {%- endfor %} - {%- if vuln._cve %} -
  • {{ vuln._cve }}
  • - {%- endif %} - {%- endfor %} -
-
+ + {%- if vuln._references %} +
+

References

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

History

+ {%- if cvrf._references %} +
+

References

+ +
+ {%- endif %}