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

Update CCI Numbers due to new STIG/SRG GPOS #12374

Merged
merged 7 commits into from
Sep 27, 2024

Conversation

Mab879
Copy link
Member

@Mab879 Mab879 commented Sep 10, 2024

Description and Rationale:

Keep the CCI numbers updated.

Review Hints:

@Mab879 Mab879 added the Update Rule Issues or pull requests related to Rules updates. label Sep 10, 2024
@Mab879 Mab879 added this to the 0.1.75 milestone Sep 10, 2024
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Used by openshift-ci bot. label Sep 10, 2024
Copy link

openshift-ci bot commented Sep 10, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-merge-robot openshift-merge-robot added the needs-rebase Used by openshift-ci bot. label Sep 10, 2024
Copy link

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

Fedora Environment
Open in Gitpod

Oracle Linux 8 Environment
Open in Gitpod

Copy link

github-actions bot commented Sep 10, 2024

🤖 A k8s content image for this PR is available at:
ghcr.io/complianceascode/k8scontent:12374
This image was built from commit: e068799

Click here to see how to deploy it

If you alread have Compliance Operator deployed:
utils/build_ds_container.py -i ghcr.io/complianceascode/k8scontent:12374

Otherwise deploy the content and operator together by checking out ComplianceAsCode/compliance-operator and:
CONTENT_IMAGE=ghcr.io/complianceascode/k8scontent:12374 make deploy-local

@Mab879 Mab879 assigned Mab879 and unassigned Mab879 Sep 12, 2024
@Mab879 Mab879 marked this pull request as ready for review September 12, 2024 18:27
@Mab879 Mab879 requested a review from a team as a code owner September 12, 2024 18:27
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Used by openshift-ci bot. label Sep 12, 2024
@Mab879 Mab879 marked this pull request as draft September 12, 2024 18:27
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Used by openshift-ci bot. label Sep 12, 2024
@Mab879 Mab879 changed the title Draft: Update CCI Numbers due to new STIG/SRG GPOS Update CCI Numbers due to new STIG/SRG GPOS Sep 13, 2024
@Mab879 Mab879 marked this pull request as ready for review September 13, 2024 13:19
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Used by openshift-ci bot. label Sep 13, 2024
@vojtapolasek vojtapolasek self-assigned this Sep 17, 2024
@vojtapolasek
Copy link
Collaborator

Hello @Mab879 and thanks for this update. I have few questions.

  1. Would you consider modifying the script clean_up_dupkeys.py so that your home path is not there? I don't see this as a good security practice. The path can be set through a variable.
  2. How did you actually get list of paths used in the clean_up_dupkeys.py?
  3. Just so that I understand... the workflow was like running the update_cci.py and then clean_up_dupkeys?
  4. How were commits d638711 and de5fafc created? The description is vague.

Thank you for answering these questions.

@Mab879
Copy link
Member Author

Mab879 commented Sep 19, 2024

Hello @Mab879 and thanks for this update. I have few questions.

1. Would you consider modifying the script clean_up_dupkeys.py so that your home path is not there? I don't see this as a good security practice. The path can be set through a variable.

I just removed my home folder. Paths are now relative to SSG_ROOT.

2. How did you actually get list of paths used in the clean_up_dupkeys.py?

