Giter Site home page Giter Site logo

defectdojo_api's Introduction

DefectDojo API

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
  • If you are testing the api locally make sure to set the PYTHONPATH. export PYTHONPATH=/path/totheapi/defectdojo_api:$PYTHONPATH

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.

Copyright and License

defectdojo_api's People

Contributors

aaronweaver avatar brianlam38 avatar pavkir avatar siddse7en avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.