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

Add package prelink removed #10062

Merged
merged 3 commits into from
Jan 17, 2023

Conversation

Mab879
Copy link
Member

@Mab879 Mab879 commented Jan 13, 2023

Description:

  • Add new rule package_prelink_removed
  • Add package_prelink_removed to RHEL 7 CIS profile

Rationale:

Increase coverage for RHEL 7 CIS.

Added custom remediations due since we need to restore binaries before
removing the package.
@Mab879 Mab879 added New Rule Issues or pull requests related to new Rules. RHEL7 Red Hat Enterprise Linux 7 product related. CIS CIS Benchmark related. labels Jan 13, 2023
@Mab879 Mab879 added this to the 0.1.66 milestone Jan 13, 2023
@Mab879 Mab879 requested a review from a team as a code owner January 13, 2023 20:30
@github-actions
Copy link

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

rhel7 (from CTF) Environment (using Fedora as testing environment)
Open in Gitpod

Fedora Testing Environment
Open in Gitpod

Oracle Linux 8 Environment
Open in Gitpod

@jan-cerny jan-cerny self-assigned this Jan 16, 2023
Copy link
Collaborator

@jan-cerny jan-cerny left a comment

Choose a reason for hiding this comment

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

The automatus CI fail is caused by the fact that this rule has prodtype: rhel7 therefore the rule is RHEL 7 only and the rule doesn't exist on products where automatus runs.

@codeclimate
Copy link

codeclimate bot commented Jan 16, 2023

Code Climate has analyzed commit 714076b 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 49.8% (0.0% change).

View more on Code Climate.

Copy link
Collaborator

@jan-cerny jan-cerny left a comment

Choose a reason for hiding this comment

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

The automatus CI fail is caused by the fact that this rule has prodtype: rhel7 therefore the rule is RHEL 7 only and the rule doesn't exist on products where automatus runs.

[jcerny@thinkpad scap-security-guide{pr/10062}]$ python3 tests/automatus.py rule  --libvirt qemu:///system ssgts_rhel7 package_prelink_removed
Setting console output to log level INFO
INFO - The base image option has not been specified, choosing libvirt-based test environment.
INFO - Logging into /home/jcerny/work/git/scap-security-guide/logs/rule-custom-2023-01-17-0935/test_suite.log
INFO - xccdf_org.ssgproject.content_rule_package_prelink_removed
INFO - Script package-removed.pass.sh using profile (all) OK
INFO - Script package-installed-removed.pass.sh using profile (all) OK
INFO - Script package-installed.fail.sh using profile (all) OK
[jcerny@thinkpad scap-security-guide{pr/10062}]$ python3 tests/automatus.py rule  --libvirt qemu:///system ssgts_rhel7 --remediate-using ansible package_prelink_removed
Setting console output to log level INFO
INFO - The base image option has not been specified, choosing libvirt-based test environment.
INFO - Logging into /home/jcerny/work/git/scap-security-guide/logs/rule-custom-2023-01-17-0938/test_suite.log
INFO - xccdf_org.ssgproject.content_rule_package_prelink_removed
INFO - Script package-installed.fail.sh using profile (all) OK
INFO - Script package-installed-removed.pass.sh using profile (all) OK
INFO - Script package-removed.pass.sh using profile (all) OK

@jan-cerny jan-cerny merged commit c688eba into ComplianceAsCode:master Jan 17, 2023
@Mab879 Mab879 deleted the add_package_prelink_removed branch January 17, 2023 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CIS CIS Benchmark related. New Rule Issues or pull requests related to new Rules. RHEL7 Red Hat Enterprise Linux 7 product related.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants