An API wrapper for DefectDojo.
Project description
THIS API WRAPPER IS DEVELOPE BY MEp
See clients and api wrappers in the docs <https://defectdojo.github.io/django-DefectDojo/integrations/api-v2-docs/#clients--api-wrappers>_ for alternatives
DefectDojo API
A Python API wrapper for DefectDojo <https://github.com/OWASP/django-DefectDojo>_, an AppSec and Security Vulnerability Management tool.
This package implements API functionality available within Dojo.
Quick Start
Several quick start options are available:
-
Clone the repository: :code:
git clone https://github.com/DefectDojo/defectdojo_api -
Install with pip (not recommended): :code:
pip install git+https://github.com/DefectDojo/defectdojo_api#master -
If you are testing the api locally make sure to set the PYTHONPATH. export PYTHONPATH=/path/totheapi/defectdojo_api:$PYTHONPATH
Example
.. code-block:: python
# import the package
from defectdojo_api import defectdojo
# setup DefectDojo connection information
host = 'http://localhost:8000/'
api_key = 'your_api_key_from_DefectDojo'
user = 'admin'
# instantiate the DefectDojo api wrapper
dd = defectdojo.DefectDojoAPI(host, api_key, user, debug=False)
# If you need to disable certificate verification, set verify_ssl to False.
# dd = defectdojo.DefectDojoAPI(host, api_key, user, verify_ssl=False)
# Create a product
prod_type = 1 #1 - Research and Development, product type
product = dd.create_product("API Product Test", "This is a detailed product description.", prod_type)
if product.success:
# Get the product id
product_id = product.id()
print "Product successfully created with an id: " + str(product_id)
#List Products
products = dd.list_products()
if products.success:
print(products.data_json(pretty=True)) # Decoded JSON object
for product in products.data["objects"]:
print(product['name']) # Print the name of each product
else:
print products.message
More examples available <https://github.com/aaronweaver/defectdojo_api/tree/master/examples>_ on Github.
Supporting information for each method available can be found in the documentation <https://defectdojo-api.readthedocs.io>_.
Bugs and Feature Requests
Have a bug or a feature request? Please first search for existing and closed issues. If your problem or idea is not addressed yet, please open a new issue <https://github.com/aaronweaver/defectdojo_api/issues/new>_.
Copyright and License
Licensed under MIT <https://github.com/aaronweaver/defectdojo_api/blob/master/LICENSE.txt>_.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gt_defect_dojo-0.0.6.tar.gz.
File metadata
- Download URL: gt_defect_dojo-0.0.6.tar.gz
- Upload date:
- Size: 101.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c8d1690e6304ba81a96a8c86a033bdea731940c2326840f2cf56530cf254f86
|
|
| MD5 |
6d4b84f36c24c49256b64d33ff4c8687
|
|
| BLAKE2b-256 |
f810c3ca4e5873e96969a0b0e6b00a552528778386f0f32da6fc929ede7af523
|
File details
Details for the file gt_defect_dojo-0.0.6-py3-none-any.whl.
File metadata
- Download URL: gt_defect_dojo-0.0.6-py3-none-any.whl
- Upload date:
- Size: 13.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f286ea63a065fe4eecda71489b16be90c13b0c819e937d7992e7a737470d845e
|
|
| MD5 |
6b0cab4684ac4e11927ca85e74732846
|
|
| BLAKE2b-256 |
cbc099ab34754bd350df7610efbe765c087e2c334a10284a5b39d36e7555be52
|