Command Line Interface#
This section describes the various commands available.
All commands below are run from the Vulnerability-Lookup project directory using poetry run.
Core#
Start all the services#
$ poetry run start
Stop all the services#
$ poetry run stop
Start/stop the backend (Valkey and Kvrocks)#
$ poetry run run_backend --start
$ poetry run run_backend --stop
Start/stop all enabled feeders#
$ poetry run feeders_manager --start
$ poetry run feeders_manager --stop
Start only the website#
$ poetry run start_website
Restart only the website#
$ poetry run restart_website
Dump a source in a JSON file#
$ poetry run dump --feed nvd
Run an individual feeder manually#
$ poetry run nvd_importer
$ poetry run cvelist_importer
$ poetry run github_importer
See pyproject.toml under [project.scripts] for the full list of available feeder commands.
Update the documentation#
$ cd docs; poetry run make html
Web service#
This section describes the main commands related to the web service.
All Flask commands are prefixed with poetry run flask --app website.app.
Database#
Init the database:
$ poetry run flask --app website.app db_init
Backup the PostgreSQL database (also runs automatically during poetry run update):
$ poetry run flask --app website.app db_backup
Generate a database models diagram:
$ poetry run flask --app website.app db_diagram
User management#
Create a user:
$ poetry run flask --app website.app create_user --login <login> --email <email> --password <password>
Create an admin:
$ poetry run flask --app website.app create_admin --login <login> --email <email> --password <password>
List all users:
$ poetry run flask --app website.app user_list
Delete a user:
$ poetry run flask --app website.app user_delete --login <login>
Retrieve a user’s API key:
$ poetry run flask --app website.app user_get_api_key --login <login>
Data management#
Update MISP warning lists (the administrator will be prompted to run this during updates):
$ poetry run flask --app website.app update_warninglists
Update the local copy of the GCVE registry (can be scheduled via cron):
$ poetry run flask --app website.app update_gcve_registry
Import OSI-approved licenses:
$ poetry run flask --app website.app import_osi_approved_licenses
Import source code languages:
$ poetry run flask --app website.app import_languages
Clean sightings by source or pattern:
$ poetry run flask --app website.app clean_sightings
Background services#
Launch the email notification service:
$ poetry run flask --app website.app notify_users
Launch the synchronization service (see Synchronization service for details):
$ poetry run flask --app website.app sync