# HG changeset patch # User BenoƮt Allard # Date 1412765205 -7200 # Node ID 91d2a97f8bb4448fa928cdbcb3b54b7c2766cb54 # Parent 7998a57c9b48da4337f97d6e93c304e3513740a6 Add some missing elements in the CVRF generation diff -r 7998a57c9b48 -r 91d2a97f8bb4 farolluz/templates/cvrf.j2 --- a/farolluz/templates/cvrf.j2 Wed Oct 08 12:45:19 2014 +0200 +++ b/farolluz/templates/cvrf.j2 Wed Oct 08 12:46:45 2014 +0200 @@ -25,7 +25,7 @@ -{#- Some macros for producttree generation #} +{#- A macro for producttree generation #} {%- macro FullProductNames(producttree, parent) %} {%- for product in producttree._products %} {%- if product._parent is sameas parent %} @@ -36,11 +36,37 @@ {%- endfor %} {%- endmacro %} +{#- Some macros about more generic types #} {%- macro Note(note) -%} {{- note._note | escape -}} -{%- endmacro %} +{%- endmacro -%} + +{%- macro Reference(reference) -%} + + {{ reference._url }} + {{ reference._description }} + +{%- endmacro -%} + +{%- macro Acknowledgment(acknowledgment) -%} + + {%- for name in acknowledgment._names %} + {{ name }} + {%- endfor %} + {%- for organization in acknowledgment._organizations %} + {{ organization }} + {%- endfor %} + {%- if acknowledgment._description %} + {{ acknowledgment._description }} + {%- endif %} + {%- if acknowledgment._url %} + {{ acknowledgment._url }} + {%- endif %} + +{%- endmacro -%} + {{ cvrf._title }} {{ cvrf._type }} @@ -107,30 +133,14 @@ {%- if cvrf._references %} {%- for reference in cvrf._references %} - - {{ reference._url }} - {{ reference._description }} - + {{ Reference(reference) }} {%- endfor %} {%- endif %} {%- if cvrf._acknowledgments %} {%- for acknowledgment in cvrf._acknowledgments %} - - {%- for name in acknowledgment._names %} - {{ name }} - {%- endfor %} - {%- for organization in acknowledgment._organizations %} - {{ organization }} - {%- endfor %} - {%- if acknowledgment._description %} - {{ acknowledgment._description }} - {%- endif %} - {%- if acknowledgment._url %} - {{ acknowledgment._url }} - {%- endif %} - + {{ Acknowledgment(acknowledgment) }} {%- endfor %} {%- endif %} @@ -215,6 +225,21 @@ {%- endfor %} {%- endif %} + {%- if vulnerability._threats %} + + {%- for threat in vulnerability._threats %} + + {{ threat._description }} + {%- for productid in threat._productids %} + {{ productid }} + {%- endfor %} + {%- for groupid in threat._groupids %} + {{ groupid }} + {%- endfor %} + + {%- endfor %} + + {%- endif %} {%- if vulnerability._cvsss %} {%- for cvss in vulnerability._cvsss %} @@ -230,7 +255,7 @@ {{ cvss._vector }} {%- endif %} {%- for productid in cvss._productids %} - {{productid}} + {{ productid }} {%- endfor %} {%- endfor %} @@ -257,6 +282,20 @@ {%- endfor %} {%- endif %} + {%- if vulnerability._references %} + + {%- for reference in vulnerability._references %} + {{ Reference(reference) }} + {%- endfor %} + + {%- endif %} + {%- if vulnerability._acknowledgments %} + + {%- for acknowledgment in vulnerability._acknowledgments %} + {{ Acknowledgment(acknowledgment) }} + {%- endfor %} + + {%- endif %} {%- endfor %}