Skip to content

Commit 669e161

Browse files
committedJul 27, 2020
Use full CCI and STIG identifiers
1 parent 0a5df6b commit 669e161

File tree

38 files changed

+38
-53
lines changed

38 files changed

+38
-53
lines changed
 

‎chromium/transforms/constants.xslt

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
<xsl:variable name="cisuri">empty</xsl:variable>
1111
<xsl:variable name="product_guide_id_name">CHROMIUM</xsl:variable>
1212
<xsl:variable name="disa-stigs-uri" select="$disa-stigs-apps-browers-uri"/>
13-
<xsl:variable name="os-stigid-concat">DISA FSO </xsl:variable>
1413

1514
<!-- Define URI for custom CCE identifier which can be used for mapping to corporate policy -->
1615
<!--xsl:variable name="custom-cce-uri">https://www.example.org</xsl:variable-->

‎debian10/transforms/constants.xslt

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
<!-- Define URI of official Center for Internet Security Benchmark for Debian Linux v1.0 -->
1212
<xsl:variable name="cisuri">https://benchmarks.cisecurity.org/tools2/linux/CIS_Debian_Benchmark_v1.0.pdf</xsl:variable>
1313
<xsl:variable name="disa-stigs-uri" select="$disa-stigs-os-unix-linux-uri"/>
14-
<xsl:variable name="os-stigid-concat" />
1514

1615
<!-- Define URI for custom CCE identifier which can be used for mapping to corporate policy -->
1716
<!--xsl:variable name="custom-cce-uri">https://www.example.org</xsl:variable-->

‎debian8/transforms/constants.xslt

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
<!-- Define URI of official Center for Internet Security Benchmark for Debian Linux v1.0 -->
1212
<xsl:variable name="cisuri">https://benchmarks.cisecurity.org/tools2/linux/CIS_Debian_Benchmark_v1.0.pdf</xsl:variable>
1313
<xsl:variable name="disa-stigs-uri" select="$disa-stigs-os-unix-linux-uri"/>
14-
<xsl:variable name="os-stigid-concat" />
1514

1615
<!-- Define URI for custom CCE identifier which can be used for mapping to corporate policy -->
1716
<!--xsl:variable name="custom-cce-uri">https://www.example.org</xsl:variable-->

‎debian9/transforms/constants.xslt

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
<!-- Define URI of official Center for Internet Security Benchmark for Debian Linux v1.0 -->
1212
<xsl:variable name="cisuri">https://benchmarks.cisecurity.org/tools2/linux/CIS_Debian_Benchmark_v1.0.pdf</xsl:variable>
1313
<xsl:variable name="disa-stigs-uri" select="$disa-stigs-os-unix-linux-uri"/>
14-
<xsl:variable name="os-stigid-concat" />
1514

1615
<!-- Define URI for custom CCE identifier which can be used for mapping to corporate policy -->
1716
<!--xsl:variable name="custom-cce-uri">https://www.example.org</xsl:variable-->

‎eap6/transforms/constants.xslt

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
<xsl:variable name="product_guide_id_name">Jboss-EAP-6</xsl:variable>
1212
<xsl:variable name="disa-stigs-uri" select="$disa-stigs-apps-appserver-uri"/>
1313
<xsl:variable name="disa-srguri" select="$disa-appsrguri"/>
14-
<xsl:variable name="os-stigid-concat" />
1514

1615
<!-- Define URI for custom CCE identifier which can be used for mapping to corporate policy -->
1716
<!--xsl:variable name="custom-cce-uri">https://www.example.org</xsl:variable-->

‎example/README.md

-1
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,6 @@ cat << EOF >> $NEW_PRODUCT/transforms/constants.xslt
225225
<!-- Define URI of official Center for Internet Security Benchmark for $FULL_NAME -->
226226
<xsl:variable name="cisuri">https://benchmarks.cisecurity.org/tools2/linux/CIS_${CAMEL_CASE_NAME}_Benchmark_v1.0.pdf</xsl:variable>
227227
<xsl:variable name="disa-stigs-uri" select="$disa-stigs-os-unix-linux-uri"/>
228-
<xsl:variable name="os-stigid-concat" />
229228
230229
<!-- Define URI for custom CCE identifier which can be used for mapping to corporate policy -->
231230
<!--xsl:variable name="custom-cce-uri">https://www.example.org</xsl:variable-->

