comparison farolluz/templates/html.j2 @ 36:cb8e8416a765

Add HTML export format.
author Benoît Allard <benoit.allard@greenbone.net>
date Tue, 16 Dec 2014 16:20:50 +0100
parents
children ba0eb65d4134
comparison
equal deleted inserted replaced
35:a94fd33db44a 36:cb8e8416a765
1 <!DOCTYPE html>
2 <html>
3
4 <head>
5 <meta charset="utf-8">
6 <title>{{ cvrf._title }}</title>
7 </head>
8
9 <body>
10 <article>
11 <header>
12 <h1>{{ cvrf._title }}</h1>
13 <h2>{{ cvrf._type }}</h2>
14 </header>
15 {%- for note in cvrf._notes %}
16 <section>
17 <h3>{{ note._title if note._title else note._type }}</h3>
18 <p>{{ note._description }}</p>
19 </section>
20 {%- endfor %}
21 {%- for vuln in cvrf._vulnerabilities %}{% for note in vuln._notes %}
22 <section>
23 <h3>{{ note._title if note._title else note._type }}</h3>
24 <p>{{ note._note }}</p>
25 </section>
26 {%- endfor %}{% endfor %}
27 <section>
28 <h3>Affected</h3>
29 <ul>
30 {%- for vuln in cvrf._vulnerabilities %}
31 {%- for status in vuln._productstatuses %}
32 <li>{{status._type}}: {% set comma = joiner(', ') %}
33 {%- for prodid in status._productids %}
34 {%- with product = cvrf.getProductForID(prodid) %}
35 {{- comma() }}{{ product._name }}
36 {%- endwith %}
37 {%- endfor -%}
38 </li>
39 {%- endfor %}
40 {%- endfor %}
41 </ul>
42 </section>
43 {%- with cvss = cvrf.getHighestCVSS() %}{% if cvss %}
44 <section>
45 <h3>Severity</h3>
46 <p><tt>{{ cvss._vector }}</tt> ({{ cvss._basescore }} - {{ cvss._basescore | risk_factor }})<p>
47 </section>
48 {%- endif %}{% endwith %}
49 <section>
50 <h3>Resolution</h3>
51 {%- for vuln in cvrf._vulnerabilities %}
52 {%- for rem in vuln._remediations %}
53 <section>
54 <h4>{{ rem._type }}</h4>
55 <p>{{ rem._description }}</p>
56 </section>
57 {%- endfor %}
58 {%- endfor %}
59 </section>
60 <section>
61 <h3>References</h3>
62 <ul>
63 {%- for ref in cvrf._references if not ref._type == 'Self' %}
64 <li>{{ ref }}</li>
65 {%- endfor %}
66 {%- for vuln in cvrf._vulnerabilities %}
67 {%- for ref in vuln._references if not ref._type == 'Self' %}
68 <li>{{ ref }}</li>
69 {%- endfor %}
70 {%- if vuln._cve %}
71 <li>{{ vuln._cve }}</li>
72 {%- endif %}
73 {%- endfor %}
74 </ul>
75 </section>
76 <section>
77 <h3>History</h3>
78 <ul>
79 {%- for revision in cvrf._tracking._history %}
80 <li>{{ revision._date.strftime('%Y-%m-%d')}}: {{ revision._description }}</li>
81 {%- endfor %}
82 </ul>
83 </section>
84 </article>
85 </body>
86
87 </html>
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)