Skip to content

Conversation

@jan-cerny
Copy link
Collaborator

Description:

add missing fix texts, missing Ansible, improve OCIL

Rationale:

RHEL 9 STIG

@jan-cerny jan-cerny added the RHEL9 Red Hat Enterprise Linux 9 product related. label Apr 6, 2022
@github-actions
Copy link

github-actions bot commented Apr 6, 2022

Start a new ephemeral environment with changes proposed in this pull request:

Open in Gitpod

@github-actions
Copy link

github-actions bot commented Apr 6, 2022

This datastream diff is auto generated by the check Compare DS/Generate Diff

Click here to see the full diff
New datastream is missing OVAL for rule 'xccdf_org.ssgproject.content_rule_configure_firewalld_ports'.
New datastream is missing bash remediation for rule 'xccdf_org.ssgproject.content_rule_configure_firewalld_ports'.
OCIL for rule 'xccdf_org.ssgproject.content_rule_chronyd_client_only' differs:
--- old datastream
+++ new datastream
@@ -2,5 +2,5 @@
 $ grep '\bport\b' /etc/chrony.conf
 The output should return
 port 0
- Is it the case that it does not exist or port is set to non-zero value?
+ Is it the case that port is not set or port is set to non-zero value?
 
New datastream adds ansible remediation for rule 'xccdf_org.ssgproject.content_rule_chronyd_client_only'.
OCIL for rule 'xccdf_org.ssgproject.content_rule_chronyd_no_chronyc_network' differs:
--- old datastream
+++ new datastream
@@ -2,5 +2,5 @@
 $ grep '\bcmdport\b' /etc/chrony.conf
 The output should return
 cmdport 0
- Is it the case that it does not exist or port is set to non-zero value?
+ Is it the case that cmdport is not set or cmdport is set to non-zero value?
 
New datastream adds ansible remediation for rule 'xccdf_org.ssgproject.content_rule_chronyd_no_chronyc_network'.
OCIL for rule 'xccdf_org.ssgproject.content_rule_firewalld_sshd_port_enabled' differs:
--- old datastream
+++ new datastream
@@ -17,5 +17,5 @@
 If it is a port:
 22/tcp
 
- Is it the case that ?
+ Is it the case that sshd service is disabled by firewall?
 
New datastream adds bash remediation for rule 'xccdf_org.ssgproject.content_rule_firewalld_sshd_port_enabled'.

@Mab879 Mab879 self-assigned this Apr 6, 2022
@Mab879
Copy link
Member

Mab879 commented Apr 12, 2022

/retest

jan-cerny added a commit to jan-cerny/scap-security-guide that referenced this pull request Apr 13, 2022
…enabled

During our work on SRG-OS-000096-GPOS-00050 we have discovered the
following:

- The requirement "The firewall should be configured sanely" isn't
  possible to be automated by SCAP because services and ports differ on
  different systems.
- At the same time there is rule "configure_firewalld_ports" that tries
  to implement it.
- The rule "configure_firewalld_ports" is internally inconsistent - its
  rationale and description are about generic firewall configuration,
  but OVAL and bash check and configure that sshd service is enabled in
  firewall.
- But we also have rule firewalld_sshd_port_enabled which checks that
  sshd service is enabled in firewall.
- Our STIG workflow recommends us that OCIL and fix should be aligned
  with bash and OVAL which means if we create OCIL and fix for rule
  configure_firewalld_ports according to this rule's existing bash and
  OVAL the rule would be even more internally inconsistent - it would be
  basically a copy of firewalld_sshd_port_enabled with a misleading
  generic title.

Therefore, in this commit, we make the rule configure_firewalld_ports
generic, remove everything related to sshd from this rule, remove OVAL
and bash because of non-automated character of this rule, and instead
update rule firewalld_sshd_port_enabled with the remediation.

See discussion in the pull request:
ComplianceAsCode#8497
@Mab879
Copy link
Member

Mab879 commented Apr 14, 2022

/retest

@Mab879
Copy link
Member

Mab879 commented Apr 14, 2022

@jan-cerny looks like this PR needs a rebase. Not sure why the boot hasn't told you about that.

@openshift-ci openshift-ci bot added the needs-rebase Used by openshift-ci bot. label Apr 15, 2022
jan-cerny added a commit to jan-cerny/scap-security-guide that referenced this pull request Apr 19, 2022
…enabled

During our work on SRG-OS-000096-GPOS-00050 we have discovered the
following:

- The requirement "The firewall should be configured sanely" isn't
  possible to be automated by SCAP because services and ports differ on
  different systems.
- At the same time there is rule "configure_firewalld_ports" that tries
  to implement it.
- The rule "configure_firewalld_ports" is internally inconsistent - its
  rationale and description are about generic firewall configuration,
  but OVAL and bash check and configure that sshd service is enabled in
  firewall.
- But we also have rule firewalld_sshd_port_enabled which checks that
  sshd service is enabled in firewall.
- Our STIG workflow recommends us that OCIL and fix should be aligned
  with bash and OVAL which means if we create OCIL and fix for rule
  configure_firewalld_ports according to this rule's existing bash and
  OVAL the rule would be even more internally inconsistent - it would be
  basically a copy of firewalld_sshd_port_enabled with a misleading
  generic title.

Therefore, in this commit, we make the rule configure_firewalld_ports
generic, remove everything related to sshd from this rule, remove OVAL
and bash because of non-automated character of this rule, and instead
update rule firewalld_sshd_port_enabled with the remediation.

See discussion in the pull request:
ComplianceAsCode#8497
@jan-cerny jan-cerny force-pushed the SRG-OS-000096-GPOS-00050 branch from 0d7fea8 to 0e27fe0 Compare April 19, 2022 09:10
@openshift-ci openshift-ci bot removed the needs-rebase Used by openshift-ci bot. label Apr 19, 2022
@jan-cerny
Copy link
Collaborator Author

I have rebased this pull request on the top of the current upstream master branch and I have changed fix to fixtext.

jan-cerny added a commit to jan-cerny/scap-security-guide that referenced this pull request Apr 19, 2022
…enabled

During our work on SRG-OS-000096-GPOS-00050 we have discovered the
following:

- The requirement "The firewall should be configured sanely" isn't
  possible to be automated by SCAP because services and ports differ on
  different systems.
- At the same time there is rule "configure_firewalld_ports" that tries
  to implement it.
- The rule "configure_firewalld_ports" is internally inconsistent - its
  rationale and description are about generic firewall configuration,
  but OVAL and bash check and configure that sshd service is enabled in
  firewall.
- But we also have rule firewalld_sshd_port_enabled which checks that
  sshd service is enabled in firewall.
- Our STIG workflow recommends us that OCIL and fix should be aligned
  with bash and OVAL which means if we create OCIL and fix for rule
  configure_firewalld_ports according to this rule's existing bash and
  OVAL the rule would be even more internally inconsistent - it would be
  basically a copy of firewalld_sshd_port_enabled with a misleading
  generic title.

Therefore, in this commit, we make the rule configure_firewalld_ports
generic, remove everything related to sshd from this rule, remove OVAL
and bash because of non-automated character of this rule, and instead
update rule firewalld_sshd_port_enabled with the remediation.

See discussion in the pull request:
ComplianceAsCode#8497
@jan-cerny jan-cerny force-pushed the SRG-OS-000096-GPOS-00050 branch from 0e27fe0 to e5af623 Compare April 19, 2022 13:44
@jan-cerny
Copy link
Collaborator Author

I have add fixtext to configure_firewalld_ports

This will make the macro text aligned with the bash remediation
in the template shared/templates/kernel_module_disabled/bash.template.
…enabled

During our work on SRG-OS-000096-GPOS-00050 we have discovered the
following:

- The requirement "The firewall should be configured sanely" isn't
  possible to be automated by SCAP because services and ports differ on
  different systems.
- At the same time there is rule "configure_firewalld_ports" that tries
  to implement it.
- The rule "configure_firewalld_ports" is internally inconsistent - its
  rationale and description are about generic firewall configuration,
  but OVAL and bash check and configure that sshd service is enabled in
  firewall.
- But we also have rule firewalld_sshd_port_enabled which checks that
  sshd service is enabled in firewall.
- Our STIG workflow recommends us that OCIL and fix should be aligned
  with bash and OVAL which means if we create OCIL and fix for rule
  configure_firewalld_ports according to this rule's existing bash and
  OVAL the rule would be even more internally inconsistent - it would be
  basically a copy of firewalld_sshd_port_enabled with a misleading
  generic title.

Therefore, in this commit, we make the rule configure_firewalld_ports
generic, remove everything related to sshd from this rule, remove OVAL
and bash because of non-automated character of this rule, and instead
update rule firewalld_sshd_port_enabled with the remediation.

