tjarrettveracode/veracode-scan-counts

Get what appears to be an XML parsing error

Opened this issue · 2 comments

Any assistance would be appreciated.

*********@******** veracode-scan-counts % python3 vcscancounts.py --all   
Checking 965 applications for incomplete scans
Traceback (most recent call last):
  File "/Users/*********/Projects/veracode-scan-counts/vcscancounts.py", line 41, in get_incomplete_scans
    static_scan = next(scan for scan in scans if scan["scan_type"] == "STATIC")
StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/*********//Projects/veracode-scan-counts/vcscancounts.py", line 115, in <module>
    main()
  File "/Users/*********//Projects/veracode-scan-counts/vcscancounts.py", line 98, in main
    this_app_scans = get_incomplete_scans(app)
  File "/Users/*********//Projects/veracode-scan-counts/vcscancounts.py", line 50, in get_incomplete_scans
    appscancount += get_incomplete_sandbox_scans(this_app_guid, this_app_id)
  File "/Users/*********//Projects/veracode-scan-counts/vcscancounts.py", line 66, in get_incomplete_sandbox_scans
    buildid = builds[0].get('build_id')
  File "src/lxml/etree.pyx", line 1176, in lxml.etree._Element.__getitem__
IndexError: list index out of range

Thanks for flagging this. Was there anything useful in vcscancounts.log?

Also dies here

2022-02-10 12:54:42,957 - INFO - get_incomplete_scans - Status for static policy scan with url StaticOverview:32397:437294:14859200:14832356:14848013 was INCOMPLETE