unixcop Admin

How To Install OpenSCAP on Ubuntu 20.04 | 22.04 LTS

In this tutorial, we will show you how to install OpenSCAP on Ubuntu systems.

The OpenSCAP ecosystem provides multiple tools to assist administrators and auditors with assessment, measurement, and enforcement of security baselines. We maintain great flexibility and interoperability, reducing the costs of performing security audits. It provides a wide variety of hardening guides and configuration baselines developed by the open source community, ensuring that you can choose a security policy which best suits the needs of your organization, regardless of its size.

Install OpenScap on Ubuntu-APT method

Follow the steps below to get started with OpenScap :

  • Update your Ubuntu system packages with running the below command:
sudo apt update -y && sudo apt upgrade -y
  • OpenScap package is available on Ubuntu base repository. So You can install it directly as shown below:
sudo apt install libopenscap8 -y
  • Verify OpenSCAP is installed by checking its version with the below command:
oscap --version

Install Oval

Oval is an open Vulnerability and Assessment Language

  • Download Oval from the official website as follows:
  • Run the system audit using the following command:
oscap oval eval --results /tmp/oscap_results.xml --report /tmp/oscap_report.html com.ubuntu.xenial.cve.oval.xml
  • Then copy the generated HTML report to /var/www/html path:
sudo cp /tmp/oscap_report.html /var/www/html

Access OpenSCAP via Web Interface

  • As shown below, Open your favorite web browser and type the URL http://your-IP-address/oscap_report.html to view your system audit results.
Install OpenSCAP
Install OpenSCAP

Install OpenSCAP -Conclusion

That’s it



Please enter your comment!
Please enter your name here

Latest articles

Join us on Facebook