-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathsecurity.xslt
94 lines (73 loc) · 2.58 KB
/
security.xslt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) Igor Sysoev
Copyright (C) Nginx, Inc.
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="security"> <ul> <xsl:apply-templates/> </ul> </xsl:template>
<xsl:template match="security/item">
<li>
<p>
<xsl:value-of select="@name"/><br/>
<xsl:choose><xsl:when test="@severity = 'major'">
<xsl:text>Severity: </xsl:text> <b><xsl:value-of select="@severity"/></b><br/>
</xsl:when><xsl:otherwise>
<xsl:text>Severity: </xsl:text> <xsl:value-of select="@severity"/><br/>
</xsl:otherwise></xsl:choose>
<xsl:if test="@advisory">
<a href="{@advisory}"> <xsl:text>Advisory</xsl:text> </a>
<br/>
</xsl:if>
<xsl:if test="@cert">
<a>
<xsl:attribute name="href">
<xsl:text>http://www.kb.cert.org/vuls/id/</xsl:text> <xsl:value-of select="@cert"/>
</xsl:attribute>
<xsl:text>VU#</xsl:text> <xsl:value-of select="@cert"/>
</a>
</xsl:if>
<xsl:if test="@cve">
<xsl:if test="@cert">
<xsl:text>  </xsl:text>
</xsl:if>
<a>
<xsl:attribute name="href">
<xsl:text>https://www.cve.org/CVERecord?id=CVE-</xsl:text> <xsl:value-of select="@cve"/>
</xsl:attribute>
<xsl:text>CVE-</xsl:text> <xsl:value-of select="@cve"/>
</a>
</xsl:if>
<xsl:if test="@core">
<xsl:if test="@cert or @cve">
<xsl:text>  </xsl:text>
</xsl:if>
<a href="{@href}"> <xsl:value-of select="@core"/> </a>
</xsl:if>
<xsl:if test="@cert or @cve or @core">
<br/>
</xsl:if>
<xsl:text>Not vulnerable: </xsl:text> <xsl:value-of select="@good"/> <br/>
<xsl:text>Vulnerable: </xsl:text> <xsl:value-of select="@vulnerable"/>
<xsl:for-each select="patch">
<br/>
<a>
<xsl:attribute name="href">
<xsl:text>/download/</xsl:text> <xsl:value-of select="@name"/>
</xsl:attribute>
<xsl:text>The patch</xsl:text>
</a>
<xsl:text>  </xsl:text>
<a>
<xsl:attribute name="href">
<xsl:text>/download/</xsl:text> <xsl:value-of select="@name"/> <xsl:text>.asc</xsl:text>
</xsl:attribute>
<xsl:text>pgp</xsl:text>
</a>
<xsl:if test="@versions">
<xsl:text>  (for </xsl:text> <xsl:value-of select="@versions"/> <xsl:text>)</xsl:text>
</xsl:if>
</xsl:for-each>
</p>
</li>
</xsl:template>
</xsl:stylesheet>