Skip to main content

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)

Uploaded Source

Built Distribution

threat_db-0.1.0-py3-none-any.whl (17.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page