Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 03-May-2022 | - | ||||
tools/ | H | 31-Jul-2015 | - | 250 | 195 | |
vulndb/ | H | 03-May-2022 | - | 3,711 | 3,594 | |
vulndb.egg-info/ | H | 03-May-2022 | - | 105 | 77 | |
.gitignore | H A D | 28-Mar-2015 | 687 | 57 | 47 | |
LICENSE | H A D | 27-Mar-2015 | 1.4 KiB | 29 | 22 | |
PKG-INFO | H A D | 31-Jul-2015 | 3.4 KiB | 105 | 77 | |
README.rst | H A D | 31-Jul-2015 | 2.1 KiB | 86 | 59 | |
circle.yml | H A D | 28-Mar-2015 | 392 | 20 | 15 | |
setup.cfg | H A D | 31-Jul-2015 | 59 | 6 | 4 | |
setup.py | H A D | 03-Apr-2015 | 1.3 KiB | 45 | 29 |
README.rst
1Python SDK to access the `vulnerability database <https://github.com/vulndb/data>`_ 2 3.. image:: https://circleci.com/gh/vulndb/python-sdk/tree/master.svg?style=svg 4 :alt: Build Status 5 :align: right 6 :target: https://circleci.com/gh/vulndb/python-sdk/tree/master 7 8Installation 9============ 10It's possible to install `the latest stable release from pypi <https://pypi.python.org/pypi/vulndb>`_: 11 12:: 13 14 pip install vulndb 15 16 17Or if you're interested in the latest version from our repository: 18 19:: 20 21 git clone https://github.com/vulndb/python-sdk.git 22 python setup.py install 23 24Usage 25===== 26 27:: 28 29 >>> from vulndb import DBVuln 30 >>> dbv = DBVuln.from_id(42) 31 >>> dbv.title 32 'SQL Injection' 33 >>> dbv.description 34 'A long and actionable description for SQL injection ...' 35 >>> dbv.fix_guidance 36 'Explains the developer how to fix SQL injections, usually a couple of <p> long ...' 37 >>> dbv.severity 38 'high' 39 >>> r = dbv.references[0] 40 >>> r.url 41 'http://example.com/sqli-description.html' 42 >>> r.title 43 'SQL injection cheat-sheet' 44 45 46More attributes, methods and helpers are well documented and available in the 47`source code <https://github.com/vulndb/python-sdk/blob/master/vulndb/db_vuln.py>`_. 48 49Contributing 50============ 51Send your `pull requests <https://help.github.com/articles/using-pull-requests/>`_ 52with improvements and bug fixes, making sure that all tests ``PASS``: 53 54:: 55 56 $ cd python-sdk 57 $ virtualenv venv 58 $ . venv/bin/activate 59 $ pip install -r vulndb/requirements-dev.txt 60 $ nosetests vulndb/ 61 .......... 62 ---------------------------------------------------------------------- 63 Ran 10 tests in 0.355s 64 65 OK 66 67 68Updating the database 69===================== 70This package embeds the `vulnerability database <https://github.com/vulndb/data>`_ 71in the ``vulndb/db/`` directory. To update the database with new information 72follow these steps: 73 74:: 75 76 # Update the database 77 tools/update-db.sh 78 79After updating the database it's a good idea to publish the latest at ``pypi`` using: 80 81:: 82 83 python setup.py sdist upload 84 85 86