Code Monkey home page Code Monkey logo

ubuntu-cve-verify's Introduction

Ubuntu-CVE-Verify

This repo contains a Python source file for taking a Sysdig image scan result csv file as input, cross checking the combination of CVE and Ubuntu package name against the Ubuntu CVE database. It is assumed that the input csv file format is such that it contains the following columns:

  • Feed

  • Feed Group

  • Fix

  • Nvd Data (JSON)

  • Package

  • Package_Cpe

  • Package_Name

  • Package_Path

  • Package_Type

  • Severity

  • Url

  • Vendor_Data

  • Vuln

  • CVE (optional)

    This repo contains the sample file Consolidated_Dec-Sheet1.csv which is in this format

In order to run cross_check.py a number of python packages should be imported using pip3:

pip3 install requests
pip3 install beautifulsoup4
pip3 install pandas
pip3 install numpy

If the code is to be executed from within VS Code, it is recommended that a Python virtual environment is created, otherwise Python will complain about not being able to find the source code for the numpy package, do this as follows:

python3 -m venv myenv

Execute the program as follows

python3 cross_check.py -i <path to source csv file> -o <path to output csv file>

The output spreadsheet produced by running the python code will contain the columns from the source csv file plus two new columns:

  • CVE2 Essentially a copy of the CVE column

  • Ubuntu_CVE_lookup The "Ubuntu_CVE_Lookup" column contains the package name that the CVE relates to according to Ubuntu and its status, one of:

    • "No match in Ubuntu 22.04 CVE database", for example if you lookup CVE-2022-47695 you will see that this only returns information for binutils, hence for libctf-nobfd0 you get a status of . . . "No match in Ubuntu 22.04 CVE database"
    • 'Released' - a fix has been released
    • 'Needed' - the Ubuntu team has identified that a fix is needed, put no patch/fix has been provided yet, this status is typically for newly discovered vulnerabilities
    • 'Deferred' - the package (for the given release) is vulnerable, the problem is understood, but has been deferred for some reason.
    • "Needs triage" - the vulnerability of this package (for the given release) is not known. It needs to be evaluated.
    • "Not vulnerable" - self explanatory

Refer to the file Ubuntu_2204_CVE_cf_Dec-Sheet1.csv as an example output file which has been produced by running cross_check.py against the sample input file Consolidated_Dec-Sheet1.csv.

ubuntu-cve-verify's People

Contributors

chrisadkin8 avatar

Watchers

 avatar

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.