comparison farolluz/templates/html.j2 @ 37:ba0eb65d4134

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