I am trying to run the dojo_ci_cd.py file in my local environment and it is prompting with the below error. Please could you check? ( or probably it could be a defectdojo bug)
python dojo_ci_cd.py --product=1 --file "~/Dev/misc/defectdojo_api/tests/scans/Bodgeit-burp.xml" --scanner="Burp Scan" --high=0 --host=http://192.168.13.37:8000 —api_key=xxxx --user=admin
Traceback (most recent call last):
File "dojo_ci_cd.py", line 241, in <module>
class Main:
File "dojo_ci_cd.py", line 282, in Main
test_ids = processFiles(dd, engagement_id, file, scanner=scanner)
File "dojo_ci_cd.py", line 144, in processFiles
if test_id.success == False:
AttributeError: 'NoneType' object has no attribute 'success'
[11/Jul/2018 05:29:06] "GET /api/v1/users/?username=admin&limit=20 HTTP/1.1" 200 246
Internal Server Error: /api/v1/engagements/
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/tastypie/resources.py", line 227, in wrapper
response = callback(request, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/tastypie/resources.py", line 467, in dispatch_list
return self.dispatch('list', request, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/tastypie/resources.py", line 499, in dispatch
response = method(request, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/tastypie/resources.py", line 1408, in post_list
updated_bundle = self.obj_create(bundle, **self.remove_api_resource_names(kwargs))
File "/usr/local/lib/python2.7/dist-packages/tastypie/resources.py", line 2245, in obj_create
return self.save(bundle)
File "/usr/local/lib/python2.7/dist-packages/tastypie/resources.py", line 2380, in save
self.is_valid(bundle)
File "/usr/local/lib/python2.7/dist-packages/tastypie/resources.py", line 1320, in is_valid
errors = self._meta.validation.is_valid(bundle, bundle.request)
File "/usr/local/lib/python2.7/dist-packages/tastypie/validation.py", line 73, in is_valid
form = self.form_class(**self.form_args(bundle))
File "/vagrant/dojo/api.py", line 85, in form_args
pk = self._get_pk_from_resource_uri(rel_field, resource_uri)
File "/vagrant/dojo/api.py", line 70, in _get_pk_from_resource_uri
resource_uri, base_resource_uri))
Exception: Couldn't match resource_uri //api/v1/users/1/ with /api/v1/users/
Internal Server Error: /api/v1/engagements/
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/tastypie/resources.py", line 227, in wrapper
response = callback(request, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/tastypie/resources.py", line 467, in dispatch_list
return self.dispatch('list', request, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/tastypie/resources.py", line 499, in dispatch
response = method(request, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/tastypie/resources.py", line 1408, in post_list
updated_bundle = self.obj_create(bundle, **self.remove_api_resource_names(kwargs))
File "/usr/local/lib/python2.7/dist-packages/tastypie/resources.py", line 2245, in obj_create
return self.save(bundle)
File "/usr/local/lib/python2.7/dist-packages/tastypie/resources.py", line 2380, in save
self.is_valid(bundle)
File "/usr/local/lib/python2.7/dist-packages/tastypie/resources.py", line 1320, in is_valid
errors = self._meta.validation.is_valid(bundle, bundle.request)
File "/usr/local/lib/python2.7/dist-packages/tastypie/validation.py", line 73, in is_valid
form = self.form_class(**self.form_args(bundle))
File "/vagrant/dojo/api.py", line 85, in form_args
pk = self._get_pk_from_resource_uri(rel_field, resource_uri)
File "/vagrant/dojo/api.py", line 70, in _get_pk_from_resource_uri
resource_uri, base_resource_uri))
Exception: Couldn't match resource_uri //api/v1/users/1/ with /api/v1/users/
I am trying to run the dojo_ci_cd.py file in my local environment and it is prompting with the below error. Please could you check? ( or probably it could be a defectdojo bug)
Defectdojo=lastest master
Defectdojo_api 1.1.4
Command & Output:
Output of defectdojo logs: