cve-db

module
v0.0.0-...-262f678 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 30, 2024 License: Apache-2.0

README

cve-db

Build DB GitHub Release Downloads Go Report Card Go Doc License

Overview

cve-db is a CLI tool and a library to manipulate Cve DB.

Library

Cve uses cve-db internally to manipulate vulnerability DB. This DB has vulnerability information from NVD, Red Hat, Debian, etc.

CLI

The cve-db CLI tool builds vulnerability DBs. A GitHub Actions workflow periodically builds a fresh version of the vulnerability DB using cve-db and uploads it to the GitHub Container Registry (see Download the vulnerability database below).

NAME:
   cve-db - Cve DB builder

USAGE:
   main [global options] command [command options] image_name

VERSION:
   0.0.1

COMMANDS:
     build    build a database file
     help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --help, -h     show help
   --version, -v  print the version
Building the DB

You can utilize make db-all to build the database, the DB artifact is outputted to the assets folder.

Alternatively Docker is supported, you can run docker build . -t cve-db.

If you want to build a cve integration test DB, please run make create-test-db

Update interval

Every 6 hours

Download the vulnerability database

version 1 (deprecated)

Cve DB v1 reached the end of support on February 2023. Please upgrade Cve to v0.23.0 or later.

Read more about the Cve DB v1 deprecation in the discussion.

version 2

Cve DB v2 is hosted on GHCR. Although GitHub displays the docker pull command by default, please note that it cannot be downloaded using docker pull as it is not a container image.

You can download the actual compiled database via Cve or Oras CLI.

Cve:

CVE_TEMP_DIR=$(mktemp -d)
cve --cache-dir $CVE_TEMP_DIR image --download-db-only
tar -cf ./db.tar.gz -C $CVE_TEMP_DIR/db metadata.json cve.db
rm -rf $CVE_TEMP_DIR

oras >= v0.13.0:

$ oras pull ghcr.io/khulnasoft-lab/cve-db:2

oras < v0.13.0:

$ oras pull -a ghcr.io/khulnasoft-lab/cve-db:2

The database can be used for Air-Gapped Environment.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL