home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2004 September
/
Chip_2004-09_cd1.bin
/
zkuste
/
system
/
download
/
secanal
/
MBSASetup-en.msi
/
Data.Cab
/
copyreporttxt.xsl
< prev
next >
Wrap
Extensible Markup Language
|
2004-01-16
|
13KB
|
176 lines
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:variable name="ScoreLookup">
<c score="0" url="Graphics/dash.gif" alttext="Check Not Performed"/>
<c score="1" url="Graphics/excl_red.gif" alttext="Unable to scan"/>
<c score="2" url="Graphics/x_red.gif" alttext="Check failed (critical)"/>
<c score="3" url="Graphics/x_gold.gif" alttext="Check failed (non-critical)"/>
<c score="4" url="Graphics/astrx.gif" alttext="Best practice"/>
<c score="5" url="Graphics/chek_grn.gif" alttext="Check passed"/>
<c score="6" url="Graphics/dash.gif" alttext="Check not performed"/>
<c score="7" url="Graphics/info.gif" alttext="Additional information"/>
</xsl:variable>
<xsl:variable name="Assessment">
<c score="1" text="Incomplete Scan" longtext="Could not complete one or more requested checks."/>
<c score="2" text="Severe Risk" longtext="One or more critical checks failed."/>
<c score="3" text="Potential Risk" longtext="One or more non-critical checks failed."/>
<c score="4" text="Security FYIs" longtext=""/>
<c score="5" text="Strong Security" longtext="All checks were passed."/>
</xsl:variable>
<xsl:variable name="FileName">FileNameHere</xsl:variable>
<xsl:template match="SecScan">
<xsl:choose>
<xsl:when test="Check[@Type='5'][@Cat='1']">
<xsl:for-each select="Check[@Type='5'][@Cat='1']">
<xsl:sort order="sortorder" select="sortfield"/>
<xsl:variable name="score" select="@Grade"/>
Security updates<xsl:text disable-output-escaping="yes"> </xsl:text>Vulnerabilities<xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=$score]/@alttext"/><xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="@Name"/><xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="Advice"/></xsl:for-each>
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when test="Check[@Type='1'][@Cat='1']">
<xsl:for-each select="Check[@Type='1'][@Cat='1']">
<xsl:sort order="sortorder" select="sortfield"/>
<xsl:variable name="score" select="@Grade"/>
Windows Scan Results<xsl:text disable-output-escaping="yes"> </xsl:text>Vulnerabilities<xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=$score]/@alttext"/><xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="@Name"/><xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="Advice"/></xsl:for-each>
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when test="Check[@Type='1'][@Cat='2']">
<xsl:for-each select="Check[@Type='1'][@Cat='2']">
<xsl:sort order="sortorder" select="sortfield"/>
<xsl:variable name="score" select="@Grade"/>
<xsl:choose>
<xsl:when test="@ID='121'">
Windows Scan Results<xsl:text disable-output-escaping="yes"> </xsl:text>Additional System Information<xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=7]/@alttext" /><xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="@Name"/><xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="Advice"/>
</xsl:when>
<xsl:when test="@ID='10121'">
Windows Scan Results<xsl:text disable-output-escaping="yes"> </xsl:text>Additional System Information<xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=7]/@alttext" /><xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="@Name"/><xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="Advice"/>
</xsl:when>
<xsl:when test="@ID='101'">
Windows Scan Results<xsl:text disable-output-escaping="yes"> </xsl:text>Additional System Information<xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=7]/@alttext" /><xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="@Name"/><xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="Advice"/>
</xsl:when>
<xsl:when test="@ID='10101'">
Windows Scan Results<xsl:text disable-output-escaping="yes"> </xsl:text>Additional System Information<xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=7]/@alttext" /><xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="@Name"/><xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="Advice"/>
</xsl:when>
<xsl:otherwise>
Windows Scan Results<xsl:text disable-output-escaping="yes"> </xsl:text>Additional System Information<xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=$score]/@alttext" /><xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="@Name"/><xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="Advice"/>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when test="Check[@Type='3'][@Cat='1']">
<xsl:for-each select="Check[@Type='3'][@Cat='1']">
<xsl:sort order="sortorder" select="sortfield"/>
<xsl:variable name="score" select="@Grade"/>
Internet Information Services (IIS) Scan Results<xsl:text disable-output-escaping="yes"> </xsl:text>Vulnerabilities<xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=$score]/@alttext"/><xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="@Name"/><xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="Advice"/></xsl:for-each>
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when test="Check[@Type='3'][@Cat='2']">
<xsl:for-each select="Check[@Type='3'][@Cat='2']">
<xsl:sort order="sortorder" select="sortfield"/>
<xsl:variable name="score" select="@Grade"/>
Internet Information Services (IIS) Scan Results<xsl:text disable-output-escaping="yes"> </xsl:text>Additional System Information<xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=4]/@alttext" /><xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="@Name"/><xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="Advice"/></xsl:for-each>
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when test="Check[@Type='3'][@Cat='4']">
<xsl:for-each select="Check[@Type='3'][@Cat='4']">
<xsl:sort order="sortorder" select="sortfield"/>
<xsl:variable name="score" select="@Grade"/>
Internet Information Services (IIS) Scan Results<xsl:text disable-output-escaping="yes"> </xsl:text>Additional System Information<xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=4]/@alttext" /><xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="@Name"/><xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="Advice"/></xsl:for-each>
</xsl:when>
</xsl:choose>
<!-- One tag per SQL Instance, MBSA V1.1 and later -->
<xsl:choose>
<xsl:when test="SQLInstance">
<xsl:for-each select=".">
<xsl:apply-templates select="SQLInstance"/>
</xsl:for-each>
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when test="Check[@Type='2'][@Cat='1']">
<xsl:for-each select="Check[@Type='2'][@Cat='1']">
<xsl:sort order="sortorder" select="sortfield"/>
<xsl:variable name="score" select="@Grade"/>
SQL Server Scan Results<xsl:text disable-output-escaping="yes"> </xsl:text>Vulnerabilities<xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=$score]/@alttext"/><xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="@Name"/><xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="Advice"/></xsl:for-each>
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when test="Check[@Type='2'][@Cat='2']">
<xsl:for-each select="Check[@Type='2'][@Cat='2']">
<xsl:sort order="sortorder" select="sortfield"/>
<xsl:variable name="score" select="@Grade"/>
SQL Server Scan Results<xsl:text disable-output-escaping="yes"> </xsl:text>Additional System Information<xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=4]/@alttext" /><xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="@Name"/><xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="Advice"/></xsl:for-each>
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when test="Check[@Type='2'][@Cat='4']">
<xsl:for-each select="Check[@Type='2'][@Cat='4']">
<xsl:sort order="sortorder" select="sortfield"/>
<xsl:variable name="score" select="@Grade"/>
SQL Server Scan Results<xsl:text disable-output-escaping="yes"> </xsl:text>Product Status<xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=4]/@alttext" /><xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="@Name"/><xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="Advice"/></xsl:for-each>
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when test="Check[@Type='4'][@Cat='1']">
<xsl:for-each select="Check[@Type='4'][@Cat='1']">
<xsl:sort order="sortorder" select="sortfield"/>
<xsl:variable name="score" select="@Grade"/>
Desktop Application Scan Results<xsl:text disable-output-escaping="yes"> </xsl:text>Vulnerabilities<xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=$score]/@alttext"/><xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="@Name"/><xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="Advice"/></xsl:for-each>
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when test="Check[@Type='4'][@Cat='2']">
<xsl:for-each select="Check[@Type='4'][@Cat='2']">
<xsl:sort order="sortorder" select="sortfield"/>
<xsl:variable name="score" select="@Grade"/>
Desktop Application Scan Results<xsl:text disable-output-escaping="yes"> </xsl:text>Additional System Information<xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=4]/@alttext" /><xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="@Name"/><xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="Advice"/></xsl:for-each>
</xsl:when>
</xsl:choose>
</xsl:template>
<!-- SQL Instance section -->
<xsl:template match="SQLInstance">
<xsl:variable name="instance" select="@Name"/>
<xsl:choose>
<xsl:when test="Check[@Type='2'][@Cat='1']">
<xsl:for-each select="Check[@Type='2'][@Cat='1']">
<xsl:sort order="sortorder" select="sortfield"/>
<xsl:variable name="score" select="@Grade"/>
SQL Server Instance: <xsl:value-of select="$instance"/><xsl:text disable-output-escaping="yes"> </xsl:text>Vulnerabilities<xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=$score]/@alttext"/><xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="@Name"/><xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="Advice"/></xsl:for-each>
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when test="Check[@Type='2'][@Cat='2']">
<xsl:for-each select="Check[@Type='2'][@Cat='2']">
<xsl:sort order="sortorder" select="sortfield"/>
<xsl:variable name="score" select="@Grade"/>
SQL Server Instance: <xsl:value-of select="$instance"/><xsl:text disable-output-escaping="yes"> </xsl:text>Additional System Information<xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=4]/@alttext" /><xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="@Name"/><xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="Advice"/></xsl:for-each>
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when test="Check[@Type='2'][@Cat='4']">
<xsl:for-each select="Check[@Type='2'][@Cat='4']">
<xsl:sort order="sortorder" select="sortfield"/>
<xsl:variable name="score" select="@Grade"/>
SQL Server Instance: <xsl:value-of select="$instance"/><xsl:text disable-output-escaping="yes"> </xsl:text>Product Status<xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=4]/@alttext" /><xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="@Name"/><xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="Advice"/></xsl:for-each>
</xsl:when>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>