‎example/new_product.sh

-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ cat << EOF >> $NEW_PRODUCT/transforms/constants.xslt
7777
<!-- Define URI of official Center for Internet Security Benchmark for $FULL_NAME -->
7878
<xsl:variable name="cisuri">https://benchmarks.cisecurity.org/tools2/linux/CIS_${CAMEL_CASE_NAME}_Benchmark_v1.0.pdf</xsl:variable>
7979
<xsl:variable name="disa-stigs-uri" select="$disa-stigs-os-unix-linux-uri"/>
80-
<xsl:variable name="os-stigid-concat" />
8180
8281
<!-- Define URI for custom CCE identifier which can be used for mapping to corporate policy -->
8382
<!--xsl:variable name="custom-cce-uri">https://www.example.org</xsl:variable-->

‎example/transforms/constants.xslt

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
<xsl:variable name="cisuri">empty</xsl:variable>
1111
<xsl:variable name="product_guide_id_name">EXAMPLE</xsl:variable>
1212
<xsl:variable name="disa-stigs-uri" select="$disa-stigs-os-unix-linux-uri"/>
13-
<xsl:variable name="os-stigid-concat" />
1413

1514
<!-- Define URI for custom CCE identifier which can be used for mapping to corporate policy -->
1615
<!--xsl:variable name="custom-cce-uri">https://www.example.org</xsl:variable-->

‎fedora/transforms/constants.xslt

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
<xsl:variable name="cisuri">empty</xsl:variable>
1111
<xsl:variable name="product_guide_id_name">FEDORA</xsl:variable>
1212
<xsl:variable name="disa-stigs-uri" select="$disa-stigs-os-unix-linux-uri"/>
13-
<xsl:variable name="os-stigid-concat" />
1413

1514
<!-- Define URI for custom CCE identifier which can be used for mapping to corporate policy -->
1615
<!--xsl:variable name="custom-cce-uri">https://www.example.org</xsl:variable-->

‎firefox/transforms/constants.xslt

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
<xsl:variable name="cisuri">empty</xsl:variable>
1111
<xsl:variable name="product_guide_id_name">FIREFOX</xsl:variable>
1212
<xsl:variable name="disa-stigs-uri" select="$disa-stigs-apps-browers-uri"/>
13-
<xsl:variable name="os-stigid-concat" />
1413

1514
<!-- Define URI for custom CCE identifier which can be used for mapping to corporate policy -->
1615
<!--xsl:variable name="custom-cce-uri">https://www.example.org</xsl:variable-->

‎fuse6/transforms/constants.xslt

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
<xsl:variable name="cisuri">empty</xsl:variable>
1111
<xsl:variable name="product_guide_id_name">Jboss-Fuse-6</xsl:variable>
1212
<xsl:variable name="disa-stigs-uri" select="$disa-stigs-apps-appserver-uri"/>
13-
<xsl:variable name="os-stigid-concat" />
1413

1514
<!-- Define URI for custom CCE identifier which can be used for mapping to corporate policy -->
1615
<!--xsl:variable name="custom-cce-uri">https://www.example.org</xsl:variable-->

‎jre/transforms/constants.xslt

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
<xsl:variable name="cisuri">empty</xsl:variable>
1111
<xsl:variable name="product_guide_id_name">JRE</xsl:variable>
1212
<xsl:variable name="disa-stigs-uri" select="$disa-stigs-apps-appsecurity-dev-uri"/>
13-
<xsl:variable name="os-stigid-concat" />
1413

1514
<!-- Define URI for custom CCE identifier which can be used for mapping to corporate policy -->
1615
<!--xsl:variable name="custom-cce-uri">https://www.example.org</xsl:variable-->

‎linux_os/guide/services/avahi/disable_avahi_group/service_avahi-daemon_disabled/rule.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ identifiers:
2121

2222
references:
2323
cis@rhel8: 2.2.4
24-
disa: "366"
24+
disa: CCI-000366
2525
nist: CM-7(a),CM-7(b),CM-6(a)
2626
nist-csf: PR.IP-1,PR.PT-3
2727
srg@rhel6: SRG-OS-999999
28-
stigid@rhel6: "000246"
28+
stigid@rhel6: RHEL-06-000246
2929
isa-62443-2013: 'SR 1.1,SR 1.10,SR 1.11,SR 1.12,SR 1.13,SR 1.2,SR 1.3,SR 1.4,SR 1.5,SR 1.6,SR 1.7,SR 1.8,SR 1.9,SR 2.1,SR 2.2,SR 2.3,SR 2.4,SR 2.5,SR 2.6,SR 2.7,SR 7.6'
3030
isa-62443-2009: 4.3.3.5.1,4.3.3.5.2,4.3.3.5.3,4.3.3.5.4,4.3.3.5.5,4.3.3.5.6,4.3.3.5.7,4.3.3.5.8,4.3.3.6.1,4.3.3.6.2,4.3.3.6.3,4.3.3.6.4,4.3.3.6.5,4.3.3.6.6,4.3.3.6.7,4.3.3.6.8,4.3.3.6.9,4.3.3.7.1,4.3.3.7.2,4.3.3.7.3,4.3.3.7.4,4.3.4.3.2,4.3.4.3.3
3131
cobit5: BAI10.01,BAI10.02,BAI10.03,BAI10.05,DSS05.02,DSS05.05,DSS06.06

‎linux_os/guide/system/auditing/service_auditd_enabled/rule.yml

+5-4
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,22 @@ identifiers:
3030
cce@rhcos4: 82463-1
3131

3232
references:
33-
stigid@ol7: "030000"
34-
stigid@rhel6: "000145"
33+
stigid@ol7: OL7-00-030000
34+
stigid@rhel6: RHEL-06-000145
3535
srg@rhel6: SRG-OS-000032,SRG-OS-000037,SRG-OS-000255
3636
disa@rhel6: 067,1115,1190,120,1263,130,1312,1353,1454,1462,1487,157,158,1589,172,347,831,880
37+
disa@rhel6: CCI-000067,CCI-001115,CCI-001190,CCI-000120,CCI-001263,CCI-000130,CCI-0001312,CCI-001353,CCI-0001454,CCI-001462,CCI-001487,CCI-000157,CCI-000158,CCI-001589,CCI-000172,CCI-000347,CCI-000831,CCI-000880
3738
cis@rhel8: 4.1.1.2
3839
cjis: 5.4.1.1
3940
cui: 3.3.1,3.3.2,3.3.6
40-
disa: 126,130,131,132,133,134,135,1464,1487,1814
41+
disa: CCI-000126,CCI-000130,CCI-000131,CCI-000132,CCI-000133,CCI-000134,CCI-000134,CCI-000135,CCI-001464,CCI-001487,CCI-001814
4142
hipaa: 164.308(a)(1)(ii)(D),164.308(a)(5)(ii)(C),164.310(a)(2)(iv),164.310(d)(2)(iii),164.312(b)
4243
nist: AC-2(g),AU-3,AU-10,AU-2(d),AU-12(c),AU-14(1),AC-6(9),CM-6(a)
4344
nist-csf: DE.AE-3,DE.AE-5,DE.CM-1,DE.CM-3,DE.CM-7,ID.SC-4,PR.AC-3,PR.PT-1,PR.PT-4,RS.AN-1,RS.AN-4
4445
pcidss: Req-10.1
4546
srg: SRG-OS-000037-GPOS-00015,SRG-OS-000038-GPOS-00016,SRG-OS-000039-GPOS-00017,SRG-OS-000040-GPOS-00018,SRG-OS-000042-GPOS-00021,SRG-OS-000254-GPOS-00095,SRG-OS-000255-GPOS-00096,SRG-OS-000365-GPOS-00152
4647
vmmsrg: SRG-OS-000037-VMM-000150,SRG-OS-000063-VMM-000310,SRG-OS-000038-VMM-000160,SRG-OS-000039-VMM-000170,SRG-OS-000040-VMM-000180,SRG-OS-000041-VMM-000190
47-
stigid@rhel7: "030000"
48+
stigid@rhel7: RHEL-07-030000
4849
isa-62443-2013: 'SR 1.13,SR 2.10,SR 2.11,SR 2.12,SR 2.6,SR 2.8,SR 2.9,SR 3.1,SR 3.5,SR 3.8,SR 4.1,SR 4.3,SR 5.1,SR 5.2,SR 5.3,SR 6.1,SR 6.2,SR 7.1,SR 7.6'
4950
isa-62443-2009: 4.2.3.10,4.3.2.6.7,4.3.3.3.9,4.3.3.5.8,4.3.3.6.6,4.3.4.4.7,4.3.4.5.6,4.3.4.5.7,4.3.4.5.8,4.4.2.1,4.4.2.2,4.4.2.4
5051
cobit5: APO10.01,APO10.03,APO10.04,APO10.05,APO11.04,APO12.06,APO13.01,BAI03.05,BAI08.02,DSS01.03,DSS01.04,DSS02.02,DSS02.04,DSS02.07,DSS03.01,DSS03.05,DSS05.02,DSS05.03,DSS05.04,DSS05.05,DSS05.07,MEA01.01,MEA01.02,MEA01.03,MEA01.04,MEA01.05,MEA02.01

