defectdojo_api icon indicating copy to clipboard operation
defectdojo_api copied to clipboard

TypeError while uploading results

Open raghunath24 opened this issue 7 years ago • 2 comments

Trying to upload the arachni scan results into local setup of defectdojo and facing the below type error. Any idea how to resolve?

pip status: defectdojo_api 1.1.4

Command:

python defectdojo_api/examples/dojo_ci_cd.py --product 1 --file "defectdojo_api/examples/sample-scan-files/arachni/arachni.afr.json" --scanner=“Arachni Scan" --host="http://192.168.9.9/" --api_key="xxx" --user=“admin"

Output:

Traceback (most recent call last):
  File "dojo_ci_cd.py", line 241, in <module>
    class Main:
  File "dojo_ci_cd.py", line 290, in Main
    summary(dd, engagement_id, test_ids, max_critical, max_high, max_medium)
  File "dojo_ci_cd.py", line 166, in summary
    print "Total Number of Vulnerabilities: " + str(findings.data["meta"]["total_count"])
TypeError: string indices must be integers

raghunath24 avatar Jul 10 '18 10:07 raghunath24

#11

Please try pip install -I defectdojo_api==1.1.3

wurstbrot avatar Aug 23 '18 14:08 wurstbrot

@wurstbrot using 1.1.3 did not help me - if I comment out the TypeError on line 166 I run in to the next reference:

Traceback (most recent call last):
  File "dojo_ci_cd.py", line 243, in <module>
    class Main:
  File "dojo_ci_cd.py", line 292, in Main
    summary(dd, engagement_id, test_ids, max_critical, max_high, max_medium)
  File "dojo_ci_cd.py", line 170, in summary
    print_findings(sum_severity(findings))
  File "dojo_ci_cd.py", line 222, in sum_severity
    for finding in findings.data["objects"]:
TypeError: string indices must be integers

heepspray avatar Oct 18 '18 17:10 heepspray