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
OpenVas Import Scan Error #1575
Comments
The import issues was fixed by editing the parser.py That have fix the error 500 when Importing a Scan. BUT now when i am importing a scan result it has 0 Findings.. |
Please try on the |
Hello so i have try with the dev bran i had the error at import. docker-compose build Create the product. I have try by editing the parser.py and same issues the findings are 0 #Edit /dojo/tools/openvas_csv/parser.py docker-compose build Create the product. |
@gogo02 would you please provide a sample file or submit a PR? |
Hello @devGregA what do you mean by a PR/sample file ? :) |
He is asking for either the file you had attempted to import or your solution to the issue in the form of a pull request so that others will not have the same problems. |
Hello, i can not post here a sample of a scan result.. |
** Note to self, change TextIOWrapper buffer to a binary reference by opening $filename with r+b |
Pull Request has been created :) |
Bug description
When i am trying to import a scan result (CSV-Results), it failed
Steps to reproduce
Steps to reproduce the behavior:
git clone --branche master https://github.com/DefectDojo/django-DefectDojo && cd django-DefectDojo
docker-compose build
docker-compose up
Expected behavior
The scan result should be accepted
Deployment method (select with an
X
)Environment information
Console logs
uwsgi_1 | Internal Server Error: /product/1/import_scan_results
uwsgi_1 | Traceback (most recent call last):
uwsgi_1 | File "/usr/local/lib/python3.5/site-packages/django/core/handlers/exception.py", line 34, in inner
uwsgi_1 | response = get_response(request)
uwsgi_1 | File "/usr/local/lib/python3.5/site-packages/django/core/handlers/base.py", line 115, in _get_response
uwsgi_1 | response = self.process_exception_by_middleware(e, request)
uwsgi_1 | File "/usr/local/lib/python3.5/site-packages/django/core/handlers/base.py", line 113, in _get_response
uwsgi_1 | response = wrapped_callback(request, *callback_args, **callback_kwargs)
uwsgi_1 | File "/usr/local/lib/python3.5/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view
uwsgi_1 | return view_func(request, *args, **kwargs)
uwsgi_1 | File "./dojo/product/views.py", line 413, in import_scan_results_prod
uwsgi_1 | return import_scan_results(request, pid=pid)
uwsgi_1 | File "/usr/local/lib/python3.5/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view
uwsgi_1 | return view_func(request, *args, **kwargs)
uwsgi_1 | File "./dojo/engagement/views.py", line 525, in import_scan_results
uwsgi_1 | parser = import_parser_factory(file, t, active, verified)
uwsgi_1 | File "./dojo/tools/factory.py", line 125, in import_parser_factory
uwsgi_1 | parser = OpenVASUploadCsvParser(file, test)
uwsgi_1 | File "./dojo/tools/openvas_csv/parser.py", line 316, in init
uwsgi_1 | reader = csv.reader(io.StringIO(content), delimiter=',', quotechar='"')
uwsgi_1 | TypeError: initial_value must be str or None, not bytes
uwsgi_1 | Internal Server Error: /product/1/import_scan_results
uwsgi_1 | Traceback (most recent call last):
uwsgi_1 | File "/usr/local/lib/python3.5/site-packages/django/core/handlers/exception.py", line 34, in inner
uwsgi_1 | response = get_response(request)
uwsgi_1 | File "/usr/local/lib/python3.5/site-packages/django/core/handlers/base.py", line 115, in _get_response
uwsgi_1 | response = self.process_exception_by_middleware(e, request)
uwsgi_1 | File "/usr/local/lib/python3.5/site-packages/django/core/handlers/base.py", line 113, in _get_response
uwsgi_1 | response = wrapped_callback(request, *callback_args, **callback_kwargs)
uwsgi_1 | File "/usr/local/lib/python3.5/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view
uwsgi_1 | return view_func(request, *args, **kwargs)
uwsgi_1 | File "./dojo/product/views.py", line 413, in import_scan_results_prod
uwsgi_1 | return import_scan_results(request, pid=pid)
uwsgi_1 | File "/usr/local/lib/python3.5/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view
uwsgi_1 | return view_func(request, *args, **kwargs)
uwsgi_1 | File "./dojo/engagement/views.py", line 525, in import_scan_results
uwsgi_1 | parser = import_parser_factory(file, t, active, verified)
uwsgi_1 | File "./dojo/tools/factory.py", line 125, in import_parser_factory
uwsgi_1 | parser = OpenVASUploadCsvParser(file, test)
uwsgi_1 | File "./dojo/tools/openvas_csv/parser.py", line 316, in init
uwsgi_1 | reader = csv.reader(io.StringIO(content), delimiter=',', quotechar='"')
uwsgi_1 | TypeError: initial_value must be str or None, not bytes
The text was updated successfully, but these errors were encountered: