Skip to main content

An API wrapper for DefectDojo.

Project description

A Python API wrapper for DefectDojo, an AppSec and Security Vulnerability Management tool.

This package implements API functionality available within Dojo.

Quick Start

Several quick start options are available:

  • Install with pip (recommended): pip install defectdojo_api

  • Download the latest release

  • Clone the repository: git clone https://github.com/aaronweaver/defectdojo_api

Example

# 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 on Github.

Supporting information for each method available can be found in the documentation.

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.

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

defectdojo_api-0.1.1.tar.gz (15.1 kB view details)

Uploaded Source

File details

Details for the file defectdojo_api-0.1.1.tar.gz.

File metadata

File hashes

Hashes for defectdojo_api-0.1.1.tar.gz
Algorithm Hash digest
SHA256 37aa37e8e3c90aff2319cfabab852bad51d7a4b11f49d7cc194ba112247523ff
MD5 2b3320cd6fbf39855c22346b4056c7ef
BLAKE2b-256 aae7815460e413a90faaf48b810a58f5e447dda9da2d934b3f0bc8e876fc870a

See more details on using hashes here.

Supported by

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