home *** CD-ROM | disk | FTP | other *** search
Wrap
<?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"></xsl:variable> <xsl:template match="SecScan"> <xsl:param name="assess" select="@Grade"/> <table> <tr> <td class="reportsubheader" width="140">Computer name:</td> <td> <xsl:choose> <xsl:when test="@DisplayName"> <xsl:value-of select="@DisplayName"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="@Domain"/>\<xsl:value-of select="@Machine"/> </xsl:otherwise> </xsl:choose> </td> </tr> <tr> <td class="reportsubheader" width="140">IP address:</td> <td><xsl:value-of select="@IP"/></td> </tr> <tr> <td class="reportsubheader" width="140">Security report name:</td> <td><xsl:value-of select="$FileName" /></td> </tr> <xsl:if test="@SUSServer and @SUSServer != ''"> <tr> <td class="reportsubheader" width="140">SUS Server:</td> <td><xsl:value-of select="@SUSServer" /></td> </tr> </xsl:if> <tr> <td class="reportsubheader" width="140">Scan date:</td> <td><xsl:value-of select="@LDate"/></td> </tr> <xsl:choose> <xsl:when test="@HotfixDataVersion"> <tr> <td class="reportsubheader" width="140">Security update database version:</td> <td><xsl:value-of select="@HotfixDataVersion"/> <xsl:if test="NewerVersions/@XmlVer"><b> ** New security updates are available; rescan to use security update database version <xsl:value-of select="NewerVersions/@XmlVer"/> **</b></xsl:if> </td> </tr> </xsl:when> </xsl:choose> <xsl:for-each select="//Check[@DataVersionName and @DataVersion]"> <tr> <td class="reportsubheader" width="140"><xsl:value-of select="@DataVersionName"/></td> <td><xsl:value-of select="@DataVersion"/></td> </tr> </xsl:for-each> <tr> <td class="reportsubheader" width="140">Security assessment:</td> <td><xsl:value-of select="document('')/*/xsl:variable[@name='Assessment']/c[@score=$assess]/@text"/></td> </tr> </table> <xsl:choose> <xsl:when test="Check[@Type='5']"> <br /> <div class="reportheader">Security Updates</div> <xsl:choose> <xsl:when test="Check[@Type='5'][@Cat='1']"> <br /> <table width="100%" style="MARGIN-BOTTOM: 20px;" border="0" cellpadding="0" cellspacing="0"> <tr class="ReportListHeader"> <td style="width:40" align="center"><nobr> Score </nobr></td> <td style="width:80" align="left"><nobr>Issue</nobr></td> <td><nobr>Result</nobr></td> </tr> <xsl:for-each select="."> <xsl:apply-templates select="Check[@Type='5'][@Cat='1']"> <xsl:sort order="sortorder" select="sortfield"/> </xsl:apply-templates> </xsl:for-each> </table> </xsl:when> </xsl:choose> </xsl:when> </xsl:choose> <xsl:choose> <xsl:when test="Check[@Type='1']"> <br /> <div class="reportheader">Windows Scan Results</div> <xsl:choose> <xsl:when test="Check[@Type='1'][@Cat='1']"> <br /> <div class="reportsubheader" style="MARGIN-LEFT: 5px;">Vulnerabilities</div> <br /> <table width="100%" style="MARGIN-BOTTOM: 20px;" border="0" cellpadding="0" cellspacing="0"> <tr class="ReportListHeader"> <td style="width:40" align="center"><nobr> Score </nobr></td> <td style="width:80" align="left"><nobr>Issue</nobr></td> <td><nobr>Result</nobr></td> </tr> <xsl:for-each select="."> <xsl:apply-templates select="Check[@Type='1'][@Cat='1']"> <xsl:sort order="sortorder" select="sortfield"/> </xsl:apply-templates> </xsl:for-each> </table> </xsl:when> </xsl:choose> <xsl:choose> <xsl:when test="Check[@Type='1'][@Cat='2']"> <br /> <div class="reportsubheader" style="MARGIN-LEFT: 5px;">Additional System Information</div> <br /> <table width="100%" style="MARGIN-BOTTOM: 20px" border="0" cellpadding="0" cellspacing="0"> <tr class="ReportListHeader"> <td style="width:40" align="center"><nobr> Score </nobr></td> <td style="width:80" align="left"><nobr>Issue</nobr></td> <td><nobr>Result</nobr></td> </tr> <xsl:for-each select="."> <xsl:apply-templates select="Check[@Type='1'][@Cat='2']"> <xsl:sort order="sortorder" select="sortfield"/> </xsl:apply-templates> </xsl:for-each> </table> </xsl:when> </xsl:choose> </xsl:when> </xsl:choose> <xsl:choose> <xsl:when test="Check[@Type='3']"> <br /> <div class="reportheader">Internet Information Services (IIS) Scan Results</div> <xsl:choose> <xsl:when test="Check[@Type='3'][@Cat='1']"> <br /> <div class="reportsubheader" style="MARGIN-LEFT: 5px;">Vulnerabilities</div> <br /> <table width="100%" style="MARGIN-BOTTOM: 20px" border="0" cellpadding="0" cellspacing="0"> <tr class="ReportListHeader"> <td style="width:40" align="center"><nobr> Score </nobr></td> <td style="width:80" align="left"><nobr>Issue</nobr></td> <td><nobr>Result</nobr></td> </tr> <xsl:for-each select="."> <xsl:apply-templates select="Check[@Type='3'][@Cat='1']"> <xsl:sort order="sortorder" select="sortfield"/> </xsl:apply-templates> </xsl:for-each> </table> </xsl:when> </xsl:choose> <xsl:choose> <xsl:when test="Check[@Type='3'][@Cat='2']"> <br /> <div class="reportsubheader" style="MARGIN-LEFT: 5px;">Additional System Information</div> <br /> <table width="100%" style="MARGIN-BOTTOM: 20px" border="0" cellpadding="0" cellspacing="0"> <tr class="ReportListHeader"> <td style="width:40" align="center"><nobr> Score </nobr></td> <td style="width:80" align="left"><nobr>Issue</nobr></td> <td><nobr>Result</nobr></td> </tr> <xsl:for-each select="."> <xsl:apply-templates select="Check[@Type='3'][@Cat='2']"> <xsl:sort order="sortorder" select="sortfield"/> </xsl:apply-templates> </xsl:for-each> </table> </xsl:when> </xsl:choose> <xsl:choose> <xsl:when test="Check[@Type='3'][@Cat='4']"> <table width="100%" style="MARGIN-BOTTOM: 20px" border="0" cellpadding="0" cellspacing="0"> <tr class="ReportListHeader"> <td style="width:40" align="center"><nobr> Score </nobr></td> <td style="width:80" align="left"><nobr>Issue</nobr></td> <td><nobr>Result</nobr></td> </tr> <xsl:for-each select="."> <xsl:apply-templates select="Check[@Type='3'][@Cat='4']"> <xsl:sort order="sortorder" select="sortfield"/> </xsl:apply-templates> </xsl:for-each> </table> </xsl:when> </xsl:choose> </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']"> <br /> <div class="reportheader">SQL Server Scan Results</div> <xsl:choose> <xsl:when test="Check[@Type='2'][@Cat='1']"> <br /> <div class="reportsubheader" style="MARGIN-LEFT: 5px;">Vulnerabilities</div> <br /> <table width="100%" style="MARGIN-BOTTOM: 20px" border="0" cellpadding="0" cellspacing="0"> <tr class="ReportListHeader"> <td style="width:40" align="center"><nobr> Score </nobr></td> <td style="width:80" align="left"><nobr>Issue</nobr></td> <td><nobr>Result</nobr></td> </tr> <xsl:for-each select="."> <xsl:apply-templates select="Check[@Type='2'][@Cat='1']"> <xsl:sort order="sortorder" select="sortfield"/> </xsl:apply-templates> </xsl:for-each> </table> </xsl:when> </xsl:choose> <xsl:choose> <xsl:when test="Check[@Type='2'][@Cat='2']"> <br /> <div class="reportsubheader" style="MARGIN-LEFT: 5px;">Additional System Information</div> <br /> <table width="100%" style="MARGIN-BOTTOM: 20px" border="0" cellpadding="0" cellspacing="0"> <tr class="ReportListHeader"> <td style="width:40" align="center"><nobr> Score </nobr></td> <td style="width:80" align="left"><nobr>Issue</nobr></td> <td><nobr>Result</nobr></td> </tr> <xsl:for-each select="."> <xsl:apply-templates select="Check[@Type='2'][@Cat='2']"> <xsl:sort order="sortorder" select="sortfield"/> </xsl:apply-templates> </xsl:for-each> </table> </xsl:when> </xsl:choose> <xsl:choose> <xsl:when test="Check[@Type='2'][@Cat='4']"> <table width="100%" style="MARGIN-BOTTOM: 20px" border="0" cellpadding="0" cellspacing="0"> <tr class="ReportListHeader"> <td style="width:40" align="center"><nobr> Score </nobr></td> <td style="width:80" align="left"><nobr>Issue</nobr></td> <td><nobr>Result</nobr></td> </tr> <xsl:for-each select="."> <xsl:apply-templates select="Check[@Type='2'][@Cat='4']"> <xsl:sort order="sortorder" select="sortfield"/> </xsl:apply-templates> </xsl:for-each> </table> </xsl:when> </xsl:choose> </xsl:when> </xsl:choose> <xsl:choose> <xsl:when test="Check[@Type='4']"> <br /> <div class="reportheader">Desktop Application Scan Results</div> <xsl:choose> <xsl:when test="Check[@Type='4'][@Cat='1']"> <br /> <div class="reportsubheader" style="MARGIN-LEFT: 5px;">Vulnerabilities</div> <br /> <table width="100%" style="MARGIN-BOTTOM: 20px" border="0" cellpadding="0" cellspacing="0"> <tr class="ReportListHeader"> <td style="width:40" align="center"><nobr> Score </nobr></td> <td style="width:80" align="left"><nobr>Issue</nobr></td> <td><nobr>Result</nobr></td> </tr> <xsl:for-each select="."> <xsl:apply-templates select="Check[@Type='4'][@Cat='1']"> <xsl:sort order="sortorder" select="sortfield"/> </xsl:apply-templates> </xsl:for-each> </table> </xsl:when> </xsl:choose> <xsl:choose> <xsl:when test="Check[@Type='4'][@Cat='2']"> <br /> <div class="reportsubheader" style="MARGIN-LEFT: 5px;">Additional System Information</div> <br /> <table width="100%" style="MARGIN-BOTTOM: 20px" border="0" cellpadding="0" cellspacing="0"> <tr class="ReportListHeader"> <td style="width:40" align="center"><nobr> Score </nobr></td> <td style="width:80" align="left"><nobr>Issue</nobr></td> <td><nobr>Result</nobr></td> </tr> <xsl:for-each select="."> <xsl:apply-templates select="Check[@Type='4'][@Cat='2']"> <xsl:sort order="sortorder" select="sortfield"/> </xsl:apply-templates> </xsl:for-each> </table> </xsl:when> </xsl:choose> </xsl:when> </xsl:choose> </xsl:template> <xsl:template match="Check"> <xsl:param name="score" select="@Grade"/> <xsl:variable name="bgcolor"> <xsl:choose> <xsl:when test="(position() mod 2) = 1">#8caae6</xsl:when> <xsl:otherwise>#CECFF6</xsl:otherwise> </xsl:choose> </xsl:variable> <tr bgcolor="{$bgcolor}"> <td align="center" valign="middle" style="padding-bottom: 10px;"> <xsl:choose> <xsl:when test="@Cat='2'"> <xsl:choose> <xsl:when test="@ID='121'"> <img alt="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=7]/@alttext}" src="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=7]/@url}" /> </xsl:when> <xsl:when test="@ID='10121'"> <img alt="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=7]/@alttext}" src="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=7]/@url}" /> </xsl:when> <xsl:when test="@ID='101'"> <img alt="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=7]/@alttext}" src="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=7]/@url}" /> </xsl:when> <xsl:when test="@ID='10101'"> <img alt="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=7]/@alttext}" src="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=7]/@url}" /> </xsl:when> <xsl:otherwise> <img alt="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=4]/@alttext}" src="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=4]/@url}" /> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise> <img alt="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=$score]/@alttext}" src="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=$score]/@url}" /> </xsl:otherwise> </xsl:choose> </td> <td width="75" style="padding-bottom: 10px;"><xsl:value-of select="@Name"/></td> <td style="padding-bottom: 10px;"> <TABLE width="100%"> <TR> <TD align="left" colspan="3"><xsl:value-of select="Advice"/></TD> </TR> <xsl:choose> <xsl:when test="Detail"> <TR> <TD> <table width="100%" border="0" cellpadding="0" cellspacing="0" style="padding-left: 10px; padding-right: 10px;"> <tr class="ReportListHeader"> <xsl:for-each select="Detail/Head/Col"> <td Nowrap="true"> <xsl:value-of select="."/> </td> </xsl:for-each> </tr> <xsl:for-each select="Detail"> <xsl:apply-templates select="Row"> </xsl:apply-templates> </xsl:for-each> </table> </TD> </TR> </xsl:when> </xsl:choose> </TABLE> <br/> </td> </tr> </xsl:template> <xsl:template match="Row"> <xsl:param name="score" select="@Grade"/> <tr> <xsl:for-each select="Col"> <td valign="top" style="padding-bottom: 5px;"> <xsl:choose> <xsl:when test="@URL and @URL != '' and @URL != ' '"> <A href="{@URL}"><xsl:value-of select="."/></A> </xsl:when> <xsl:otherwise> <xsl:value-of select="."/> </xsl:otherwise> </xsl:choose> <xsl:if test="@REQUIREDNAME"> <br/><div class="halignlikea">This update requires <xsl:value-of select="@REQUIREDNAME"/> to be installed first.</div> </xsl:if> </td> </xsl:for-each> </tr> <xsl:apply-templates select="SETTINGS"> </xsl:apply-templates> </xsl:template> <xsl:template match="SETTINGS"> <xsl:param name="numCols" select="count(Head/Col)"/> <tr> <td colspan="4"> <table width="100%" border="0" cellpadding="0" cellspacing="0" style="padding-left: 10px; padding-right: 10px;"> <tr class="ReportListHeader"> <xsl:for-each select="Head/Col"> <td Nowrap="true"> <B><xsl:value-of select="."/></B> </td> </xsl:for-each> </tr> <xsl:apply-templates select="Row"> </xsl:apply-templates> </table> </td> </tr> </xsl:template> <!-- SQL Instance section --> <xsl:template match="SQLInstance"> <br /> <div class="reportheader">SQL Server Scan Results: Instance <xsl:value-of select="@Name"/></div> <xsl:choose> <xsl:when test="Check[@Type='2'][@Cat='1']"> <br /> <div class="reportsubheader" style="MARGIN-LEFT: 5px;">Vulnerabilities</div> <br /> <table width="100%" style="MARGIN-BOTTOM: 20px" border="0" cellpadding="0" cellspacing="0"> <tr class="ReportListHeader"> <td style="width:40" align="center"><nobr> Score </nobr></td> <td style="width:80" align="left"><nobr>Issue</nobr></td> <td><nobr>Result</nobr></td> </tr> <xsl:for-each select="."> <xsl:apply-templates select="Check[@Type='2'][@Cat='1']"> <xsl:sort order="sortorder" select="sortfield"/> </xsl:apply-templates> </xsl:for-each> </table> </xsl:when> </xsl:choose> <xsl:choose> <xsl:when test="Check[@Type='2'][@Cat='2']"> <br /> <div class="reportsubheader" style="MARGIN-LEFT: 5px;">Additional System Information</div> <br /> <table width="100%" style="MARGIN-BOTTOM: 20px" border="0" cellpadding="0" cellspacing="0"> <tr class="ReportListHeader"> <td style="width:40" align="center"><nobr> Score </nobr></td> <td style="width:80" align="left"><nobr>Issue</nobr></td> <td><nobr>Result</nobr></td> </tr> <xsl:for-each select="."> <xsl:apply-templates select="Check[@Type='2'][@Cat='2']"> <xsl:sort order="sortorder" select="sortfield"/> </xsl:apply-templates> </xsl:for-each> </table> </xsl:when> </xsl:choose> <xsl:choose> <xsl:when test="Check[@Type='2'][@Cat='4']"> <table width="100%" style="MARGIN-BOTTOM: 20px" border="0" cellpadding="0" cellspacing="0"> <tr class="ReportListHeader"> <td style="width:40" align="center"><nobr> Score </nobr></td> <td style="width:80" align="left"><nobr>Issue</nobr></td> <td><nobr>Result</nobr></td> </tr> <xsl:for-each select="."> <xsl:apply-templates select="Check[@Type='2'][@Cat='4']"> <xsl:sort order="sortorder" select="sortfield"/> </xsl:apply-templates> </xsl:for-each> </table> </xsl:when> </xsl:choose> </xsl:template> </xsl:stylesheet>