This update to the table transform will show (with a thick green line) when an OVAL check has been tested for each Rule. This can probably get far more complete-looking if the templated checks are tested.
(Did we ever fix the OVAL check for system services, such that only runlevel 2-5 were disabled?)
It also shows the Rule ID for each Rule now, which is the stable identifier for each Rule.
Jeffrey Blank (2): made CSS adjustments to make <pre> wrap improved table to indicate when OVAL checks have been tested
RHEL6/transforms/table-style.xslt | 5 ++++ RHEL6/transforms/xccdf2table-profileccirefs.xslt | 27 +++++++++++++++++----- 2 files changed, 26 insertions(+), 6 deletions(-)
Signed-off-by: Jeffrey Blank blank@eclipse.ncsc.mil --- RHEL6/transforms/table-style.xslt | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/RHEL6/transforms/table-style.xslt b/RHEL6/transforms/table-style.xslt index b099adc..b2c4353 100644 --- a/RHEL6/transforms/table-style.xslt +++ b/RHEL6/transforms/table-style.xslt @@ -19,6 +19,11 @@ font-family: verdana,arial,sans-serif; font-size:11px; } + pre { + white-space: pre-wrap; + white-space: -moz-pre-wrap !important; + word-wrap:break-word; + } table tr:nth-child(2n+2) { background-color: #f4f4f4; } thead {
On 8/20/13 12:41 AM, Jeffrey Blank wrote:
Signed-off-by: Jeffrey Blank blank@eclipse.ncsc.mil
RHEL6/transforms/table-style.xslt | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/RHEL6/transforms/table-style.xslt b/RHEL6/transforms/table-style.xslt index b099adc..b2c4353 100644 --- a/RHEL6/transforms/table-style.xslt +++ b/RHEL6/transforms/table-style.xslt @@ -19,6 +19,11 @@ font-family: verdana,arial,sans-serif; font-size:11px; }
pre {white-space: pre-wrap;white-space: -moz-pre-wrap !important;word-wrap:break-word; table tr:nth-child(2n+2) { background-color: #f4f4f4; } thead {}
ack
Signed-off-by: Jeffrey Blank blank@eclipse.ncsc.mil --- RHEL6/transforms/xccdf2table-profileccirefs.xslt | 27 +++++++++++++++++----- 1 files changed, 21 insertions(+), 6 deletions(-)
diff --git a/RHEL6/transforms/xccdf2table-profileccirefs.xslt b/RHEL6/transforms/xccdf2table-profileccirefs.xslt index a5ad223..fa26020 100644 --- a/RHEL6/transforms/xccdf2table-profileccirefs.xslt +++ b/RHEL6/transforms/xccdf2table-profileccirefs.xslt @@ -1,10 +1,11 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cdf="http://checklists.nist.gov/xccdf/1.1" xmlns:cci="http://iase.disa.mil/cci" xmlns:xhtml="http://www.w3.org/1999/xhtml%22%3E +<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cdf="http://checklists.nist.gov/xccdf/1.1" xmlns:cci="http://iase.disa.mil/cci" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:ovalns="http://oval.mitre.org/XMLSchema/oval-definitions-5%22%3E
<!-- this style sheet expects parameter $profile, which is the id of the Profile to be shown -->
<xsl:variable name="cci_list" select="document('../references/disa-cci-list.xml')/cci:cci_list" /> <xsl:variable name="os_srg" select="document('../references/disa-os-srg-v1r1.xml')/cdf:Benchmark" /> +<xsl:variable name="ovaldefs" select="document('../output/unlinked-rhel6-oval.xml')/ovalns:oval_definitions" />
<xsl:param name="testinfo" select="''" /> <xsl:param name="format" select="''"/> @@ -36,7 +37,6 @@ <thead> <td>ID</td> <td>Severity</td> - <!-- <td>GEN ID</td> --> <td>Title</td> <td>Discussion (Rationale)</td> <td>Fix Text (Description)</td> @@ -66,8 +66,12 @@ <xsl:param name="idreference" /> <xsl:param name="enabletest" /> <xsl:if test="@id=$idreference and $enabletest='true'"> + <!-- get related OVAL check info --> + <xsl:variable name="ovalcheckid" select="cdf:check[@system=$ovaluri]/cdf:check-content-ref/@name" /> + <xsl:variable name="ovalcheck" select="$ovaldefs/ovalns:definitions/ovalns:definition[@id=$ovalcheckid]" /> + <tr> - <td>TBD<!-- insert proper Vuln-ID if available --></td> + <td> <xsl:value-of select="@id" /></td> <td> <xsl:value-of select="@severity" /></td> <td> <xsl:value-of select="cdf:title" /></td> <!-- call template to grab text and also child nodes (which should all be xhtml) --> @@ -77,8 +81,13 @@ <td> <!-- print pretty visual indication of testing data --> <xsl:if test="$testinfo and cdf:reference[@href='test_attestation']"> - <!-- add green border on left if test attestation found --> - <xsl:attribute name="style">border-left:solid thick lime</xsl:attribute> + <!-- add green border on left if manual test attestation found --> + <xsl:attribute name="style">border-left:solid medium lime</xsl:attribute> + </xsl:if> + + <xsl:if test="$testinfo and $ovalcheck/ovalns:metadata/ovalns:reference[@ref_url='test_attestation']"> + <!-- add thicker green border on left if manual and OVAL test attestation found --> + <xsl:attribute name="style">border-left:solid 15px limegreen</xsl:attribute> </xsl:if>
<!-- print the manual check text --> @@ -86,8 +95,14 @@
<!-- print the test attestation info --> <xsl:if test="$testinfo"> + <!-- in the XCCDF --> <xsl:for-each select="cdf:reference[@href='test_attestation']"> - <br/><br/><i>Tested on <xsl:value-of select="dc:date"/> by <xsl:value-of select="dc:contributor"/>.</i> + <br/><br/><i>Manual check tested on <xsl:value-of select="dc:date"/> by <xsl:value-of select="dc:contributor"/>.</i> + </xsl:for-each> + <!-- in the associated OVAL --> + <xsl:for-each select="$ovalcheck/ovalns:metadata/ovalns:reference[@ref_url='test_attestation']"> + <xsl:variable name="curr" select="current()"/> + <br/><i>OVAL check tested on <xsl:value-of select="$curr/@ref_id"/> by <xsl:value-of select="$curr/@source"/>.</i> </xsl:for-each> </xsl:if> </td>
On 8/20/13 12:41 AM, Jeffrey Blank wrote:
Signed-off-by: Jeffrey Blank blank@eclipse.ncsc.mil
RHEL6/transforms/xccdf2table-profileccirefs.xslt | 27 +++++++++++++++++----- 1 files changed, 21 insertions(+), 6 deletions(-)
diff --git a/RHEL6/transforms/xccdf2table-profileccirefs.xslt b/RHEL6/transforms/xccdf2table-profileccirefs.xslt index a5ad223..fa26020 100644 --- a/RHEL6/transforms/xccdf2table-profileccirefs.xslt +++ b/RHEL6/transforms/xccdf2table-profileccirefs.xslt @@ -1,10 +1,11 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cdf="http://checklists.nist.gov/xccdf/1.1" xmlns:cci="http://iase.disa.mil/cci" xmlns:xhtml="http://www.w3.org/1999/xhtml%22%3E +<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cdf="http://checklists.nist.gov/xccdf/1.1" xmlns:cci="http://iase.disa.mil/cci" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:ovalns="http://oval.mitre.org/XMLSchema/oval-definitions-5%22%3E
<!-- this style sheet expects parameter $profile, which is the id of the Profile to be shown -->
<xsl:variable name="cci_list" select="document('../references/disa-cci-list.xml')/cci:cci_list" /> <xsl:variable name="os_srg" select="document('../references/disa-os-srg-v1r1.xml')/cdf:Benchmark" /> +<xsl:variable name="ovaldefs" select="document('../output/unlinked-rhel6-oval.xml')/ovalns:oval_definitions" />
<xsl:param name="testinfo" select="''" /> <xsl:param name="format" select="''"/> @@ -36,7 +37,6 @@ <thead> <td>ID</td> <td>Severity</td>
<!-- <td>GEN ID</td> --> <td>Title</td> <td>Discussion (Rationale)</td> <td>Fix Text (Description)</td>@@ -66,8 +66,12 @@ <xsl:param name="idreference" /> <xsl:param name="enabletest" /> <xsl:if test="@id=$idreference and $enabletest='true'">
<!-- get related OVAL check info --><xsl:variable name="ovalcheckid" select="cdf:check[@system=$ovaluri]/cdf:check-content-ref/@name" /><xsl:variable name="ovalcheck" select="$ovaldefs/ovalns:definitions/ovalns:definition[@id=$ovalcheckid]" /><tr>
<td>TBD<!-- insert proper Vuln-ID if available --></td>
<td> <xsl:value-of select="@id" /></td> <td> <xsl:value-of select="@severity" /></td> <td> <xsl:value-of select="cdf:title" /></td> <!-- call template to grab text and also child nodes (which should all be xhtml) -->@@ -77,8 +81,13 @@ <td> <!-- print pretty visual indication of testing data --> <xsl:if test="$testinfo and cdf:reference[@href='test_attestation']">
<!-- add green border on left if test attestation found --><xsl:attribute name="style">border-left:solid thick lime</xsl:attribute>
<!-- add green border on left if manual test attestation found --><xsl:attribute name="style">border-left:solid medium lime</xsl:attribute></xsl:if><xsl:if test="$testinfo and $ovalcheck/ovalns:metadata/ovalns:reference[@ref_url='test_attestation']"><!-- add thicker green border on left if manual and OVAL test attestation found --><xsl:attribute name="style">border-left:solid 15px limegreen</xsl:attribute> </xsl:if> <!-- print the manual check text -->@@ -86,8 +95,14 @@
<!-- print the test attestation info --> <xsl:if test="$testinfo">
<!-- in the XCCDF --> <xsl:for-each select="cdf:reference[@href='test_attestation']">
<br/><br/><i>Tested on <xsl:value-of select="dc:date"/> by <xsl:value-of select="dc:contributor"/>.</i>
<br/><br/><i>Manual check tested on <xsl:value-of select="dc:date"/> by <xsl:value-of select="dc:contributor"/>.</i></xsl:for-each><!-- in the associated OVAL --><xsl:for-each select="$ovalcheck/ovalns:metadata/ovalns:reference[@ref_url='test_attestation']"><xsl:variable name="curr" select="current()"/><br/><i>OVAL check tested on <xsl:value-of select="$curr/@ref_id"/> by <xsl:value-of select="$curr/@source"/>.</i> </xsl:for-each> </xsl:if> </td>
ack
scap-security-guide@lists.fedorahosted.org