Giter VIP home page Giter VIP logo

trivy-db's Introduction

trivy-db

Build DB GitHub Release Downloads Go Report Card Go Doc License

Overview

trivy-db is a CLI tool and a library to manipulate Trivy DB.

Library

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

CLI

trivy-db builds vulnerability DBs on GitHub Actions and uploads them to GitHub Release periodically.

NAME:
   trivy-db - Trivy DB builder

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

VERSION:
   0.0.1

COMMANDS:
     build    build a database file
     upload   upload database files to GitHub Release
     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 trivy-db.

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

Update interval

Every 6 hours

Download the vulnerability database

version 1 (deprecated)

Trivy DB v1 is for backwards compatibility only. You can download it from releases.

version 2

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

Trivy:

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

oras >= v0.13.0:

$ oras pull ghcr.io/aquasecurity/trivy-db:2

oras < v0.13.0:

$ oras pull -a ghcr.io/aquasecurity/trivy-db:2

The database can be used for Air-Gapped Environment.

trivy-db's People

Contributors

afdesk avatar andreylevchenko avatar ankk13 avatar brcrwilliams avatar dmitriylewen avatar galdevel avatar iamdanfox avatar kgeorgiou avatar knqyf263 avatar krol3 avatar lizrice avatar luhring avatar mainek00n avatar masahiro331 avatar mayrstefan avatar mozillazg avatar mrueg avatar neha-viswanathan avatar rahul2393 avatar santhosh1729 avatar simar7 avatar sudiptog81 avatar thepwagner avatar tonaim 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.