| 1 |
<?xml version="1.0" encoding="utf-8" ?> |
| 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 |
<xsl:stylesheet version="1.1" |
| 27 |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
| 28 |
xmlns:cdf="http://checklists.nist.gov/xccdf/1.2" |
| 29 |
xmlns:ovalres="http://oval.mitre.org/XMLSchema/oval-results-5" |
| 30 |
xmlns:sceres="http://open-scap.org/page/SCE_result_file" |
| 31 |
xmlns:exsl="http://exslt.org/common" |
| 32 |
xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1" |
| 33 |
exclude-result-prefixes="xsl cdf ovalres sceres exsl arf"> |
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
<xsl:key name="references" match="//cdf:reference" use="@href"/> |
| 40 |
|
| 41 |
<xsl:template name="convert-reference-url-to-name"> |
| 42 |
<xsl:param name="href"/> |
| 43 |
<xsl:choose> |
| 44 |
<xsl:when test="key('reference_names', $href)"> |
| 45 |
<xsl:value-of select="key('reference_names', $href)"/> |
| 46 |
</xsl:when> |
| 47 |
<xsl:when test="starts-with($href, 'http://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-53')"> |
| 48 |
<xsl:text>NIST SP 800-53</xsl:text> |
| 49 |
</xsl:when> |
| 50 |
<xsl:when test="starts-with($href, 'http://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-171')"> |
| 51 |
<xsl:text>NIST SP 800-171</xsl:text> |
| 52 |
</xsl:when> |
| 53 |
<xsl:when test="starts-with($href, 'http://iase.disa.mil/stigs/cci/')"> |
| 54 |
<xsl:text>DISA CCI</xsl:text> |
| 55 |
</xsl:when> |
| 56 |
|
| 57 |
<xsl:when test="starts-with($href, 'http://iase.disa.mil/stigs/srgs/') or |
| 58 |
starts-with($href, 'http://iase.disa.mil/stigs/os/general/Pages/index.aspx') or |
| 59 |
starts-with($href, 'http://iase.disa.mil/stigs/app-security/app-servers/Pages/general.aspx')"> |
| 60 |
<xsl:text>DISA SRG</xsl:text> |
| 61 |
</xsl:when> |
| 62 |
|
| 63 |
<xsl:when test="starts-with($href, 'http://iase.disa.mil/stigs/os/') or |
| 64 |
starts-with($href, 'http://iase.disa.mil/stigs/app-security/')"> |
| 65 |
<xsl:text>DISA STIG</xsl:text> |
| 66 |
</xsl:when> |
| 67 |
<xsl:when test="starts-with($href, 'https://www.pcisecuritystandards.org/')"> |
| 68 |
<xsl:text>PCI-DSS Requirement</xsl:text> |
| 69 |
</xsl:when> |
| 70 |
<xsl:when test="starts-with($href, 'https://benchmarks.cisecurity.org/')"> |
| 71 |
<xsl:text>CIS Recommendation</xsl:text> |
| 72 |
</xsl:when> |
| 73 |
<xsl:when test="starts-with($href, 'https://www.fbi.gov/file-repository/cjis-security-policy')"> |
| 74 |
<xsl:text>FBI CJIS</xsl:text> |
| 75 |
</xsl:when> |
| 76 |
<xsl:when test="starts-with($href, 'http://www.ssi.gouv.fr/administration/bonnes-pratiques')"> |
| 77 |
<xsl:text>ANSSI</xsl:text> |
| 78 |
</xsl:when> |
| 79 |
<xsl:when test="starts-with($href, 'https://www.gpo.gov/fdsys/pkg/CFR-2007-title45-vol1')"> |
| 80 |
<xsl:text>HIPAA</xsl:text> |
| 81 |
</xsl:when> |
| 82 |
<xsl:when test="starts-with($href, 'https://www.iso.org/standard/54534.html')"> |
| 83 |
<xsl:text>ISO 27001-2013</xsl:text> |
| 84 |
</xsl:when> |
| 85 |
<xsl:when test="starts-with($href, 'https://iase.disa.mil/stigs/pages/stig-viewing-guidance') or |
| 86 |
starts-with($href, 'https://public.cyber.mil/stigs/srg-stig-tools/') or |
| 87 |
starts-with($href, 'https://www.cyber.mil/stigs/srg-stig-tools/')"> |
| 88 |
<xsl:text>STIG Viewer</xsl:text> |
| 89 |
</xsl:when> |
| 90 |
<xsl:otherwise> |
| 91 |
<xsl:value-of select="$href"/> |
| 92 |
</xsl:otherwise> |
| 93 |
</xsl:choose> |
| 94 |
</xsl:template> |
| 95 |
|
| 96 |
<xsl:template name="get-all-references"> |
| 97 |
<xsl:param name="benchmark"/> |
| 98 |
<xsl:for-each select="$benchmark//cdf:reference[generate-id(.) = generate-id(key('references',@href)[1])]"> |
| 99 |
<xsl:sort select="@href" /> |
| 100 |
<xsl:if test="normalize-space(@href) and @href != 'https://github.com/OpenSCAP/scap-security-guide/wiki/Contributors'"> |
| 101 |
<option> |
| 102 |
<xsl:variable name="reference"> |
| 103 |
<xsl:call-template name="convert-reference-url-to-name"> |
| 104 |
<xsl:with-param name="href" select="@href"/> |
| 105 |
</xsl:call-template> |
| 106 |
</xsl:variable> |
| 107 |
<xsl:attribute name="value"> |
| 108 |
<xsl:value-of select="$reference"/> |
| 109 |
</xsl:attribute> |
| 110 |
<xsl:value-of select="$reference"/> |
| 111 |
</option> |
| 112 |
</xsl:if> |
| 113 |
</xsl:for-each> |
| 114 |
</xsl:template> |
| 115 |
|
| 116 |
</xsl:stylesheet> |