annotate farolluz/templates/cvrf.j2 @ 1:d47e1164740f

Add support for AggregateSeverity
author Benoît Allard <benoit.allard@greenbone.net>
date Wed, 24 Sep 2014 08:26:56 +0200
parents e18b61a73a68
children c5cf387b5785
rev   line source
0
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
1 {#
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
2 # Description:
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
3 # Template for generation of CVRF documents
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
4 #
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
5 # Authors:
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
6 # BenoƮt Allard <benoit.allard@greenbone.net>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
7 #
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
8 # Copyright:
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
9 # Copyright (C) 2014 Greenbone Networks GmbH
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
10 #
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
11 # This program is free software; you can redistribute it and/or
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
12 # modify it under the terms of the GNU General Public License
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
13 # as published by the Free Software Foundation; either version 2
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
14 # of the License, or (at your option) any later version.
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
15 #
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
16 # This program is distributed in the hope that it will be useful,
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
17 # but WITHOUT ANY WARRANTY; without even the implied warranty of
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
19 # GNU General Public License for more details.
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
20 #
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
21 # You should have received a copy of the GNU General Public License
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
22 # along with this program; if not, write to the Free Software
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
23 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
24 -#}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
25
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
26 <?xml version="1.0" encoding="utf-8"?>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
27
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
28 {#- Some macros for producttree generation #}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
29 {%- macro FullProductNames(producttree, parent) %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
30 {%- for product in producttree._products %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
31 {%- if product._parent is sameas parent %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
32 <FullProductName{{ {'ProductID': product._productid, 'CPE': product._cpe} | xmlattr }}>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
33 {{- product._name -}}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
34 </FullProductName>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
35 {%- endif %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
36 {%- endfor %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
37 {%- endmacro %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
38
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
39 {%- macro Note(note) -%}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
40 <Note{{ {'Type': note._type, 'Ordinal': note._ordinal, 'Title': note._title, 'Audience': note._audience} | xmlattr }}>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
41 {{- note._note | escape -}}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
42 </Note>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
43 {%- endmacro %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
44 <cvrfdoc xmlns="http://www.icasi.org/CVRF/schema/cvrf/1.1">
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
45 <DocumentTitle>{{ cvrf._title }}</DocumentTitle>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
46 <DocumentType>{{ cvrf._type }}</DocumentType>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
47 {%- with publisher = cvrf._publisher %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
48 <DocumentPublisher{{ {'Type': publisher._type, 'VendorID': publisher._vendorid} | xmlattr }}>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
49 {%- if publisher._contact %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
50 <ContactDetails>{{ publisher._contact }}</ContactDetails>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
51 {%- endif %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
52 {%- if publisher._authority %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
53 <IssuingAuthority>{{ publisher._authority }}</IssuingAuthority>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
54 {%- endif %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
55 </DocumentPublisher>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
56 {%- endwith %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
57 {%- with tracking = cvrf._tracking %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
58 <DocumentTracking>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
59 <Identification>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
60 <ID>{{ tracking._identification._id }}</ID>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
61 {%- for alias in tracking._identification._aliases %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
62 <Alias>{{ alias }}</Alias>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
63 {%- endfor %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
64 </Identification>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
65 <Status>{{ tracking._status }}</Status>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
66 <Version>{{ tracking._version | join('.') }}</Version>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
67 <RevisionHistory>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
68 {%- for revision in tracking._history %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
69 <Revision>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
70 <Number>{{ revision._number | join('.') }}</Number>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
71 <Date>{{ revision._date.isoformat() }}</Date>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
72 <Description>{{ revision._description }}</Description>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
73 </Revision>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
74 {%- endfor %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
75 </RevisionHistory>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
76 <InitialReleaseDate>{{ tracking._initialDate.isoformat() }}</InitialReleaseDate>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
77 <CurrentReleaseDate>{{ tracking._currentDate.isoformat() }}</CurrentReleaseDate>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
78 {%- if tracking._generator %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
79 <Generator>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
80 {%- with generator = tracking._generator %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
81 {%- if generator._engine %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
82 <Engine>{{ generator._engine }}</Engine>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
83 {%- endif %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
84 {%- if generator._date %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
85 <Date>{{ generator._date.isoformat() }}</Date>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
86 {%- endif %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
87 {%- endwith %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
88 </Generator>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
89 {%- endif %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
90 </DocumentTracking>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
91 {%- endwith %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
92 {%- if cvrf._notes %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
93 <DocumentNotes>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
94 {%- for note in cvrf._notes %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
95 {{ Note(note) }}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
96 {%- endfor %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
97 </DocumentNotes>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
98 {%- endif %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
99 {%- if cvrf._distribution %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
100 <DocumentDistribution>{{ cvrf._distribution }}</DocumentDistribution>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
101 {%- endif %}
1
d47e1164740f Add support for AggregateSeverity
Benoît Allard <benoit.allard@greenbone.net>
parents: 0
diff changeset
102 {%- if cvrf._aggregateseverity %}
d47e1164740f Add support for AggregateSeverity
Benoît Allard <benoit.allard@greenbone.net>
parents: 0
diff changeset
103 <AggregateSeverity{{ {'Namespace': cvrf._aggregateseverity._namespace} | xmlattr }}>
d47e1164740f Add support for AggregateSeverity
Benoît Allard <benoit.allard@greenbone.net>
parents: 0
diff changeset
104 {{- cvrf._aggregateseverity._severity -}}
d47e1164740f Add support for AggregateSeverity
Benoît Allard <benoit.allard@greenbone.net>
parents: 0
diff changeset
105 </AggregateSeverity>
d47e1164740f Add support for AggregateSeverity
Benoît Allard <benoit.allard@greenbone.net>
parents: 0
diff changeset
106 {%- endif %}
0
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
107 {%- if cvrf._references %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
108 <DocumentReferences>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
109 {%- for reference in cvrf._references %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
110 <Reference{{ {'Type': reference._type} | xmlattr }}>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
111 <URL>{{ reference._url }}</URL>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
112 <Description>{{ reference._description }}</Description>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
113 </Reference>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
114 {%- endfor %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
115 </DocumentReferences>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
116 {%- endif %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
117 {%- if cvrf._acknowledgments %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
118 <Acknowledgments>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
119 {%- for acknowledgment in cvrf._acknowledgments %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
120 <Acknowledgment>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
121 {%- if acknowledgment._name %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
122 <Name>{{ acknowledgment._name }}</Name>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
123 {%- endif %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
124 {%- if acknowledgment._organization %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
125 <Organization>{{ acknowledgment._organization }}</Organization>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
126 {%- endif %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
127 {%- if acknowledgment._description %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
128 <Description>{{ acknowledgment._description }}</Description>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
129 {%- endif %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
130 {%- if acknowledgment._url %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
131 <URL>{{ acknowledgment._url }}</URL>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
132 {%- endif %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
133 </Acknowledgment>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
134 {%- endfor %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
135 </Acknowledgments>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
136 {%- endif %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
137 {%- if cvrf._producttree %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
138 <ProductTree xmlns="http://www.icasi.org/CVRF/schema/prod/1.1">
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
139 {%- with producttree = cvrf._producttree %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
140 {%- for branch in producttree._branches recursive %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
141 <Branch{{ {'Type': branch._type, 'Name': branch._name} | xmlattr }}>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
142 {{- loop(branch._childs) }}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
143 {{- FullProductNames(producttree, branch) }}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
144 </Branch>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
145 {%- endfor %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
146 {{ FullProductNames(producttree, producttree) }}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
147 {%- for relationship in producttree._relationships -%}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
148 <Relationship{{ {'ProductReference': relationship._productreference, 'RelationType': relationship._relationtype, 'RelatesToProductReference': relationship._relatestoproductreference} | xmlattr }}>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
149 {{- FullProductNames(producttree, relationship) }}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
150 </Relationship>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
151 {%- endfor %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
152 {%- if producttree._groups %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
153 <ProductGroups>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
154 {%- for group in producttree._groups %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
155 <Group{{ {'GroupID': group._id} | xmlattr }}>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
156 {%- if group._description %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
157 <Description>{{ group._description }}</Description>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
158 {%- endif %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
159 {%- for productid in group._productids %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
160 <ProductID>{{ productid }}</ProductID>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
161 {%- endfor %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
162 </Group>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
163 {%- endfor %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
164 </ProductGroups>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
165 {%- endif %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
166 {%- endwith %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
167 </ProductTree>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
168 {%- endif %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
169 {%- for vulnerability in cvrf._vulnerabilities %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
170 <Vulnerability xmlns="http://www.icasi.org/CVRF/schema/vuln/1.1" Ordinal="{{ vulnerability._ordinal}}">
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
171 {%- if vulnerability._title %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
172 <Title>{{ vulnerability._title }}</Title>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
173 {%- endif %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
174 {%- if vulnerability._id %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
175 <ID SystemName="{{ vulnerability._id._systemname }}">{{ vulnerability._id._value }}</ID>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
176 {%- endif %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
177 {%- if vulnerability._notes %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
178 <Notes>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
179 {%- for note in vulnerability._notes %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
180 {{ Note(note) }}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
181 {%- endfor %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
182 </Notes>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
183 {%- endif %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
184 {%- if vulnerability._discoverydate %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
185 <DiscoveryDate>{{ vulnerability._discoverydate.isoformat() }}</DiscoveryDate>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
186 {%- endif %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
187 {%- if vulnerability._releasedate %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
188 <ReleaseDate>{{ vulnerability._releasedate.isoformat() }}</ReleaseDate>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
189 {%- endif %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
190 {%- if vulnerability._involvements %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
191 <Involvements>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
192 {%- for involvement in vulnerability._involvements %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
193 <Involvement{{ {'Party': involvement._party, 'Status': involvement._status} | xmlattr }}>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
194 {%- if involvement._description %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
195 <Description>{{ involvement._description }}</Description>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
196 {%- endif %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
197 </Involvement>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
198 {%- endfor %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
199 </Involvements>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
200 {%- endif %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
201 {%- if vulnerability._cve %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
202 <CVE>{{ vulnerability._cve }}</CVE>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
203 {%- endif %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
204 {%- for cwe in vulnerability._cwes %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
205 <CWE ID="{{ cwe._id }}">{{ cwe._value }}</CWE>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
206 {%- endfor %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
207 {%- if vulnerability._productstatuses %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
208 <ProductStatuses>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
209 {%- for status in vulnerability._productstatuses %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
210 <Status Type="{{ status._type }}">
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
211 {%- for productid in status._productids %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
212 <ProductID>{{ productid }}</ProductID>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
213 {%- endfor %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
214 </Status>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
215 {%- endfor %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
216 </ProductStatuses>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
217 {%- endif %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
218 {%- if vulnerability._cvsss %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
219 <CVSSScoreSets>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
220 {%- for cvss in vulnerability._cvsss %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
221 <ScoreSet>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
222 <BaseScore>{{ cvss._basescore }}</BaseScore>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
223 {%- if cvss._temporalscore %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
224 <TemporalScore>{{ cvss._temporalscore }}</TemporalScore>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
225 {%- endif %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
226 {%- if cvss._environmentalscore %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
227 <EnvironmentalScore>{{ cvss._environmentalscore }}</EnvironmentalScore>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
228 {%- endif %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
229 {%- if cvss._vector %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
230 <Vector>{{ cvss._vector }}</Vector>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
231 {%- endif %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
232 {%- for productid in cvss._productids %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
233 <ProductID>{{productid}}</ProductID>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
234 {%- endfor %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
235 </ScoreSet>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
236 {%- endfor %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
237 </CVSSScoreSets>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
238 {%- endif %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
239 {%- if vulnerability._remediations %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
240 <Remediations>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
241 {%- for remediation in vulnerability._remediations %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
242 <Remediation Type="{{ remediation._type }}"{% if remediation._date %} Date="{{ remediation._date.isoformat() }}"{% endif %}>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
243 <Description>{{ remediation._description }}</Description>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
244 {%- if remediation._entitlement %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
245 <Entitlement>{{ remediation._entitlement }}</Entitlement>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
246 {%- endif %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
247 {%- if remediation._url %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
248 <URL>{{ remediation._url }}</URL>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
249 {%- endif %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
250 {%- for productid in remediation._productids %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
251 <ProductID>{{ productid }}</ProductID>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
252 {%- endfor %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
253 {%- for groupid in remediation._groupids %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
254 <GroupID>{{ groupid }}</GroupID>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
255 {%- endfor %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
256 </Remediation>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
257 {%- endfor %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
258 </Remediations>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
259 {%- endif %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
260 </Vulnerability>
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
261 {%- endfor %}
e18b61a73a68 Initial Release
Benoît Allard <benoit.allard@greenbone.net>
parents:
diff changeset
262 </cvrfdoc>
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)