I used grep to find files with two disa keys`.

3. Just so that I understand... the workflow was like running the update_cci.py and then clean_up_dupkeys?

The vast majority was done that way.

4. How were commits [d638711](https://github.com/ComplianceAsCode/content/commit/d6387117cc7780bedb5b7000f5dbb417b71f97e4) and [de5fafc](https://github.com/ComplianceAsCode/content/commit/de5fafc39da87be83d2b525a4d669e93e7230d82) created? The description is vague.
  • d6387117cc7780bedb5b7000f5dbb417b71f97e4 - Was my manual try at the updates
  • de5fafc39da87be83d2b525a4d669e93e7230d82 - Was the automated way

@vojtapolasek
Copy link
Collaborator

Hello @Mab879 and thank you for explanation.
I wrote a simple script trying to check ccis in the content against the latest RHEL 9 STIG. I am attaching it to this comment.

I built the rhel9 content and I ran it from the project's root directory. This is the output I get:

❯ python check_ccis.py 
xccdf_org.ssgproject.content_rule_configure_crypto_policy seems to not have matching ccis when compared to original stig guide.
Stigid(s) from content: ['RHEL-09-671010', 'RHEL-09-672030', 'RHEL-09-672045']
Related rule titles from original stig guide: RHEL 9 must enable FIPS mode.,RHEL 9 must implement DOD-approved TLS encryption in the GnuTLS package.,RHEL 9 must implement a system-wide encryption policy.
CCIs from content: {'CCI-002450', 'CCI-003123', 'CCI-002890'}
CCIs from stig guide: {'CCI-002418', 'CCI-002890', 'CCI-003123', 'CCI-000068', 'CCI-000877', 'CCI-001453', 'CCI-002450'}
xccdf_org.ssgproject.content_rule_package_mcafeetp_installed contains stigid which does not exist in the original stig guide.
xccdf_org.ssgproject.content_rule_package_mcafeetp_installed seems to not have matching ccis when compared to original stig guide.
Stigid(s) from content: ['RHEL-09-211025']
Related rule titles from original stig guide: 
CCIs from content: {'CCI-001263', 'CCI-000366'}
CCIs from stig guide: set()
xccdf_org.ssgproject.content_rule_agent_mfetpd_running contains stigid which does not exist in the original stig guide.
xccdf_org.ssgproject.content_rule_agent_mfetpd_running seems to not have matching ccis when compared to original stig guide.
Stigid(s) from content: ['RHEL-09-211025']
Related rule titles from original stig guide: 
CCIs from content: {'CCI-001263', 'CCI-000366'}
CCIs from stig guide: set()
xccdf_org.ssgproject.content_rule_dconf_gnome_disable_autorun seems to not have matching ccis when compared to original stig guide.
Stigid(s) from content: ['RHEL-09-271030', 'RHEL-09-271035']
Related rule titles from original stig guide: RHEL 9 must disable the graphical user interface autorun function unless required.,RHEL 9 must prevent a user from overriding the disabling of the graphical user interface autorun function.
CCIs from content: {'CCI-000366', 'CCI-001958', 'CCI-000778'}
CCIs from stig guide: {'CCI-000366', 'CCI-001764', 'CCI-000778', 'CCI-001958'}
xccdf_org.ssgproject.content_rule_enable_authselect contains stigid which does not exist in the original stig guide.
xccdf_org.ssgproject.content_rule_enable_authselect seems to not have matching ccis when compared to original stig guide.
Stigid(s) from content: ['needed_rules']
Related rule titles from original stig guide: 
CCIs from content: {'CCI-000213'}
CCIs from stig guide: set()
xccdf_org.ssgproject.content_rule_accounts_password_pam_pwhistory_remember_password_auth contains stigid which does not exist in the original stig guide.
xccdf_org.ssgproject.content_rule_accounts_password_pam_pwhistory_remember_password_auth seems to not have matching ccis when compared to original stig guide.
Stigid(s) from content: ['RHEL-09-611015']
Related rule titles from original stig guide: 
CCIs from content: {'CCI-000200'}
CCIs from stig guide: set()
xccdf_org.ssgproject.content_rule_accounts_password_pam_pwhistory_remember_system_auth contains stigid which does not exist in the original stig guide.
xccdf_org.ssgproject.content_rule_accounts_password_pam_pwhistory_remember_system_auth seems to not have matching ccis when compared to original stig guide.
Stigid(s) from content: ['RHEL-09-611020']
Related rule titles from original stig guide: 
CCIs from content: {'CCI-000200'}
CCIs from stig guide: set()

I think findings are valid. Could you please check these results?
check_ccis.py.txt

# Conflicts:
#	linux_os/guide/auditing/package_audispd-plugins_installed/rule.yml
#	linux_os/guide/system/logging/package_rsyslog-gnutls_installed/rule.yml
#	linux_os/guide/system/software/system-tools/package_gnutls-utils_installed/rule.yml
#	linux_os/guide/system/software/system-tools/package_nss-tools_installed/rule.yml
This reverts commit 6fe6cf3.
The scripts due not need to stay the repo.
No longer in RHEL 9 STIG as V2R1.
Copy link

openshift-ci bot commented Sep 26, 2024

@Mab879: 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/4.17-images e068799 link true /test 4.17-images
ci/prow/4.16-images e068799 link true /test 4.16-images

Full PR test history. Your PR dashboard.

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-sigs/prow repository. I understand the commands that are listed here.

Copy link

codeclimate bot commented Sep 26, 2024

Code Climate has analyzed commit e068799 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 59.5% (0.0% change).

View more on Code Climate.

@Mab879
Copy link
Member Author

Mab879 commented Sep 26, 2024

/retest-failed

Copy link
Collaborator

@vojtapolasek vojtapolasek left a comment

Choose a reason for hiding this comment

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

LGTM now, thank you.
I am waiving failing tests because they are unrelated to changes in this PR. This PR changes only references.

@vojtapolasek vojtapolasek merged commit cdf6e6a into ComplianceAsCode:master Sep 27, 2024
97 of 100 checks passed
@vojtapolasek vojtapolasek added RHEL9 Red Hat Enterprise Linux 9 product related. STIG STIG Benchmark related. labels Sep 27, 2024
@Mab879 Mab879 deleted the update_cci branch September 27, 2024 12:23
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. Update Rule Issues or pull requests related to Rules updates.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants