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