Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError while uploading results #13

Open
raghunath24 opened this issue Jul 10, 2018 · 2 comments
Open

TypeError while uploading results #13

raghunath24 opened this issue Jul 10, 2018 · 2 comments

Comments

@raghunath24
Copy link

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 raghunath24 changed the title TypeError while uploading results locally TypeError while uploading results Jul 10, 2018
@wurstbrot
Copy link
Contributor

wurstbrot commented Aug 23, 2018

#11

Please try pip install -I defectdojo_api==1.1.3

@heepspray
Copy link

heepspray commented Oct 18, 2018

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants