Vulnerability Database API

REST API for the Vulnerability Database.

For running the component locally, you need to have access to the vulnerability-db repo, as it's the one that contains the DB schema and migrations. For running the component locally, clone and run at the root of the repo the following:

go install ./...
cd ../vulnerability-db/db && source postgres-start.sh && cd -
cd ../vulnerability-db/db && source flyway-migrate.sh && cd -
vulnerability-db-api -c _resources/config/local.toml

Docker execute

Those are the variables you have to use:

Variable Description Sample
LOG_LEVEL error
PG_HOST Database host localhost
PG_NAME Database name vulnerabilitydb
PG_USER Database user vulnerabilitydb
PG_PASSWORD Database password vulnerabilitydb
PG_PORT Database port 5432
PG_SSLMODE One of these (disable,allow,prefer,require,verify-ca,verify-full) disable
PG_CA_B64 A base64 encoded CA certificate
docker build . -t vdba

# Use the default config.toml customized with env variables.
docker run --env-file ./local.env vdba

# Use custom config.toml
docker run -v `pwd`/custom.toml:/app/config.toml vdba