Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
evgenyz committed Feb 6, 2024
1 parent 6e972b4 commit d189a41
Show file tree
Hide file tree
Showing 15 changed files with 1 addition and 29 deletions.
8 changes: 1 addition & 7 deletions tests/ssg_test_suite/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,19 +309,13 @@ def load_rule_and_env(rule_dir_path, env_yaml, product=None):
rule = RuleYAML.from_yaml(rule_path, env_yaml)
rule.normalize(product)

# Note that most places would check prodtype, but we don't care
# about that here: if the rule is available to the product, we
# load and parse it anyways as we have no knowledge of the
# top-level profile or rule passed into the test suite.
prodtypes = parse_prodtype(rule.prodtype)

# Our local copy of env_yaml needs some properties from rule.yml
# for completeness.
local_env_yaml = dict()
local_env_yaml.update(env_yaml)
local_env_yaml['rule_id'] = rule.id_
local_env_yaml['rule_title'] = rule.title
local_env_yaml['products'] = prodtypes
local_env_yaml['products'] = {'all'} # TODO: prodtype

return rule, local_env_yaml

Expand Down
1 change: 0 additions & 1 deletion tests/unit/ssg-module/data/accounts_tmout.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
prodtype: alinux2,alinux3,fedora,ol7,ol8,ol9,rhcos4,rhel7,rhel8,rhel9,rhv4,sle12,sle15,ubuntu2004,ubuntu2204
title: Set Interactive Session Timeout
description: 'Setting the <tt>TMOUT</tt> option in <tt>/etc/profile</tt> ensures that
Expand Down
1 change: 0 additions & 1 deletion tests/unit/ssg-module/data/accounts_tmout_without_ocil.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
prodtype: alinux2,alinux3,fedora,ol7,ol8,ol9,rhcos4,rhel7,rhel8,rhel9,rhv4,sle12,sle15,ubuntu2004,ubuntu2204
title: Set Interactive Session Timeout
description: 'Setting the <tt>TMOUT</tt> option in <tt>/etc/profile</tt> ensures that
Expand Down
1 change: 0 additions & 1 deletion tests/unit/ssg-module/data/file_owner_grub2_cfg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ platforms: !!set
cpe_platform_names: !!set
machine: null
inherited_platforms: []
prodtype: rhel7,rhel8,fedora,ol7,ol8
rationale: Only root should be able to modify important boot parameters.
references: {cis: 1.4.1, cis-csc: '12,13,14,15,16,18,3,5', cjis: 5.5.2.2, cobit5: 'APO01.06,DSS05.04,DSS05.07,DSS06.02',
cui: 3.4.5, disa: 'CCI-000225', hipaa: '164.308(a)(1)(ii)(B),164.308(a)(7)(i),164.308(a)(7)(ii)(A),164.310(a)(1),164.310(a)(2)(i),164.310(a)(2)(ii),164.310(a)(2)(iii),164.310(b),164.310(c),164.310(d)(1),164.310(d)(2)(iii)',
Expand Down
1 change: 0 additions & 1 deletion tests/unit/ssg-module/data/selinux.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
prodtype: all
title: SELinux
description: 'SELinux is a feature of the Linux kernel which can be
Expand Down
1 change: 0 additions & 1 deletion tests/unit/ssg-module/data/sshd_disable_root_login.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ ocil: 'To determine how the SSH daemon''s <tt>PermitRootLogin</tt> option is set
ocil_clause: the required value is not set
oval_external_content: null
platforms: null
prodtype: all
rationale: 'Even though the communications channel may be encrypted, an additional
layer of
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
documentation_complete: true

prodtype: fedora,ol8,rhcos4,rhel8,rhel9,rhv4

title: 'Configure System Cryptography Policy'

description: |-
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
documentation_complete: true

prodtype: fedora,ol7,ol8,rhel7,rhel8,rhel9

title: 'Uninstall Automatic Bug Reporting Tool (abrt)'

description: |-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ ocil_clause: SELINUX is not set to enforcing
oval_external_content: null
platforms:
- machine
prodtype: rhel7,rhel8,fedora,ol7,ol8,rhv4
rationale: 'Setting the SELinux state to enforcing ensures SELinux is able to confine
potentially compromised processes to the security policy, which is designed to
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
documentation_complete: true

prodtype: fedora

title: Rule 1

identifiers:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
documentation_complete: true

prodtype: fedora

title: Rule 2

identifiers:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
documentation_complete: true

prodtype: fedora

title: Rule 2

identifiers:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
documentation_complete: true

prodtype: fedora

title: Rule 1

identifiers:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
prodtype: ocp4

title: 'rule_1'

description: |-
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
prodtype: ocp4

title: 'rule_2'

description: |-
Expand Down

0 comments on commit d189a41

Please sign in to comment.