Git Product home page Git Product logo

ubuntu-cve-oval's Introduction

Using OVAL from the Ubuntu Security Team

The Ubuntu Security Team produces OVAL files that can be used to help determine how vulnerable a system is.

The OVAL files are available from here. The files are release-specific.

More background on OVAL and OSCAP.

Traditionally, OVAL would be used by downloading it, running a scan and reviewing the generated report. This method certainly has it's place. However, I thought there needed to be a quicker and faster way of getting some specific information. Specifically, I wanted to see if there was anything vulnerable on my system that could be fixed by a package update and I wanted a way to determine if my system was vulnerable to a specific CVE.

In order to accomplish this I needed a reliable way to parse the oscap results XML into something more easily digestable than the default HTML report output. I fumbled around with some grep/awk/perl/python scripts. Finally I stumbled upon the XSLT file that oscap uses to create the HTML report from the XML results. On my system it gets installed as /usr/share/openscap/xsl/oval-results-report.xsl by the libopenscap8 package. I changed it to output text instead of HTML and started stripping away what I did not need. There might be more that can still be removed from the XSLT or other optimizations that can be made... I make know claims of knowing anything about XML or related tools.

Contents

  • README.md - this file
  • text.xsl - modified version of oscap xslt file to output cve list in text format
  • cvescan - script to download oval and scan your system

Prereqs

sudo apt-get install -y libopenscap8 xsltproc

Using cvescan

./cvescan -? will display complete usage

Below are some examples:

./cvescan # display a list of CVEs affecting this system that can be fixed with package updates ./cvescan -a # display ALL CVEs affecting this system instead of just CVEs with package fixes ./cvescan -c CVE-2019-54321 # output "vulnerable" and exit 1 if vulnerable. Output "not vulnerable" and exit 0 if not vulnerable ./cvescan -c CVE-2019-54321 -s # similar to above but no output, only exit values

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.