Skip to main content

Provides access to the vulndb information

Project description

Python SDK to access the vulnerability database

Build Status

Installation

It’s possible to install the latest stable release from pypi:

pip install vulndb

Or if you’re interested in the latest version from our repository:

git clone https://github.com/vulndb/python-sdk.git
python setup.py install

Usage

>>> from vulndb import DBVuln
>>> dbv = DBVuln.from_id(42)
>>> dbv.title
'SQL Injection'
>>> dbv.severity
'high'
>>> r = dbv.references[0]
>>> r.url
'http://example.com/sqli-description.html'
>>> r.title
'SQL injection cheat-sheet'

More attributes, methods and helpers are well documented and available in the source code.

Contributing

Send your pull requests with improvements and bug fixes, making sure that all tests PASS:

$ cd python-sdk
$ virtualenv venv
$ . venv/bin/activate
$ pip install -r vulndb/requirements-dev.txt
$ nosetests vulndb/
..........
----------------------------------------------------------------------
Ran 10 tests in 0.355s

OK

Updating the database

This package embeds the vulnerability database in the vulndb/db/ directory. To update the database with new information follow these steps:

# Update the database
git clone https://github.com/vulndb/data.git
cp -rf data/db/*.json vulndb/db/
git add vulndb/db/

# Bump the version number
subl vulndb/version.txt

# Push to repo
git commit vulndb/db/ vulndb/version.txt -m 'Updated vulnerability database'
git push

After updating the database it’s a good idea to publish the latest at pypi using:

python setup.py sdist upload

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

vulndb-0.0.5.tar.gz (44.6 kB view details)

Uploaded Source

File details

Details for the file vulndb-0.0.5.tar.gz.

File metadata

  • Download URL: vulndb-0.0.5.tar.gz
  • Upload date:
  • Size: 44.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for vulndb-0.0.5.tar.gz
Algorithm Hash digest
SHA256 cad21812551d6ad939e233f5be8521bdac12d48f05bf869777112d9bfae53c33
MD5 f6b156099469e910b0d8592ba54beb85
BLAKE2b-256 e0216ec0e467b68e64a037212213bbe5b60db4b1f7bfa40905dddf66258cc264

See more details on using hashes here.

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