Skip to content
Snippets Groups Projects
Commit 565ee01d authored by Aaron Weaver's avatar Aaron Weaver
Browse files

Example Update

parent 9bee85d8
No related branches found
No related tags found
No related merge requests found
__version__ = '0.1.0' __version__ = '0.1.1'
...@@ -44,7 +44,7 @@ def create_findings(host, api_key, user, product_id, file, scanner, engagement_i ...@@ -44,7 +44,7 @@ def create_findings(host, api_key, user, product_id, file, scanner, engagement_i
""" """
# Instantiate the DefectDojo api wrapper # Instantiate the DefectDojo api wrapper
dd = defectdojo.DefectDojoAPI(host, api_key, user, proxies=proxies, timeout=90, debug=False) dd = defectdojo.DefectDojoAPI(host, api_key, user, proxies=proxies, verify_ssl=False, timeout=360, debug=False)
# Workflow as follows: # Workflow as follows:
# 1. Scan tool is run against build # 1. Scan tool is run against build
...@@ -79,12 +79,14 @@ def create_findings(host, api_key, user, product_id, file, scanner, engagement_i ...@@ -79,12 +79,14 @@ def create_findings(host, api_key, user, product_id, file, scanner, engagement_i
print "Uploading scanner data." print "Uploading scanner data."
date = datetime.now() date = datetime.now()
print scanner
upload_scan = dd.upload_scan(engagement_id, scanner, file, "true", date.strftime("%Y-%m-%d"), build=build) upload_scan = dd.upload_scan(engagement_id, scanner, file, "true", date.strftime("%Y-%m-%d"), build=build)
if upload_scan.success: if upload_scan.success:
test_id = upload_scan.id() test_id = upload_scan.id()
else: else:
print upload_scan.message print upload_scan.message
quit()
findings = dd.list_findings(engagement_id_in=engagement_id, duplicate="false", active="true", verified="true") findings = dd.list_findings(engagement_id_in=engagement_id, duplicate="false", active="true", verified="true")
print"==============================================" print"=============================================="
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment