API for vulnerability management
git clone git@github.com:wendryosales/vulnerability-manager-api.git
cd vulnerability-manager-api
Make sure you install the dependencies with your virtualenv active
python3 -m venv .venv
source .venv/bin/active
It may be different from your operating system
python3 -m pip install -r requirements.txt
Step by step
python manage.py makemigrations
python manage.py makemigrations api
python manage.py migrate
python manage.py createsuperuser
Write the superuser username, email and password
Last Step:
python manage.py runserver
Now you can access routes on your local server either via browser or through request tools.
before any request create a token for your user in the admin panel
GET /swagger
or
GET /redoc
It is possible to send data through a csv file
POST /api/upload
Login with the previously created user
.CSV for upload:
ASSET - HOSTNAME | ASSET - IP_ADDRESS | VULNERABILITY - TITLE | VULNERABILITY - SEVERITY | VULNERABILITY - CVSS | VULNERABILITY - PUBLICATION_DATE |
---|---|---|---|---|---|
CharField | CharField | CharField | CharField - MAX 20 - NULL | FloatField - NULL | DateField - NULL |
You can access admin panel to add data manually
GET /admin