JGoutin / ansible_home

A collection of Ansible roles for home free software self-hosting.
https://galaxy.ansible.com/jgoutin/home
GNU General Public License v3.0
31 stars 6 forks source link

common: OpenSCAP #70

Closed JGoutin closed 1 year ago

JGoutin commented 1 year ago

Install scanner and try to fix resulting findings.

https://www.open-scap.org/

# Install
sudo dnf install openscap-scanner scap-security-guide -y

# List Policies
ls -1 /usr/share/xml/scap/ssg/content/ssg-*-ds.xml | grep fedora

# Get policy information (With policy path listed in previous command)
oscap info /usr/share/xml/scap/ssg/content/ssg-fedora-ds.xml

# Run check (With profile listed in previous command)
oscap xccdf eval --profile xccdf_org.ssgproject.content_profile_ospp --report /tmp/report_ospp.html /usr/share/xml/scap/ssg/content/ssg-fedora-ds.xml &
oscap xccdf eval --profile xccdf_org.ssgproject.content_profile_pci-dss --report /tmp/report_pci-dss.html /usr/share/xml/scap/ssg/content/ssg-fedora-ds.xml &
oscap xccdf eval --profile xccdf_org.ssgproject.content_profile_standard --report /tmp/report_standard.html /usr/share/xml/scap/ssg/content/ssg-fedora-ds.xml &
wait

To skip slow check --skip-rule xccdf_org.ssgproject.content_rule_rpm_verify_hashes --skip-rule xccdf_org.ssgproject.content_rule_rpm_verify_permissions.

Rules details here: https://www.open-scap.org/security-policies/choosing-policy


Rules fixed by optional switches:

Rules that cannot be remediated:

Ignored rules:

Rules that should "pass" but are detected as "fail", and requires to be investigated:

Rules that should "pass" but are detected as "fail" in OpenSCAP:

scratch.txt