See discussion in the pull request:
ComplianceAsCode#8497
Originally, check and remediation for enabling sshd ports were
a part of rule configure_firewalld_ports, but that rule was meant to
be generic. We moved these checks and remediations to
firewalld_sshd_port_enabled. So we add firewalld_sshd_port_enabled
to this control to keep the original intent.
@jan-cerny jan-cerny force-pushed the SRG-OS-000096-GPOS-00050 branch from 35388d2 to 44697ba Compare April 21, 2022 07:40
@jan-cerny
Copy link
Collaborator Author

/retest

@jan-cerny
Copy link
Collaborator Author

I have Fix firewalld command for adding services

@openshift-ci
Copy link

openshift-ci bot commented Apr 29, 2022

@jan-cerny: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-aws-ocp4-cis fcbc1ac link true /test e2e-aws-ocp4-cis
ci/prow/e2e-aws-rhcos4-moderate fcbc1ac link true /test e2e-aws-rhcos4-moderate
ci/prow/e2e-aws-rhcos4-high fcbc1ac link true /test e2e-aws-rhcos4-high
ci/prow/e2e-aws-ocp4-cis-node fcbc1ac link true /test e2e-aws-ocp4-cis-node
ci/prow/e2e-aws-ocp4-high-node fcbc1ac link true /test e2e-aws-ocp4-high-node

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

Copy link
Member

@marcusburghardt marcusburghardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@marcusburghardt
Copy link
Member

@Mab879 , I didn't merge so you also have opportunity to update your last review. Thanks

@Mab879
Copy link
Member

Mab879 commented May 2, 2022

Tests pass locally.

@Mab879 Mab879 merged commit b0a0f8c into ComplianceAsCode:master May 2, 2022
lonicerae pushed a commit to lonicerae/content that referenced this pull request May 18, 2022
…enabled

During our work on SRG-OS-000096-GPOS-00050 we have discovered the
following:

- The requirement "The firewall should be configured sanely" isn't
  possible to be automated by SCAP because services and ports differ on
  different systems.
- At the same time there is rule "configure_firewalld_ports" that tries
  to implement it.
- The rule "configure_firewalld_ports" is internally inconsistent - its
  rationale and description are about generic firewall configuration,
  but OVAL and bash check and configure that sshd service is enabled in
  firewall.
- But we also have rule firewalld_sshd_port_enabled which checks that
  sshd service is enabled in firewall.
- Our STIG workflow recommends us that OCIL and fix should be aligned
  with bash and OVAL which means if we create OCIL and fix for rule
  configure_firewalld_ports according to this rule's existing bash and
  OVAL the rule would be even more internally inconsistent - it would be
  basically a copy of firewalld_sshd_port_enabled with a misleading
  generic title.

Therefore, in this commit, we make the rule configure_firewalld_ports
generic, remove everything related to sshd from this rule, remove OVAL
and bash because of non-automated character of this rule, and instead
update rule firewalld_sshd_port_enabled with the remediation.

See discussion in the pull request:
ComplianceAsCode#8497
Vincent056 pushed a commit to Vincent056/cac-content-fork that referenced this pull request May 24, 2022
…enabled

During our work on SRG-OS-000096-GPOS-00050 we have discovered the
following:

- The requirement "The firewall should be configured sanely" isn't
  possible to be automated by SCAP because services and ports differ on
  different systems.
- At the same time there is rule "configure_firewalld_ports" that tries
  to implement it.
- The rule "configure_firewalld_ports" is internally inconsistent - its
  rationale and description are about generic firewall configuration,
  but OVAL and bash check and configure that sshd service is enabled in
  firewall.
- But we also have rule firewalld_sshd_port_enabled which checks that
  sshd service is enabled in firewall.
- Our STIG workflow recommends us that OCIL and fix should be aligned
  with bash and OVAL which means if we create OCIL and fix for rule
  configure_firewalld_ports according to this rule's existing bash and
  OVAL the rule would be even more internally inconsistent - it would be
  basically a copy of firewalld_sshd_port_enabled with a misleading
  generic title.

Therefore, in this commit, we make the rule configure_firewalld_ports
generic, remove everything related to sshd from this rule, remove OVAL
and bash because of non-automated character of this rule, and instead
update rule firewalld_sshd_port_enabled with the remediation.

See discussion in the pull request:
ComplianceAsCode#8497
@marcusburghardt marcusburghardt added the STIG STIG Benchmark related. label Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

RHEL9 Red Hat Enterprise Linux 9 product related. STIG STIG Benchmark related.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants