Closed himani-dangwal closed 4 years ago
Hi All, can you please update me on this
It might be that the format of sslscan output xml has changed. Could you attach some example files?That would help us to make it work again.
It might be that the format of sslscan output xml has changed. Could you attach some example files?That would help us to make it work again.
Here is the sample xml of sslscan sslscan_sample.zip
@valentijnscholten any update on this
Good catch! There is indeed a change in the format between version 1.X branch and version 2.X branch (which is still in beta). The strength field disappeared in version 2.
Hi,
The missing strength attribute was a regression. It's fixed in tag 2.0.0-beta3, so once you update to the latest version this should work again.
Hi,
The missing strength attribute was a regression. It's fixed in tag 2.0.0-beta3, so once you update to the latest version this should work again.
Thanks, the issue is resolved with the new version.
Bug description I performed a sslscan and generated a xml report out of it. But when the import is being done it throws errors . while there is no issue with the xml.
Steps to reproduce Steps to reproduce the behavior:
Expected behavior Report should have been imported
Deployment method (select with an
X
)Sample scan files (optional) If applicable, add sample scan files to help reproduce your problem.
Screenshots (optional) If applicable, add screenshots to help explain your problem.
Below is the file where it is throwing the issue.. As checked it is expecting an attribute strength in the xml which is not there dojo/tools/sslscan/parser.py
from xml.dom import NamespaceErr import hashlib from urllib.parse import urlparse from defusedxml import ElementTree as ET from dojo.models import Endpoint, Finding
author = 'dr3dd589'
class SslscanXMLParser(object): def init(self, file, test): self.dupes = dict() self.items = () if file is None: return
Request Method: POST Request URL: https://XXXXXXXXX/engagement/850/import_scan_results
Django Version: 2.2.9 Python Version: 3.5.9 Installed Applications: ('django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'polymorphic', 'overextends', 'django.contrib.admin', 'django.contrib.humanize', 'gunicorn', 'tastypie', 'auditlog', 'defectDojo_engagement_survey', 'dojo', 'tastypie_swagger', 'watson', 'tagging', 'custom_field', 'imagekit', 'multiselectfield', 'rest_framework', 'rest_framework.authtoken', 'rest_framework_swagger', 'dbbackup', 'taggit_serializer', 'django_celery_results', 'social_django', 'drf_yasg') Installed Middleware: ['django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.middleware.security.SecurityMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'dojo.middleware.LoginRequiredMiddleware', 'dojo.middleware.TimezoneMiddleware', 'social_django.middleware.SocialAuthExceptionMiddleware']
Traceback:
File "/usr/local/lib/python3.5/site-packages/django/core/handlers/exception.py" in inner
File "/usr/local/lib/python3.5/site-packages/django/core/handlers/base.py" in _get_response
File "/usr/local/lib/python3.5/site-packages/django/core/handlers/base.py" in _get_response
File "/usr/local/lib/python3.5/site-packages/django/contrib/auth/decorators.py" in _wrapped_view
File "./dojo/engagement/views.py" in import_scan_results
File "./dojo/tools/factory.py" in import_parser_factory
File "./dojo/tools/sslscan/parser.py" in init
Exception Type: KeyError at /engagement/850/import_scan_results Exception Value: 'strength'
output xml snippet