A graphql server for vulnerabilities powered by dgraph
Project description
Introduction
Development setup
git clone <repo>
cd threat-db
mkdir -p $HOME/dgraph $HOME/threatdb_data_dir
docker compose up
This would start a minimal api and an instance of dgraph standalone.
Create schemas
To explicitly create the schemas prior to importing data
git clone <repo>
poetry install
threat_db --init --dgraph-host localhost:9080 --graphql-host http://localhost:8080
Schema creation is automatic when the api runs from docker compose.
Import data
threat_db --data-dir
When invoked with docker compose, any json file present in the directory THREATDB_DATA_DIR
would be imported automatically.
Rest API
Healthcheck
curl http://0.0.0.0:9000/healthcheck
Import data
curl -F 'file=@/tmp/bom.json' http://0.0.0.0:9000/import
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
threat_db-0.1.0.tar.gz
(15.4 kB
view hashes)
Built Distribution
threat_db-0.1.0-py3-none-any.whl
(17.8 kB
view hashes)
Close
Hashes for threat_db-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b65bdfe0ce2aa757b40f53f0228fe75025c7e818a3ee621984d171f0bf047bf |
|
MD5 | 3fc1116590e02e5c1d9270b2700f6738 |
|
BLAKE2b-256 | f1edb73706bdde831199553f3495ae8a2773df42c860081ef84ce3bcea6ac06d |