Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix multiple STIG id table generation #11016

Merged
1 change: 1 addition & 0 deletions linux_os/guide/services/rng/service_rngd_enabled/rule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ references:
ospp: FCS_RBG_EXT.1
srg: SRG-OS-000480-GPOS-00227
stigid@ol8: OL08-00-010471
stigid@rhel8: RHEL-08-010471

{{% if product == "ol8" %}}
platform: os_linux[ol]<8.4 or not runtime_kernel_fips_enabled
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ references:
nist: AC-7 (a)
srg: SRG-OS-000021-GPOS-00005
stigid@ol8: OL08-00-020027
stigid@rhel8: RHEL-08-020027
stigid@rhel8: RHEL-08-020027,RHEL-08-020028

platform: machine

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ references:
stigid@ol8: OL08-00-020021
stigid@rhel8: RHEL-08-020021

{{% if product == "rhel8" %}}
platform: os_linux[rhel]>=8.2
{{% endif %}}

ocil_clause: 'the "audit" option is not set, is missing or commented out'

ocil: |-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ references:
stigid@rhel7: RHEL-07-010330
stigid@rhel8: RHEL-08-020023

{{% if product == "rhel8" %}}
platform: os_linux[rhel]>=8.2
{{% endif %}}

ocil_clause: 'the "even_deny_root" option is not set, is missing or commented out'

ocil: |-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ references:
disa: CCI-000044,CCI-002238
nist: AC-7(b),AC-7(a),AC-7.1(ii)
srg: SRG-OS-000021-GPOS-00005,SRG-OS-000329-GPOS-00128
stigid@ol8: OL08-00-020016
stigid@rhel8: RHEL-08-020017
stigid@ol8: OL08-00-020016,OL08-00-020017
stigid@rhel8: RHEL-08-020016,RHEL-08-020017

ocil_clause: 'the "dir" option is not set to a non-default documented tally log directory, is missing or commented out'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ references:
disa: CCI-002238,CCI-000044
srg: SRG-OS-000329-GPOS-00128,SRG-OS-000021-GPOS-00005
stigid@ol8: OL08-00-020019
stigid@rhel8: RHEL-08-020019
stigid@rhel8: RHEL-08-020018,RHEL-08-020019

ocil_clause: 'the system shows messages when three unsuccessful logon attempts occur'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ references:
stigid@ol7: OL07-00-010320
stigid@ol8: OL08-00-020014
stigid@rhel7: RHEL-07-010320
stigid@rhel8: RHEL-08-020015
stigid@rhel8: RHEL-08-020014,RHEL-08-020015

platform: package[pam]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ references:
stigid@ol7: OL07-00-010290
stigid@ol8: OL08-00-020331
stigid@rhel7: RHEL-07-010290
stigid@rhel8: RHEL-08-020331
stigid@rhel8: RHEL-08-020331,RHEL-08-020332
stigid@sle12: SLES-12-010231
stigid@sle15: SLES-15-020300

Expand Down
7 changes: 4 additions & 3 deletions utils/create-stig-overlay.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def ssg_xccdf_stigid_mapping(ssgtree):

for rule in ssgtree.findall(".//{%s}Rule" % xccdf_ns):
srgs = []
rhid = ""
rhid = []

xccdfid = rule.get("id")
if xccdf_ns == XCCDF12_NS:
Expand All @@ -62,10 +62,11 @@ def ssg_xccdf_stigid_mapping(ssgtree):
stig = [ids for ids in rule.findall(".//{%s}reference[@href='%s']" % (xccdf_ns, references))]
for ref in reversed(stig):
if not ref.text.startswith("SRG-"):
rhid = ref.text
rhid.append(ref.text)
else:
srgs.append(ref.text)
xccdftostig_idmapping.update({rhid: {xccdfid: srgs}})
for id in rhid:
xccdftostig_idmapping.update({id: {xccdfid: srgs}})

return xccdftostig_idmapping

Expand Down
Loading