Performing a Compliance Scan and Active Remediation Using OSCAP

30 minutes
  • 3 Learning Objectives

About this Hands-on Lab

In this lab, we’ll install and use openscap-scanner from the terminal. Using active remediation, we’ll run a compliance scan that will permit OpenSCAP to fix any problems it finds. Then we’ll create a report from the scan findings. Lastly, we’ll review the report findings to see what OpenSCAP found and was able to remediate.

*This course is not approved or sponsored by Red Hat.*

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Install the Necessary Packages
  1. Become root.

    sudo su 
  2. Install the OpenSCAP scanner and the SCAP security guide.

    yum install -y openscap-scanner scap-security-guide
Run a Compliance Scan with Remediation
  1. Use the following command to run a scan with remediation:
    oscap xccdf eval --remediate --profile xccdf_org.ssgproject.content_profile_rht-ccp --results scan-results.xml /usr/share/xml/scap/ssg/content/ssg-rhel7-ds.xml
Generate a Report from the Scan Results
  1. Run the following command to generate a report:
    oscap xccdf generate report scan-results.xml > scan-results.html

Additional Resources

You've been asked to remote into a host and run a compliance scan with active remediation. This host is not running a desktop environment so all activities must be done from a terminal.

Once the scan and remediation are complete, generate a report named scan-results.html. Use the XCCDF profile xccdf_org.ssgproject.content_profile_rht-ccp and the benchmark file /usr/share/xml/scap/ssg/content/ssg-rhel7-ds.xml.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?