‎ocp3/transforms/constants.xslt

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
<!-- Define URI of official CIS Kubernetes Benchmark -->
1313
<xsl:variable name="cisuri">https://benchmarks.cisecurity.org/tools2/virtualization/CIS_Kubernetes_Benchmark_v1.2.0.pdf</xsl:variable>
1414
<xsl:variable name="disa-stigs-uri" select="$disa-stigs-os-unix-linux-uri"/>
15-
<xsl:variable name="os-stigid-concat"></xsl:variable>
1615

1716
<!-- Define URI for custom CCE identifier which can be used for mapping to corporate policy -->
1817
<!--xsl:variable name="custom-cce-uri">https://www.example.org</xsl:variable-->

‎ocp4/transforms/constants.xslt

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
<xsl:variable name="cisuri">empty</xsl:variable>
1212
<xsl:variable name="disa-stigs-uri" select="$disa-stigs-os-unix-linux-uri"/>
13-
<xsl:variable name="os-stigid-concat" />
1413

1514
<!-- Define URI for custom CCE identifier which can be used for mapping to corporate policy -->
1615
<!--xsl:variable name="custom-cce-uri">https://www.example.org</xsl:variable-->

‎ol7/transforms/constants.xslt

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
<xsl:variable name="cisuri">https://benchmarks.cisecurity.org/tools2/linux/CIS_Oracle_Linux_7_Benchmark_v2.1.0.pdf</xsl:variable>
1111
<xsl:variable name="product_guide_id_name">OL-7</xsl:variable>
1212
<xsl:variable name="disa-stigs-uri" select="$disa-stigs-os-unix-linux-uri"/>
13-
<xsl:variable name="os-stigid-concat" >OL07-00-</xsl:variable>
1413

1514
<!-- Define URI for custom CCE identifier which can be used for mapping to corporate policy -->
1615
<!--xsl:variable name="custom-cce-uri">https://www.example.org</xsl:variable-->

‎ol8/transforms/constants.xslt

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
<xsl:variable name="cisuri">empty</xsl:variable>
1111
<xsl:variable name="product_guide_id_name">OL-8</xsl:variable>
1212
<xsl:variable name="disa-stigs-uri" select="$disa-stigs-os-unix-linux-uri"/>
13-
<xsl:variable name="os-stigid-concat" >OL-08-</xsl:variable>
1413

1514
<!-- Define URI for custom CCE identifier which can be used for mapping to corporate policy -->
1615
<!--xsl:variable name="custom-cce-uri">https://www.example.org</xsl:variable-->

‎opensuse/transforms/constants.xslt

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
<xsl:variable name="cisuri">empty</xsl:variable>
1212
<xsl:variable name="disa-stigs-uri" select="$disa-stigs-os-unix-linux-uri"/>
13-
<xsl:variable name="os-stigid-concat" />
1413

1514
<!-- Define URI for custom CCE identifier which can be used for mapping to corporate policy -->
1615
<!--xsl:variable name="custom-cce-uri">https://www.example.org</xsl:variable-->

‎rhel6/transforms/constants.xslt

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
<xsl:variable name="cisuri">https://www.cisecurity.org/benchmark/red_hat_linux/</xsl:variable>
1313
<xsl:variable name="disa-stigs-uri" select="$disa-stigs-os-unix-linux-uri"/>
1414
<xsl:variable name="disa-srguri" select="$disa-ossrguri"/>
15-
<xsl:variable name="os-stigid-concat"></xsl:variable>
1615

1716
<!-- Define URI for custom CCE identifier which can be used for mapping to corporate policy -->
1817
<!--xsl:variable name="custom-cce-uri">https://www.example.org</xsl:variable-->

‎rhel7/transforms/constants.xslt

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
<xsl:variable name="cisuri">https://www.cisecurity.org/benchmark/red_hat_linux/</xsl:variable>
1414
<xsl:variable name="disa-stigs-uri" select="$disa-stigs-os-unix-linux-uri"/>
1515
<xsl:variable name="disa-srguri" select="$disa-ossrguri"/>
16-
<xsl:variable name="os-stigid-concat">RHEL-07-</xsl:variable>
1716

1817
<!-- Define URI for custom CCE identifier which can be used for mapping to corporate policy -->
1918
<!--xsl:variable name="custom-cce-uri">https://www.example.org</xsl:variable-->

‎rhel8/transforms/constants.xslt

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
<xsl:variable name="product_guide_id_name">RHEL-8</xsl:variable>
1212
<xsl:variable name="disa-stigs-uri" select="$disa-stigs-os-unix-linux-uri"/>
1313
<xsl:variable name="disa-srguri" select="$disa-ossrguri"/>
14-
<xsl:variable name="os-stigid-concat">RHEL-08-</xsl:variable>
1514

1615
<!-- Define URI for custom CCE identifier which can be used for mapping to corporate policy -->
1716
<!--xsl:variable name="custom-cce-uri">https://www.example.org</xsl:variable-->

‎rhosp10/transforms/constants.xslt

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
<xsl:variable name="cisuri">empty</xsl:variable>
1111
<xsl:variable name="product_guide_id_name">RHEL-10-OSP</xsl:variable>
1212
<xsl:variable name="disa-stigs-uri" select="$disa-stigs-os-unix-linux-uri"/>
13-
<xsl:variable name="os-stigid-concat" />
1413

1514
<!-- Define URI for custom CCE identifier which can be used for mapping to corporate policy -->
1615
<!--xsl:variable name="custom-cce-uri">https://www.example.org</xsl:variable-->

‎rhosp13/transforms/constants.xslt

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
<xsl:variable name="cisuri">empty</xsl:variable>
1111
<xsl:variable name="product_guide_id_name">RHEL-13-OSP</xsl:variable>
1212
<xsl:variable name="disa-stigs-uri" select="$disa-stigs-os-unix-linux-uri"/>
13-
<xsl:variable name="os-stigid-concat" />
1413

1514
<!-- Define URI for custom CCE identifier which can be used for mapping to corporate policy -->
1615
<!--xsl:variable name="custom-cce-uri">https://www.example.org</xsl:variable-->

‎rhv4/transforms/constants.xslt

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
<!-- Define URI of official CIS Kubernetes Benchmark -->
1313
<xsl:variable name="cisuri"></xsl:variable>
1414
<xsl:variable name="disa-stigs-uri" select="$disa-stigs-virutalization-uri"/>
15-
<xsl:variable name="os-stigid-concat"></xsl:variable>
1615

1716
<!-- Define URI for custom CCE identifier which can be used for mapping to corporate policy -->
1817
<!--xsl:variable name="custom-cce-uri">https://www.example.org</xsl:variable-->

‎shared/transforms/shared_shorthand2xccdf.xslt

+1-1
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@
343343
</xsl:attribute>
344344
<xsl:choose>
345345
<xsl:when test="name() = 'disa'">
346-
<xsl:value-of select='format-number($refitem, "CCI-000000")' />
346+
<xsl:value-of select='$refitem' />
347347
</xsl:when>
348348
<xsl:otherwise>
349349
<xsl:value-of select="normalize-space($refitem)" />

‎shared/transforms/shared_xccdf-apply-overlay-stig.xslt

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
<xsl:apply-templates select="xccdf:check[@system='http://scap.nist.gov/schema/ocil/2']"/>
4242
</check-content>
4343
</check>
44-
<ident system="https://public.cyber.mil/stigs/cci"><xsl:value-of select="concat('CCI-', format-number($overlay_ref,'000000'))" /></ident>
44+
<ident system="https://public.cyber.mil/stigs/cci"><xsl:value-of select="$overlay_ref" /></ident>
4545
<fixtext><xsl:copy-of select="xccdf:description/node()" /></fixtext>
4646
</Rule>
4747
</Group>

‎shared/transforms/shared_xccdf2stigformat.xslt

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ xsi:schemaLocation="http://checklists.nist.gov/xccdf/1.1 http://nvd.nist.gov/sch
7373
<dc:identifier>2400</dc:identifier>
7474
</reference>
7575
<xsl:for-each select="cdf:reference[@href=$disa-cciuri]">
76-
<ident system="{$disa-cciuri}">CCI-<xsl:value-of select="format-number(text(),'000000')"/></ident>
76+
<ident system="{$disa-cciuri}">CCI-<xsl:value-of select="ext()"/></ident>
7777
</xsl:for-each>
7878
<xsl:for-each select="cdf:reference[@href=$disa-ossrguri]">
7979
<ident system="{$disa-ossrguri}"><xsl:value-of select="text()"/></ident>

‎shared/transforms/shared_xccdf2table-profileccirefs.xslt

+6-6
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@
8181

8282
<td>
8383
<xsl:for-each select="cdf:reference[@href=$disa-cciuri]">
84-
<xsl:variable name="cci_formatted" select='format-number(self::node()[text()], "000000")' />
85-
<xsl:variable name="cci_expanded" select="concat('CCI-', $cci_formatted)" />
84+
<xsl:variable name="cci_formatted" select='self::node()[text()])' />
85+
<xsl:variable name="cci_expanded" select="$cci_formatted" />
8686
<xsl:for-each select="$os_srg/cdf:Group/cdf:Rule" >
8787
<xsl:if test="cdf:ident=$cci_expanded">
8888
<xsl:value-of select="cdf:version"/>
@@ -94,17 +94,17 @@
9494

9595
<td>
9696
<xsl:for-each select="cdf:reference[@href=$disa-cciuri]">
97-
<xsl:variable name="cci_formatted" select='format-number(self::node()[text()], "000000")' />
98-
<xsl:variable name="cci_expanded" select="concat('CCI-', $cci_formatted)" />
97+
<xsl:variable name="cci_formatted" select='self::node()[text()]' />
98+
<xsl:variable name="cci_expanded" select="$cci_formatted" />
9999
<xsl:value-of select="$cci_expanded"/>
100100
<br/>
101101
</xsl:for-each>
102102
</td>
103103

104104
<td>
105105
<xsl:for-each select="cdf:reference[@href=$disa-cciuri]">
106-
<xsl:variable name="cci_formatted" select='format-number(self::node()[text()], "000000")' />
107-
<xsl:variable name="cci_expanded" select="concat('CCI-', $cci_formatted)" />
106+
<xsl:variable name="cci_formatted" select='self::node()[text()]' />
107+
<xsl:variable name="cci_expanded" select="$cci_formatted" />
108108
<xsl:for-each select="$cci_list/cci:cci_items/cci:cci_item">
109109
<xsl:if test="@id=$cci_expanded">
110110
<xsl:for-each select="cci:references/cci:reference">

‎sle11/transforms/constants.xslt

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
<!-- Define URI of official CIS SUSE Linux Enterprise 11 Benchmark -->
1212
<xsl:variable name="cisuri"></xsl:variable>
1313
<xsl:variable name="disa-stigs-uri" select="$disa-stigs-os-unix-linux-uri"/>
14-
<xsl:variable name="os-stigid-concat"></xsl:variable>
1514

1615
<!-- Define URI for custom CCE identifier which can be used for mapping to corporate policy -->
1716
<!--xsl:variable name="custom-cce-uri">https://www.example.org</xsl:variable-->

‎sle12/transforms/constants.xslt

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
<xsl:variable name="cisuri">empty</xsl:variable>
1212
<xsl:variable name="disa-stigs-uri" select="$disa-stigs-os-unix-linux-uri"/>
13-
<xsl:variable name="os-stigid-concat">SLES-12-</xsl:variable>
1413

1514
<!-- Define URI for custom CCE identifier which can be used for mapping to corporate policy -->
1615
<!--xsl:variable name="custom-cce-uri">https://www.example.org</xsl:variable-->

‎sle15/transforms/constants.xslt

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
<!-- Define URI of official Center for Internet Security Benchmark for SUSE Linux Enterprise 15 -->
1212
<xsl:variable name="cisuri" />
1313
<xsl:variable name="disa-stigs-uri" select="-stigs-os-unix-linux-uri"/>
14-
<xsl:variable name="os-stigid-concat" />
1514

1615
<!-- Define URI for custom CCE identifier which can be used for mapping to corporate policy -->
1716
<!--xsl:variable name="custom-cce-uri">https://www.example.org</xsl:variable-->

‎ssg/build_yaml.py

+22-7
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
from .constants import XCCDF_PLATFORM_TO_CPE
1515
from .constants import PRODUCT_TO_CPE_MAPPING
16-
from .constants import STIG_PLATFORM_ID_MAP
1716
from .constants import XCCDF_REFINABLE_PROPERTIES
1817
from .rules import get_rule_dir_id, get_rule_dir_yaml, is_rule_dir
1918
from .rule_yaml import parse_prodtype
@@ -888,16 +887,31 @@ def from_yaml(cls, yaml_file, env_yaml=None):
888887
rule.validate_references(yaml_file)
889888
return rule
890889

891-
def _make_stigid_product_specific(self, product):
890+
def _verify_stigid_format(self, product):
892891
stig_id = self.references.get("stigid", None)
893892
if not stig_id:
894893
return
895894
if "," in stig_id:
896895
raise ValueError("Rules can not have multiple STIG IDs.")
897-
stig_platform_id = STIG_PLATFORM_ID_MAP.get(product, product.upper())
898-
product_specific_stig_id = "{platform_id}-{stig_id}".format(
899-
platform_id=stig_platform_id, stig_id=stig_id)
900-
self.references["stigid"] = product_specific_stig_id
896+
stig_ex = re.compile(r'^[A-Z0-9]{4}-[0-9]{2}-[0-9]{6}$')
897+
if stig_ex.match(stig_id):
898+
self.references["stigid"] = stig_id
899+
else:
900+
raise ValueError("STIG ID '{}' is in the wrong format! "
901+
"Format should be similar to: "
902+
"XXXX-XX-XXXXXX".format(stig_id))
903+
904+
def _verify_disa_cci_format(self):
905+
cci_id = self.references.get("disa", None)
906+
if not cci_id:
907+
return
908+
cci_ex = re.compile(r'^CCI-[0-9]{6}$')
909+
for cci in cci_id.split(","):
910+
if not cci_ex.match(cci):
911+
raise ValueError("CCI '{}' is in the wrong format! "
912+
"Format should be similar to: "
913+
"CCI-XXXXXX".format(cci))
914+
self.references["disa"] = cci_id
901915

902916
def normalize(self, product):
903917
try:
@@ -965,9 +979,10 @@ def make_refs_and_identifiers_product_specific(self, product):
965979
dic.update(new_items)
966980

967981
self.references = general_references
982+
self._verify_disa_cci_format()
968983
self.references.update(product_references)
969984

970-
self._make_stigid_product_specific(product)
985+
self._verify_stigid_format(product)
971986

972987
def _make_items_product_specific(self, items_dict, product_suffix, allow_overwrites=False):
973988
new_items = dict()

‎ubuntu1404/transforms/constants.xslt

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
<!-- Define URI of official Center for Internet Security Benchmark for Ubuntu Linux v1.0 -->
1212
<xsl:variable name="cisuri">https://www.cisecurity.org/benchmark/ubuntu_linux/</xsl:variable>
1313
<xsl:variable name="disa-stigs-uri" select="$disa-stigs-os-unix-linux-uri"/>
14-
<xsl:variable name="os-stigid-concat" />
1514

1615
<!-- Define URI for custom CCE identifier which can be used for mapping to corporate policy -->
1716
<!--xsl:variable name="custom-cce-uri">https://www.example.org</xsl:variable-->

‎ubuntu1604/transforms/constants.xslt

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
<!-- Define URI of official Center for Internet Security Benchmark for Ubuntu Linux v1.0 -->
1212
<xsl:variable name="cisuri">https://www.cisecurity.org/benchmark/ubuntu_linux/</xsl:variable>
1313
<xsl:variable name="disa-stigs-uri" select="$disa-stigs-os-unix-linux-uri"/>
14-
<xsl:variable name="os-stigid-concat" />
1514

1615
<!-- Define URI for custom CCE identifier which can be used for mapping to corporate policy -->
1716
<!--xsl:variable name="custom-cce-uri">https://www.example.org</xsl:variable-->

‎ubuntu1804/transforms/constants.xslt

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
<!-- Define URI of official Center for Internet Security Benchmark for Ubuntu Linux v1.0 -->
1212
<xsl:variable name="cisuri">https://www.cisecurity.org/benchmark/ubuntu_linux/</xsl:variable>
1313
<xsl:variable name="disa-stigs-uri" select="$disa-stigs-os-unix-linux-uri"/>
14-
<xsl:variable name="os-stigid-concat" />
1514

1615
<!-- Define URI for custom CCE identifier which can be used for mapping to corporate policy -->
1716
<!--xsl:variable name="custom-cce-uri">https://www.example.org</xsl:variable-->

‎wrlinux1019/transforms/constants.xslt

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
<xsl:variable name="cisuri">empty</xsl:variable>
1111
<xsl:variable name="product_guide_id_name">WRLINUX</xsl:variable>
1212
<xsl:variable name="disa-stigs-uri" select="$disa-stigs-os-unix-linux-uri"/>
13-
<xsl:variable name="os-stigid-concat" />
1413

1514
<!-- Define URI for custom CCE identifier which can be used for mapping to corporate policy -->
1615
<!--xsl:variable name="custom-cce-uri">https://www.example.org</xsl:variable-->

‎wrlinux8/transforms/constants.xslt

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
<xsl:variable name="cisuri">empty</xsl:variable>
1111
<xsl:variable name="product_guide_id_name">WRLINUX</xsl:variable>
1212
<xsl:variable name="disa-stigs-uri" select="$disa-stigs-os-unix-linux-uri"/>
13-
<xsl:variable name="os-stigid-concat" />
1413

1514
<!-- Define URI for custom CCE identifier which can be used for mapping to corporate policy -->
1615
<!--xsl:variable name="custom-cce-uri">https://www.example.org</xsl:variable-->

0 commit comments

Comments
 (0)
Please sign in to comment.